+1 (888) 674-2299

30,950,183 Royalty Free Stock Photos

How to use the Fotolia API

Method: getUserGalleryMedias

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

Authentication

This method does not require authentication.

Arguments

Argument Type Valid Values Default Value Detail
api_key string Valid Values none you need a valid api key to use the API
session_id string Valid session ID required authentified session ID( use loginUser to create a session ID)
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


<?xml version="1.0" encoding="utf-8"?>
<methodCall>
	<methodName>xmlrpc.getSearchResults</methodName>
	<params>
		<param>
			<value>
				<string>YOUR_API_KEY</string>
			</value>
		</param>
		<param>
			<value>
				<int>1</int>
			</value>
		</param>
		<param>
			<value>
				<int>12</int>
			</value>
		</param>
		<param>
			<value>
				<int>110</int>
			</value>
		</param>
	</params>
</methodCall>

Example Response


<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>nb_results</name>
            <value>
              <int>459</int>
            </value>
          </member>
          <member>
            <name>0</name>
            <value>
              <struct>
                <member>
                  <name>id</name>
                  <value>
                    <int>1384045</int>
                  </value>
                </member>
                <member>
                  <name>title</name>
                  <value>
                    <string>scientist with test tube radiant gradient bg</string>
                  </value>
                </member>
                <member>
                  <name>creator_name</name>
                  <value>
                    <string>Jose Gil</string>
                  </value>
                </member>
                <member>
                  <name>creator_id</name>
                  <value>
                    <int>6537</int>
                  </value>
                </member>
                <member>
                  <name>thumbnail_url</name>
                  <value>
                    <string>http://static-p1.fotolia.com/jpg/00/01/38/40/110_F_1384045_waKUmRkPuVSQSK9T4lDNc5YvkqSp4x.jpg</string>
                  </value>
                </member>
                <member>
                  <name>thumbnail_html_tag</name>
                  <value>
                    <string><img src="http://static-p1.fotolia.com/jpg/00/01/38/40/110_F_1384045_waKUmRkPuVSQSK9T4lDNc5YvkqSp4x.jpg" alt="scientist with test tube radiant gradient bg" title="scientist with test tube radiant gradient bg" width="81" height="110" /></string>
                  </value>
                </member>
                <member>
                  <name>thumbnail_width</name>
                  <value>
                    <double>81</double>
                  </value>
                </member>
                <member>
                  <name>thumbnail_height</name>
                  <value>
                    <int>110</int>
                  </value>
                </member>
                <member>
                  <name>licences</name>
                  <value>
                    <array>
                      <data>
                        <value>
                          <struct>
                            <member>
                              <name>name</name>
                              <value>
                                <string>M</string>
                              </value>
                            </member>
                            <member>
                              <name>price</name>
                              <value>
                                <int>1</int>
                              </value>
                            </member>
                          </struct>
                        </value>
                        <value>
                          <struct>
                            <member>
                              <name>name</name>
                              <value>
                                <string>L</string>
                              </value>
                            </member>
                            <member>
                              <name>price</name>
                              <value>
                                <int>2</int>
                              </value>
                            </member>
                          </struct>
                        </value>
                        <value>
                          <struct>
                            <member>
                              <name>name</name>
                              <value>
                                <string>X</string>
                              </value>
                            </member>
                            <member>
                              <name>price</name>
                              <value>
                                <int>50</int>
                              </value>
                            </member>
                          </struct>
                        </value>
                      </data>
                    </array>
                  </value>
                </member>
              </struct>
            </value>
          </member>
          <member>
            <name>1</name>
            <value>
              <struct>
                <member>
                  <name>id</name>
                  <value>
                    <int>1247723</int>
                  </value>
                </member>
                <member>
                  <name>title</name>
                  <value>
                    <string>antique tube tester</string>
                  </value>
                </member>
                <member>
                  <name>creator_name</name>
                  <value>
                    <string>James Steidl</string>
                  </value>
                </member>
                <member>
                  <name>creator_id</name>
                  <value>
                    <int>140159</int>
                  </value>
                </member>
                <member>
                  <name>thumbnail_url</name>
                  <value>
                    <string>http://static-p2.fotolia.com/jpg/00/01/24/77/110_F_1247723_MB9BPAu0TMbhI2UEUNCQKCRpvXdEyR.jpg</string>
                  </value>
                </member>
                <member>
                  <name>thumbnail_html_tag</name>
                  <value>
                    <string><img src="http://static-p2.fotolia.com/jpg/00/01/24/77/110_F_1247723_MB9BPAu0TMbhI2UEUNCQKCRpvXdEyR.jpg" alt="antique tube tester" title="antique tube tester" width="74" height="110" /></string>
                  </value>
                </member>
                <member>
                  <name>thumbnail_width</name>
                  <value>
                    <double>74</double>
                  </value>
                </member>
                <member>
                  <name>thumbnail_height</name>
                  <value>
                    <int>110</int>
                  </value>
                </member>
                <member>
                  <name>licences</name>
                  <value>
                    <array>
                      <data>
                        <value>
                          <struct>
                            <member>
                              <name>name</name>
                              <value>
                                <string>M</string>
                              </value>
                            </member>
                            <member>
                              <name>price</name>
                              <value>
                                <int>1</int>
                              </value>
                            </member>
                          </struct>
                        </value>
                        <value>
                          <struct>
                            <member>
                              <name>name</name>
                              <value>
                                <string>L</string>
                              </value>
                            </member>
                            <member>
                              <name>price</name>
                              <value>
                                <int>2</int>
                              </value>
                            </member>
                          </struct>
                        </value>
                        <value>
                          <struct>
                            <member>
                              <name>name</name>
                              <value>
                                <string>XL</string>
                              </value>
                            </member>
                            <member>
                              <name>price</name>
                              <value>
                                <int>3</int>
                              </value>
                            </member>
                          </struct>
                        </value>
                        <value>
                          <struct>
                            <member>
                              <name>name</name>
                              <value>
                                <string>X</string>
                              </value>
                            </member>
                            <member>
                              <name>price</name>
                              <value>
                                <int>20</int>
                              </value>
                            </member>
                          </struct>
                        </value>
                      </data>
                    </array>
                  </value>
                </member>
              </struct>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodResponse>

Error Codes

001: Service currently unavailable
The requested service is temporarily unavailable.
002: Failed to parse request
The XML-RPC request document 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.