Skip to content
Fotolia API toolkits
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Fotolia API Kits

Olivier Sirven


Fotolia's industry-leading API allows developers and businesses to quickly integrate a vast database of images in their workflows and business models.

Whether you're developing an application with millions of photos, or integrating a stock photography library into your business to increase customer satisfaction, Fotolia's powerful APIs are key. But technical excellence is only part of the formula – our business development team will work with you to determine the best way to maximize results.

Fotolia's API line-up

Partner API

Our Partner API allows you to embed royalty-free image search into your website.

  • Your customers may search the entire Fotolia library to find images without leaving your website.
  • After finding the perfect image, your customer clicks through to us to buy.
  • Since our Affiliate Program is also built into this API, we automatically pay you for all revenues generated.

Learn more

Business API

Our Business API is for on-demand businesses producing custom merchandise and products, including web site templates and printed materials.

  • Your customers will gain access to high-resolution images directly within your application or web-based tool.
  • Wholesale pricing is available.
  • You can also use this API to embed Fotolia into your intranet or application to make search and download faster.

Learn more

Reseller API

Our Reseller API allows you to sell Fotolia's images under your brand name to your customers.

  • Access Fotolia's entire microstock image library, with full search and download capability.
  • A complete white-label solution, available in select markets around the world.

Learn more

Content of this package

This package contains a full implementation of the API for PHP, python and java. Each provides an example file to show how to use it.



.Example usage

#!/usr/bin/env php

require_once 'fotolia-api.php';

$api = new Fotolia_Api('your_api_key');

// searching for files
$results = $api->getSearchResults(
        'words' => 'car',
        'language_id' => Fotolia_Api::LANGUAGE_ID_EN_US,
        'limit' => 1,

printf("Found %d results", $results['nb_results']);

foreach ($results as $key => $value) {
    // iterating only over numeric keys and silently skip other keys
    if (is_numeric($key)) {
        printf("matching media ID: %d", $value['id']);

// loggin in and retrieving user data
$api->loginUser('your_login', 'your_password');

// purchasing and downloading a file
$dl_data = $api->getMedia(35957426, 'XS');
$api->downloadMedia($dl_data['url'], '/tmp/' . $dl_data['name']);



.Example usage

#!/usr/bin/env python

import fotolia_api

api = fotolia_api.FotoliaApi('your_api_key')

# searching for files
results = api.get_search_results({'words': 'car', 'language_id': fotolia_api.LANGUAGE_ID_EN_US, 'limit': 1})
print "Found %d results" % results['nb_results']

for key, value in results.items():
        print "matching media ID: %d" % value['id']
    except ValueError:
        # iterating only over numeric keys and silently skip other keys

# loggin in and retrieving user data
api.login_user('your_login', 'your_password')
print api.get_user_data()

# purchasing and downloading a file
dl_data = api.get_media(35957426, 'XS')
api.download_media(dl_data['url'], '/tmp/' + str(dl_data['name']))



A simple Makefile is provided to help using it. It supports following commands:

build:: Build the entire package

jar:: Create a JAR file for easy inclusion

clean:: Clean the build files

example:: Build the example program

.Example usage

import org.webservice.fotolia.*;
import org.json.simple.JSONObject;

public class example
    public static void main(String[] args)
        FotoliaApi client = new FotoliaApi("your_api_key");

        // fetching a media data

        // searching files
        FotoliaSearchQuery query = new FotoliaSearchQuery();

        // buying and downloading a file
        try {
            client.loginUser("your_login", "your_password");
            JSONObject res = client.getMedia(35957426, "XS");
            client.downloadMedia((String) res.get("url"), "/tmp/" + (String) res.get("name"));
        } catch (Exception e) {



Google Groups

Online Documentation

You can’t perform that action at this time.