Returns a tree (or sub tree) of collections belonging to a given user.


This method does not require authentication.


api_key (Required)
Your API application key. See here for more details.
collection_id (Optional)
The ID of the collection to fetch a tree for, or zero to fetch the root collection. Defaults to zero.
user_id (Optional)
The ID of the account to fetch the collection tree for. Deafults to the calling user.

Example Response

  <collection id="12-72157594586579649" title="All My Photos" description="a collection" iconlarge="" iconsmall="">
    <set id="92157594171298291" title="kitesurfing" description="a set" />
    <set id="72157594247596158" title="faves" description="some favorites." />
A nested tree of collections, and the collections and sets they contain.

Error Codes

1: User not found
The specified user could not be found.
2: Collection not found
The specified collection does not exist.
100: Invalid API Key
The API key passed was not valid or has expired.
105: Service currently unavailable
The requested service is temporarily unavailable.
106: Write operation failed
The requested operation failed due to a temporary issue.
111: Format "xxx" not found
The requested response format was not found.
112: Method "xxx" not found
The requested method was not found.
114: Invalid SOAP envelope
The SOAP envelope send in the request could not be parsed.
115: Invalid XML-RPC Method Call
The XML-RPC request document could not be parsed.
116: Bad URL found
One or more arguments contained a URL that has been used for abuse on Flickr.

API Explorer

API Explorer : flickr.collections.getTree