withVectorsTab-97x42
We's got 25,310,265 images, yo!

API Access

API Documentation - getSearchResults

This methods makes possible to search media in fotolia image bank. Full search capabilities are available through the API.

Authentication

This method does not require authentication.

Arguments

Argument Type Valid Values Default Value Detail
api_key string none you need a valid api key to use the API
search_params struct none parameters for the search, see chart below
search_result_fields struct
  • nb_results
  • id
  • title
  • photograhper_name
  • photograhper_id
  • thumbnail_html_tag
  • affiliation_link
  • thumbnail_110_url
  • thumbnail_110_width
  • thumbnail_110_height
  • thumbnail_400_url
  • thumbnail_400_width
  • thumbnail_400_height
  • nb_views
  • nb_downloads
  • creation_date
  • keywords
fields to be sent in the search results, may include any of the following fields (if none specified then all except nb_views, nb_downloads, creation_date and keywords are returned):

search_params arguments

Argument Type Valid Values Default Value Detail
q string list of words none keyword search
words can also be media_id using # to search for some media ( ex : #20 #21 #22)
only_result_number int 1/0 none If set to 1 then only the number of results will be returned
detail_level int 1/0 none If set to 1 then nb_views, nb_downloads, creation_date fields are included in the search results
photographer_id int valid creator id none Search by photographer
cat1_id int valid category1 id none Search by representative category
cat2_id int valid category2 id none Search by conceptual category
orientation string
  • Landscape
  • Portrait
  • Panoramic
none orientation to search for
content_type_id string
  • 1 - Photo
  • 2 - Illustration
  • 3 - Vector
array Content type to search for
lightbox_id string Array of lightbox id32s for the lightboxes to search in. Lightboxes must be in API key holder's account. array Search in specific lightboxes
limit Int 1 to 64 32 maximum number of media returned
limit_free Int 1 to 64 32 maximum number of free media returned, defaults to limit setting if not set
limit_premium Int 1 to 64 32 maximum number of premium media returned, defaults to limit setting if not set
offset int 0 to max results 0 Start position in query
offset_free int 0 to max results 0 Start position in query for free images, defaults to offset if not set
offset_premium int 0 to max results 0 Start position in query for premium images, defaults to offset if not set

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
/[n]/ creator_id int media creator unique id
/[n]/ creator_name string media creator name
/[n]/ thumbnail_110_url string media thumbnail url for 110 size
/[n]/ thumbnail_110_width int thumbnail width for 110 size
/[n]/ thumbnail_110_height int thumbnail height for 110 size
/[n]/ thumbnail_400_url string media thumbnail url for 400 size
/[n]/ thumbnail_400_width int thumbnail width for 400 size
/[n]/ thumbnail_400_height int thumbnail height for 400 size
/[n]/ thumbnail_html_tag string media thumbnail html tag for 110 size
/[n]/ affiliation_link string Affiliation link to media on PhotoXpress
/[n]/ is_free string true/false for media being free
/[n]/ nb_views int number of views for the media
/[n]/ nb_downloads int number of downloads for the media
/[n]/ creation_date string creation date for the media
/[n]/ keywords array array of keywords for the media

Example Query


<?xml version="1.0" encoding="utf-8"?>
<methodCall>
  <methodName>search.getSearchResults</methodName>
  <params>
    <param>
      <value>
        <string>YOUR_API_KEY</string>
      </value>
    </param>
    <param>
      <value>
        <struct>
          <member>
            <name>q</name>
            <value>
              <string>goat</string>
            </value>
          </member>
          <member>
            <name>limit</name>
            <value>
              <int>1</int>
            </value>
          </member>
          <member>
            <name>detail_level</name>
            <value>
              <int>1</int>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodCall>


Example Response - Free and Premium


