PHPackages                             imagin/fotolia-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. imagin/fotolia-api

AbandonedArchivedLibrary[API Development](/categories/api)

imagin/fotolia-api
==================

Composer package of the Fotolia API toolkit

v1.0-RC2(13y ago)13141GPL-2.0PHPPHP &gt;=5.2.0

Since May 6Pushed 13y ago1 watchersCompare

[ Source](https://github.com/imagin/fotolia-api)[ Packagist](https://packagist.org/packages/imagin/fotolia-api)[ Docs](https://github.com/Fotolia/Fotolia-API)[ RSS](/packages/imagin-fotolia-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Fotolia API Kits
================

[](#fotolia-api-kits)

Olivier Sirven [Fotolia.com](http://www.fotolia.com/ "Fotolia")

Introduction
============

[](#introduction)

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
=====================

[](#fotolias-api-line-up)

Partner API
-----------

[](#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](http://www.fotolia.com/Services/API/Partner "Fotolia Partner API")

Business API
------------

[](#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](http://www.fotolia.com/Services/API/Business "Fotolia Business API")

Reseller API
------------

[](#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](http://www.fotolia.com/Services/API/Reseller "Fotolia Reseller API")

Content of this package
=======================

[](#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.

PHP
---

[](#php)

Requirements:

- [PHP &gt;= 5.2](http://www.php.net)
- [PHP cURL extension](http://www.php.net/curl)

.Example usage

```
#!/usr/bin/env php
getSearchResults(
    array(
        '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');
print_r($api->getUserData());

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

Python
------

[](#python)

Requirements:

- [Python &gt;= 2.7](http://python.org/)
- [pycurl extension](http://pycurl.sourceforge.net/)

.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():
    try:
        int(key)
        print "matching media ID: %d" % value['id']
    except ValueError:
        # iterating only over numeric keys and silently skip other keys
        pass

# 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']))
```

Java
----

[](#java)

Requirements:

- [apache common HTTP client](http://hc.apache.org)
- [json simple](http://code.google.com/p/json-simple/)
- [java JDK &gt;= 6.26](http://www.java.com)

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
        System.out.println(client.getMediaData(18136053));

        // searching files
        FotoliaSearchQuery query = new FotoliaSearchQuery();
        query.setWords("car").setLanguageId(FotoliaApi.LANGUAGE_ID_EN_US).setLimit(1);
        System.out.println(client.getSearchResults(query));

        // 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) {
            e.printStackTrace();
        }
    }
}
```

Informations
------------

[](#informations)

Email:

[Google Groups](http://groups.google.com/group/FotoliaAPI?pli=1 "Fotolia API Google Group")

[Online Documentation](http://us.fotolia.com/Services/API/Rest/Documentation "Fotolia REST API Documentation")

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4750d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fb9911f00cf55169c1adc4489afcd758a405174dc796163becac4a6860d69df?d=identicon)[orfin](/maintainers/orfin)

---

Top Contributors

[![slaanesh](https://avatars.githubusercontent.com/u/413456?v=4)](https://github.com/slaanesh "slaanesh (23 commits)")[![defro](https://avatars.githubusercontent.com/u/25364?v=4)](https://github.com/defro "defro (2 commits)")[![coderua](https://avatars.githubusercontent.com/u/1074951?v=4)](https://github.com/coderua "coderua (1 commits)")[![halfer](https://avatars.githubusercontent.com/u/480975?v=4)](https://github.com/halfer "halfer (1 commits)")[![Manackkel](https://avatars.githubusercontent.com/u/2063894?v=4)](https://github.com/Manackkel "Manackkel (1 commits)")

---

Tags

apifotolia

### Embed Badge

![Health badge](/badges/imagin-fotolia-api/health.svg)

```
[![Health](https://phpackages.com/badges/imagin-fotolia-api/health.svg)](https://phpackages.com/packages/imagin-fotolia-api)
```

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
