+1 (888) 674-2299

28,246,262 Royalty Free Stock Photos

How to use the Fotolia API

API Key

To use the API to query Fotolia's database, you must first obtain an API key. API keys can be obtained from the “Toolbox” section of your account and completing the API form. Three kinds of API keys are available: Partner API keys, Developer API keys, and Business API keys. Please see the chart below to review the features of each API key. You may obtain multiple API keys simply by applying for different keys.

Terms of Use

The API Terms of Use governs the rights and conditions in which each API may be used. Please review the API Terms of Use for the appropriate API before using it.

Encoding

The Fotolia API requires that all data to be UTF-8 encoded. More information about UTF-8 encoding

Authentication

Some methods need to be authenticated (see table below). Authentication is only available for the Developer and Business APIs. The process of authentication is equivalent to login process of the Fotolia website. The login and password must be sent securely through the API and when authenticated a session ID is provided. This session ID will then be needed to use methods with authentication. For more information about authentication, please see loginUser method.

API Calls Quota

Fotolia limits the number of API calls by default to 500 per hour and 10,000 per day.
If you expect traffic to be higher, please contact support.

Methods

Methods make it possible to execute different functions through the API. The following table has information about the methods available within each API Type.

Methods Partner API Business API Developer API Reseller API Authentication Description
Search
getSearchResults Authorized Authorized Authorized Authorized no full search capabilities
getCategories1 Authorized Authorized Authorized Authorized no return representative categories
getCategories2 Authorized Authorized Authorized Authorized no return conceptual categories
getTags Authorized Authorized Authorized Authorized no return tag cloud
getGalleries Authorized Authorized Authorized Authorized no return public galleries
getColors Authorized Authorized Authorized Authorized no return color scheme
getCountries Authorized Authorized Authorized Authorized no return countries list
Media
getMediaData Authorized Authorized Authorized Authorized no return all information about a media
getMediaGalleries Authorized Authorized Authorized Authorized no return galleries attached to a media
getMedia Prohibited Authorized Prohibited Authorized yes return download link (media purchase)
getMediaComp Authorized Authorized Authorized Authorized no return url of the comp image
User
loginUser Authorized Authorized Authorized Authorized no log a user (needed for authentification)
logoutUser Authorized Authorized Authorized Authorized yes log out a user (kill session)
getUserData Authorized Authorized Authorized Authorized yes return information about the logged user
getUserStats Authorized Authorized Authorized Authorized yes return account statistics of the logged user
getUserGalleries Authorized Authorized Authorized Authorized yes retun galleries of the logged user
getUserGalleryMedias Authorized Authorized Authorized Authorized yes return the lightbox/gallery content of a logged user
deleteUserGallery Authorized Authorized Authorized Authorized yes Delete a gallery from the logged user
createUserGallery Authorized Authorized Authorized Authorized yes create a new gallery for the logged user
addToUserGallery Authorized Authorized Authorized Authorized yes add a content to a gallery of the logged user
removeFromUserGallery Authorized Authorized Authorized Authorized yes remove a content from a galley of the logged user
user.moveUpMediaInUserGallery Authorized Authorized Authorized Authorized yes move up a media in an user galleryr
user.moveDownMediaInUserGallery Authorized Authorized Authorized Authorized yes move down a media in an user gallery
user.moveMediaToTopInUserGallery Authorized Authorized Authorized Authorized yes move a media to top position in an user gallery
getUserAdvancedStats Authorized Authorized Authorized Authorized yes return advanced account statistics of the logged user
Shopping cart
shoppingcart.getList Prohibited Authorized Prohibited Authorized yes Returns shopping cart content
shoppingcart.add Prohibited Authorized Prohibited Authorized yes Add a media to the user's shopping cart
shoppingcart.update Prohibited Authorized Prohibited Authorized yes Update a media into the user's shopping cart
shoppingcart.remove Prohibited Authorized Prohibited Authorized yes Remove a media from the user's shopping cart
shoppingcart.transferToLightbox Prohibited Authorized Prohibited Authorized yes Remove a media from the user's shopping cart and add to to his lightbox
shoppingcart.clear Prohibited Authorized Prohibited Authorized yes Clear the user's shopping cart
Main
getData Authorized Authorized Authorized Authorized no retun general information about Fotolia
test Authorized Authorized Authorized Authorized no return success
Reseller API
user.subaccount.getIds Prohibited Prohibited Prohibited Authorized no Returns an array of all available subaccount IDs
user.subaccount.create Prohibited Prohibited Prohibited Authorized no Create a reseller subaccount
user.subaccount.delete Prohibited Prohibited Prohibited Authorized no Delete a reseller subaccount
user.subaccount.edit Prohibited Prohibited Prohibited Authorized no Update data of a reseller subaccount
user.subaccount.get Prohibited Prohibited Prohibited Authorized no Get reseller subaccount details
user.subaccount.getPurchasedContents Prohibited Prohibited Prohibited Authorized no Get the list of purchases made by a subaccount
media.getLicense Prohibited Prohibited Prohibited Authorized no Get the licence between the reseller and his customer for a specific sale.

Query Format

XML/RPC

XML/RPC format is available for query/response. XML-RPC is a Remote Procedure Calling protocol that works over the Internet. An XML-RPC message is an HTTP-POST request. The body of the request is in XML. A procedure executes on the server and the value it returns is also formatted in XML. More information about XML/RPC

Header


POST /Xmlrpc/rpc HTTP/1.0
Host: api.fotolia.com
Connection: close
Content-Type: text/xml
Content-Length: 569


Query Example


<?xml version="1.0" encoding="utf-8"?>
<methodCall>
    <methodName>xmlrpc.test</methodName>
    <params>
        <param>
            <value>
                <string>YOUR_API_KEY</string>
            </value>
        </param>
    </params>
</methodCall>

Response Example


<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>test</name>
            <value>
              <string>Success</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodResponse>

API Kits

You can use a kit in order to help simplify API use. A list of kits available is listed below. Please contact us to have your kit listed.

PHP

Ruby