<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>free</name>
            <value>
              <struct>
                <member>
                  <name>nb_results</name>
                  <value>
                    <int>610</int>
                  </value>
                </member>
                <member>
                  <name>0</name>
                  <value>
                    <struct>
                      <member>
                        <name>id</name>
                        <value>
                          <int>1034467</int>
                        </value>
                      </member>
                      <member>
                        <name>title</name>
                        <value>
                          <string>goat 1</string>
                        </value>
                      </member>
                      <member>
                        <name>creator_name</name>
                        <value>
                          <string>Paul Woodward</string>
                        </value>
                      </member>
                      <member>
                        <name>creator_id</name>
                        <value>
                          <int>199801</int>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_url</name>
                        <value>
                          <string>
                          http://static-p2.photoxpress.com/jpg/00/01/03/44/110_F_1034467_Ggm9Fl8NtGHIoh4og3nfXYZ5Kqi6ph_PXP.jpg</string>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_html_tag</name>
                        <value>
                          <string><img
                          src="http://static-p2.photoxpress.com/jpg/00/01/03/44/110_F_1034467_Ggm9Fl8NtGHIoh4og3nfXYZ5Kqi6ph_PXP.jpg"
                          alt="goat goats stock photo" title="goat goats"/></string>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_width</name>
                        <value>
                          <int>110</int>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_height</name>
                        <value>
                          <int>83</int>
                        </value>
                      </member>
                      <member>
                        <name>affiliation_link</name>
                        <value>
                          <string>
                          http://www.photoxpress.com/stock-photos/goat/goats/none/1034467/partner/1077159</string>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_110_url</name>
                        <value>
                          <string>
                          http://static-p2.photoxpress.com/jpg/00/01/03/44/110_F_1034467_Ggm9Fl8NtGHIoh4og3nfXYZ5Kqi6ph_PXP.jpg</string>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_110_width</name>
                        <value>
                          <int>110</int>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_110_height</name>
                        <value>
                          <int>83</int>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_400_url</name>
                        <value>
                          <string>
                          http://static-p2.photoxpress.com/jpg/00/01/03/44/400_F_1034467_Ggm9Fl8NtGHIoh4og3nfXYZ5Kqi6ph_PXP.jpg</string>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_400_width</name>
                        <value>
                          <int>400</int>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_400_height</name>
                        <value>
                          <int>300</int>
                        </value>
                      </member>
                      <member>
                        <name>is_free</name>
                        <value>
                          <string>true</string>
                        </value>
                      </member>
                      <member>
                        <name>nb_views</name>
                        <value>
                          <int>137</int>
                        </value>
                      </member>
                      <member>
                        <name>nb_downloads</name>
                        <value>
                          <int>14</int>
                        </value>
                      </member>
                      <member>
                        <name>creation_date</name>
                        <value>
                          <string>2009-03-08 03:06:55.026377</string>
                        </value>
                      </member>
                    </struct>
                  </value>
                </member>
              </struct>
            </value>
          </member>
          <member>
            <name>premium</name>
            <value>
              <struct>
                <member>
                  <name>nb_results</name>
                  <value>
                    <int>6003</int>
                  </value>
                </member>
                <member>
                  <name>0</name>
                  <value>
                    <struct>
                      <member>
                        <name>id</name>
                        <value>
                          <int>8571850</int>
                        </value>
                      </member>
                      <member>
                        <name>title</name>
                        <value>
                          <string>biggest collection of vector animals</string>
                        </value>
                      </member>
                      <member>
                        <name>creator_name</name>
                        <value>
                          <string>Konovalov Pavel</string>
                        </value>
                      </member>
                      <member>
                        <name>creator_id</name>
                        <value>
                          <int>840604</int>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_url</name>
                        <value>
                          <string>
                          http://static-p1.photoxpress.com/jpg/00/08/57/18/110_F_8571850_aC9yYnV4ynx7ahI3Jb2FHMj6vKCRCZId_PXP.jpg</string>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_html_tag</name>
                        <value>
                          <string><img
                          src="http://static-p1.photoxpress.com/jpg/00/08/57/18/110_F_8571850_aC9yYnV4ynx7ahI3Jb2FHMj6vKCRCZId_PXP.jpg"
                          alt="cat animal horse stock photo" title="cat animal
                          horse"/></string>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_width</name>
                        <value>
                          <int>110</int>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_height</name>
                        <value>
                          <int>110</int>
                        </value>
                      </member>
                      <member>
                        <name>affiliation_link</name>
                        <value>
                          <string>
                          http://www.photoxpress.com/stock-photos/cat/animal/horse/8571850/partner/1077159</string>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_110_url</name>
                        <value>
                          <string>
                          http://static-p1.photoxpress.com/jpg/00/08/57/18/110_F_8571850_aC9yYnV4ynx7ahI3Jb2FHMj6vKCRCZId_PXP.jpg</string>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_110_width</name>
                        <value>
                          <int>110</int>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_110_height</name>
                        <value>
                          <int>110</int>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_400_url</name>
                        <value>
                          <string>
                          http://static-p1.photoxpress.com/jpg/00/08/57/18/400_F_8571850_aC9yYnV4ynx7ahI3Jb2FHMj6vKCRCZId_PXP.jpg</string>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_400_width</name>
                        <value>
                          <int>399</int>
                        </value>
                      </member>
                      <member>
                        <name>thumbnail_400_height</name>
                        <value>
                          <int>400</int>
                        </value>
                      </member>
                      <member>
                        <name>is_free</name>
                        <value>
                          <string>false</string>
                        </value>
                      </member>
                      <member>
                        <name>nb_views</name>
                        <value>
                          <int>23</int>
                        </value>
                      </member>
                      <member>
                        <name>nb_downloads</name>
                        <value>
                          <int>0</int>
                        </value>
                      </member>
                      <member>
                        <name>creation_date</name>
                        <value>
                          <string>2010-02-27 21:09:09.332369</string>
                        </value>
                      </member>
                    </struct>
                  </value>
                </member>
              </struct>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodResponse>

