+1 (888) 674-2299

31,032,932 Royalty Free Stock Photos

How to use the Fotolia API

Method: user/getUserGalleryMedias

This methods allows to search media in logged user galleries or lightbox.

Authentication

This method requires authentication with a valid session token.

HTTP method

This method is called with HTTP method GET.

Arguments

Argument Type Valid Values Default Value Detail
page int 1 to max results / nb_per_page 1 Page number to display
nb_per_page Int 1 to 64 32 maximum number of media returned
thumbnail_size int
  • 30
  • 110
  • 400
110
  • Small (30px)
  • Medium (110px)
  • Large (400px - watermarked)
id string valid gallery id none If not id sent, retrieve the content of the logged user Lightbox
detail_level int 0 or 1 0 If 1, add nb_downloads, nb_views and keywords for each medias

Returned Values

Element (path) Name Type Description
/ nb_results int total number of result
/[n]/ id int media unique ID
/[n]/ title string media title (used for title tag)
/[n]/ creator_id int media creator unique id
/[n]/ creator_name string media creator name
/[n]/ thumbnail_url string media thumbnail url
/[n]/ thumbnail_html_tag string media thumbnail html tag
/[n]/ thumbnail_width int media thumbnail width (px)
/[n]/ thumbnail_height int media thumbnail height(px)
/[n]/licenses/[n]/ name string media license name
/[n]/licenses/[n]/ price int media license price (credit)
When detail_level=1 only :
/[n]/ nb_views int media views number
/[n]/ nb_downloads int media downloads number
/[n]/ keywords string Media keywords, comma separated

Example Query

GET http://API_KEY:SESSION_TOKEN@api.fotolia.com/Rest/1/user/getUserGalleryMedias?page=12&nb_per_page=110

Example Response

{
	"nb_results":459,
	"0":{
		"id":1384045,
		"title":"scientist with test tube radiant gradient bg",
		"creator_name":"Jose Gil",
		"creator_id":6537,
		"thumbnail_url":"http:\/\/static-p1.fotolia.com\/jpg\/00\/01\/38\/40\/110_F_1384045_waKUmRkPuVSQSK9T4lDNc5YvkqSp4x.jpg",
		"thumbnail_html_tag":"",
		"thumbnail_width":81,
		"thumbnail_height":110,
		"licences":[
			{
				"name":"M",
				"price":1
			},
			{
				"name":"L",
				"price":2
			},
			{
				"name":"X",
				"price":50
			}
		]
	},
	"1":{
		"id":1247723,
		"title":"antique tube tester",
		"creator_name":"James Steidl",
		"creator_id":140159,
		"thumbnail_url":"http:\/\/static-p2.fotolia.com\/jpg\/00\/01\/24\/77\/110_F_1247723_MB9BPAu0TMbhI2UEUNCQKCRpvXdEyR.jpg",
		"thumbnail_html_tag":"",
		"thumbnail_width":74,
		"thumbnail_height":110,
		"licences":[
			{
				"name":"M",
				"price":1
			},
			{
				"name":"L",
				"price":2
			},
			{
				"name":"XL",
				"price":3
			},
			{
				"name":"X",
				"price":20
			}
		]
	}
}

Error Codes

001: Service currently unavailable
The requested service is temporarily unavailable.
002: Failed to parse request
The request could not be parsed.
010: Missing API Key
The API key passed is missing.
011: Invalid API Key
The API key passed is not valid or has expired.
031: Invalid Method
This method does not exist in the method list.
032: Method not Available
This method is not available for this API Key.
2001: Invalid Language ID
The language ID passed is not valid or doesn't exist in the fotolia available language list.
2101: Invalid Thumbnail Size
The thumbnail size passed is not valid or doesn't exist in the fotolia available thumbnail size list.