v1

latestSwagger 2.02026-07-13251668.3 KB
Public

Return a list of photos matching some criteria.

get/rest?method=flickr.photos.search

Query parameters

api_keystring required
textstring

A free text search. Photos who's title, description or tags contain the text will be returned. You can exclude results that match a term by prepending it with a - character.

tagsstring

A comma-delimited list of tags. Photos with one or more of the tags listed will be returned. You can exclude results that match a term by prepending it with a - character.

user_idstring

The NSID of the user who's photo to search. If this parameter isn't passed then everybody's public photos will be searched. A value of "me" will search against the calling user's photos for authenticated calls.

min_upload_datestring

Minimum upload date. Photos with an upload date greater than or equal to this value will be returned. The date can be in the form of a unix timestamp or mysql datetime.

max_upload_datestring

Maximum upload date. Photos with an upload date less than or equal to this value will be returned. The date can be in the form of a unix timestamp or mysql datetime.

min_taken_datestring

Minimum taken date. Photos with an taken date greater than or equal to this value will be returned. The date can be in the form of a mysql datetime or unix timestamp.

max_taken_datestring

Maximum taken date. Photos with an taken date less than or equal to this value will be returned. The date can be in the form of a mysql datetime or unix timestamp.

licensestring

The license id for photos (for possible values see the flickr.photos.licenses.getInfo method). Multiple licenses may be comma-separated.

sortstring

The order in which to sort returned photos. Deafults to date-posted-desc (unless you are doing a radial geo query, in which case the default sorting is by ascending distance from the point specified). The possible values are: date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, interestingness-asc, and relevance.

privacy_filternumber

Return photos only matching a certain privacy level. This only applies when making an authenticated call to view photos you own. Valid values are:, 1: public photos, 2: private photos visible to friends, 3: private photos visible to family, 4: private photos visible to friends & family, 5: completely private photos

bboxstring

A comma-delimited list of 4 values defining the Bounding Box of the area that will be searched.

accuracystring

Recorded accuracy level of the location information. Current range is 1-16: World level is 1 Country is ~3 Region is ~6 City is ~11 Street is ~16

safe_searchnumber

Safe search setting: 1: for safe, 2: for moderate, 3: for restricted

content_typenumber

Content Type setting: 1: photos only. 2: screenshots only. 3: 'other' only. 4: photos and screenshots. 5: screenshots and 'other'. 6: photos and 'other'. 7: photos, screenshots, and 'other' (all).

machine_tagsstring

Aside from passing in a fully formed machine tag, there is a special syntax for searching on specific properties : Find photos using the 'dc' namespace : "machine_tags" => "dc:" Find photos with a title in the 'dc' namespace : "machine_tags" => "dc:title=" Find photos titled "mr. camera" in the 'dc' namespace : "machine_tags" => "dc:title="mr. camera" Find photos whose value is "mr. camera" : "machine_tags" => ":="mr. camera"" Find photos that have a title, in any namespace : "machine_tags" => ":title=" Find photos that have a title, in any namespace, whose value is "mr. camera" : "machine_tags" => ":title="mr. camera"" Find photos, in the 'dc' namespace whose value is "mr. camera" : "machine_tags" => "dc:*="mr. camera"" Multiple machine tags may be queried by passing a comma-separated list. The number of machine tags you can pass in a single query depends on the tag mode (AND or OR) that you are querying with. "AND" queries are limited to (16) machine tags. "OR" queries are limited to (8).

machine_tag_modestring

Either 'any' for an OR combination of tags, or 'all' for an AND combination. Defaults to 'any' if not specified.

group_idstring

The id of a group who's pool to search. If specified, only matching photos posted to the group's pool will be returned.

contactsstring

Search your contacts. Either 'all' or 'ff' for just friends and family. (Experimental)

woe_idstring

A 32-bit identifier that uniquely represents spatial entities. (not used if bbox argument is present).

place_idstring

A Flickr place id. (not used if bbox argument is present). Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).

mediastring

Filter results by media type. Possible values are all (default), photos or videos

has_geostring

Any photo that has been geotagged, or if the value is "0" any photo that has not been geotagged. Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).

geo_contextstring

Geo context is a numeric value representing the photo's geotagginess beyond latitude and longitude. For example, you may wish to search for photos that were taken "indoors" or "outdoors". The current list of context IDs is: 0, not defined. 1, indoors. 2, outdoors. Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).

latstring

A valid latitude, in decimal format, for doing radial geo queries. Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).

lonstring

A valid longitude, in decimal format, for doing radial geo queries. Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).

radiusnumber

A valid radius used for geo queries, greater than zero and less than 20 miles (or 32 kilometers), for use with point-based geo queries. The default value is 5 (km).

radius_unitsstring

The unit of measure when doing radial geo queries. Valid options are "mi" (miles) and "km" (kilometers). The default is "km".

is_commonsboolean

Limit the scope of the search to only photos that are part of the Flickr Commons project. Default is false.

in_galleryboolean

Limit the scope of the search to only photos that are in a gallery? Default is false, search all photos.

is_gettyboolean

Limit the scope of the search to only photos that are for sale on Getty. Default is false.

per_pagenumber

Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.

pagenumber

The page of results to return. If this argument is omitted, it defaults to 1.

Response

OK

pagenumber
pagesnumber
perpagenumber
totalnumber