Example Response - Free / Premium Only


<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>nb_results</name>
            <value>
              <int>6003</int>
            </value>
          </member>
          <member>
            <name>0</name>
            <value>
              <struct>
                <member>
                  <name>id</name>
                  <value>
                    <int>8571850</int>
                  </value>
                </member>
                <member>
                  <name>title</name>
                  <value>
                    <string>biggest collection of vector animals</string>
                  </value>
                </member>
                <member>
                  <name>creator_name</name>
                  <value>
                    <string>Konovalov Pavel</string>
                  </value>
                </member>
                <member>
                  <name>creator_id</name>
                  <value>
                    <int>840604</int>
                  </value>
                </member>
                <member>
                  <name>thumbnail_url</name>
                  <value>
                    <string>
                    http://static-p1.photoxpress.com/jpg/00/08/57/18/110_F_8571850_aC9yYnV4ynx7ahI3Jb2FHMj6vKCRCZId_PXP.jpg</string>
                  </value>
                </member>
                <member>
                  <name>thumbnail_html_tag</name>
                  <value>
                    <string><img
                    src="http://static-p1.photoxpress.com/jpg/00/08/57/18/110_F_8571850_aC9yYnV4ynx7ahI3Jb2FHMj6vKCRCZId_PXP.jpg"
                    alt="cat animal horse stock photo" title="cat animal
                    horse"/></string>
                  </value>
                </member>
                <member>
                  <name>thumbnail_width</name>
                  <value>
                    <int>110</int>
                  </value>
                </member>
                <member>
                  <name>thumbnail_height</name>
                  <value>
                    <int>110</int>
                  </value>
                </member>
                <member>
                  <name>affiliation_link</name>
                  <value>
                    <string>
                    http://www.photoxpress.com/stock-photos/cat/animal/horse/8571850/partner/1077159</string>
                  </value>
                </member>
                <member>
                  <name>thumbnail_110_url</name>
                  <value>
                    <string>
                    http://static-p1.photoxpress.com/jpg/00/08/57/18/110_F_8571850_aC9yYnV4ynx7ahI3Jb2FHMj6vKCRCZId_PXP.jpg</string>
                  </value>
                </member>
                <member>
                  <name>thumbnail_110_width</name>
                  <value>
                    <int>110</int>
                  </value>
                </member>
                <member>
                  <name>thumbnail_110_height</name>
                  <value>
                    <int>110</int>
                  </value>
                </member>
                <member>
                  <name>thumbnail_400_url</name>
                  <value>
                    <string>
                    http://static-p1.photoxpress.com/jpg/00/08/57/18/400_F_8571850_aC9yYnV4ynx7ahI3Jb2FHMj6vKCRCZId_PXP.jpg</string>
                  </value>
                </member>
                <member>
                  <name>thumbnail_400_width</name>
                  <value>
                    <int>399</int>
                  </value>
                </member>
                <member>
                  <name>thumbnail_400_height</name>
                  <value>
                    <int>400</int>
                  </value>
                </member>
                <member>
                  <name>is_free</name>
                  <value>
                    <string>false</string>
                  </value>
                </member>
                <member>
                  <name>nb_views</name>
                  <value>
                    <int>23</int>
                  </value>
                </member>
                <member>
                  <name>nb_downloads</name>
                  <value>
                    <int>0</int>
                  </value>
                </member>
                <member>
                  <name>creation_date</name>
                  <value>
                    <string>2010-02-27 21:09:09.332369</string>
                  </value>
                </member>
              </struct>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodResponse>