PHPackages                             gettyimages/gettyimages-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. [Search &amp; Filtering](/categories/search)
4. /
5. gettyimages/gettyimages-api

ActiveLibrary[Search &amp; Filtering](/categories/search)

gettyimages/gettyimages-api
===========================

Getty Images API SDK - PHP

6.0.0(5mo ago)14161.1k↓14%14[1 issues](https://github.com/gettyimages/gettyimages-api_php/issues)MITPHPPHP &gt;=8.3CI passing

Since Oct 1Pushed 5mo ago8 watchersCompare

[ Source](https://github.com/gettyimages/gettyimages-api_php)[ Packagist](https://packagist.org/packages/gettyimages/gettyimages-api)[ Docs](https://developers.gettyimages.com)[ RSS](/packages/gettyimages-gettyimages-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (24)Used By (0)

Getty Images API SDK - PHP
==========================

[](#getty-images-api-sdk---php)

[![Build Status](https://camo.githubusercontent.com/95d38346e029fd488accecddf686255aed5ced31c5968f97b75ac171c8b9e8a0/68747470733a2f2f7472617669732d63692e6f72672f6765747479696d616765732f6765747479696d616765732d6170695f7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/gettyimages/gettyimages-api_php)

Introduction
------------

[](#introduction)

This SDK makes using the Getty Images [API](http://developers.gettyimages.com) easy. It handles credential management, makes HTTP requests and is written with a fluent style in mind. For more info about the API, see the [Documentation](https://developers.gettyimages.com/api/).

- Search for images and videos from our extensive creative and editorial catalogs.
- Get image and video metadata.
- Download files using your Getty Images products (e.g., Editorial subscriptions, Easy Access, Thinkstock Subscriptions, and Image Packs).
- Custom Request functionality that allows user to call any endpoint.

Help &amp; Support
------------------

[](#help--support)

- [Getty Images API](http://developers.gettyimages.com/)
- [Issue Tracker](https://github.com/gettyimages/gettyimages-api_php/issues)

Getting started
---------------

[](#getting-started)

### Obtain an API Key

[](#obtain-an-api-key)

If you don't already have an API key, fill out and submit the [contact form](http://engage.gettyimages.com/api-contact) to be connected to our Sales team.

### Installing the package

[](#installing-the-package)

The SDK is available on [Packagist](https://packagist.org/packages/gettyimages/gettyimages-api).

Examples
--------

[](#examples)

See [example.md](https://github.com/gettyimages/gettyimages-api_php/blob/master/examples/example.md) for examples.

Building From Source Code
-------------------------

[](#building-from-source-code)

*Source code is only needed if you would like to contribute to the project. Otherwise, use the [package](https://packagist.org/packages/gettyimages/gettyimages-api)*

Initial Setup
-------------

[](#initial-setup)

### Assumptions

[](#assumptions)

- You have PHP &gt;=7.2 setup

### PHP.ini settings to build the code

[](#phpini-settings-to-build-the-code)

```
[Phar]
; http://php.net/phar.readonly
phar.readonly = Off

//Extensions needed for Windows OSs
extension=php_curl.dll
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_sockets.dll
extension=php_openssl.dll

```

Install via Composer
--------------------

[](#install-via-composer)

Please refer to [README\_ComposerInstall.md](./README_ComposerInstall.md)

Quick Build
-----------

[](#quick-build)

If everything is setup on your machine where PHP will run, you can most likely run BuildSDK.bat or Build.sh to automatically build the phar. If something fails please read the error messages, PHP can have a finicky setup if you've never tried to use it to build a package before.

### Windows

[](#windows)

```
build.bat

```

### Linux / OSX

[](#linux--osx)

#### Prerequisites

[](#prerequisites)

On Ubuntu, you may need to install a few additional packages

```
sudo apt update
sudo apt install php-xml php-mbstring
```

#### Building

[](#building)

```
./build.sh
```

This will put GettyImagesApi.phar in a build folder. Then you can use the package as you would any other phar.

The build does a few things for you automatically

1. Determines if you have composer.phar and will retrieve it if you don't have it
2. Runs `composer install` to get dependencies that are outlined in the composer.json file
3. Then produces the phar file in ./build/GettyImagesApi.phar

Manually Installing PHP libraries
---------------------------------

[](#manually-installing-php-libraries)

BuildSDK should get all the dependencies for you but if you want to do the update without a build From the root of the repository

```
php composer.phar install

```

### If you want the test dependencies

[](#if-you-want-the-test-dependencies)

```
php composer.phar install --require-dev

```

This command should install PHPUnit and any other php dependency libraries

Environment variables of interest
---------------------------------

[](#environment-variables-of-interest)

The sdk does support using a proxy directly as well as ignoring ssl validation errors. This can be configured through the existense environment variables

```
GettyImagesApi_IgnoreSSLValidation
GettyImagesApi_UseProxy

```

### \*nix Shell Example:

[](#nix-shell-example)

```
export GettyImagesApi_IgnoreSSLValidation=TRUE
export GettyImagesApi_UseProxy=127.0.0.0:8888

```

### Windows CMD Example:

[](#windows-cmd-example)

```
set GettyImagesApi_IgnoreSSLValidation=TRUE
set GettyImagesApi_UseProxy=127.0.0.0:8888

```

### Powershell Example

[](#powershell-example)

```
$env:GettyImagesApi_IgnoreSSLValidation=TRUE
$env:GettyImagesApi_UseProxy="127.0.0.0:8888"

```

Tests
-----

[](#tests)

### Running unit tests

[](#running-unit-tests)

The test project contains unit tests written using the [PHPUnit Framwork](https://phpunit.de/index.html).

### Execute the unit tests

[](#execute-the-unit-tests)

#### Assumptions

[](#assumptions-1)

- You have PHPUnit installed

To execute all of the unit tests: ./vendor/bin/phpunit --bootstrap vendor/autoload.php unitTests/.

To execute one test class: ./vendor/bin/phpunit --bootstrap vendor/autoload.php unitTests/EXAMPLETEST

Maintainers
-----------

[](#maintainers)

To publish a new version to [Packagist](https://packagist.org/packages/gettyimages/gettyimages-api), create a new release with an updated tag. A webhook will notify Packagist to grab the latest version.

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance68

Regular maintenance activity

Popularity43

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~185 days

Recently: every ~270 days

Total

23

Last Release

175d ago

Major Versions

1.0.4-beta → 2.0.02015-05-12

2.1.3 → 3.0.02018-03-01

3.1.0 → 4.0.02019-12-10

4.2.0 → 5.0.02023-01-27

5.1.1 → 6.0.02025-11-24

PHP version history (3 changes)1.0.0PHP &gt;=5.4.0

3.0.0PHP &gt;=7.0

6.0.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c1060e9cfdfcc501bf48513a50bccc4161f60dc7765b2a806a87a2891c38221?d=identicon)[smallperuvian](/maintainers/smallperuvian)

![](https://www.gravatar.com/avatar/8d0825a005e6149affdf32bd2054a46d3cfa73096c99398c90a6865c0ac4d306?d=identicon)[mapitman](/maintainers/mapitman)

---

Top Contributors

[![mapitman](https://avatars.githubusercontent.com/u/4205286?v=4)](https://github.com/mapitman "mapitman (44 commits)")[![CaseyMacPherson](https://avatars.githubusercontent.com/u/914185?v=4)](https://github.com/CaseyMacPherson "CaseyMacPherson (41 commits)")[![ssterli2](https://avatars.githubusercontent.com/u/20978446?v=4)](https://github.com/ssterli2 "ssterli2 (30 commits)")[![paulkrugGetty](https://avatars.githubusercontent.com/u/6945346?v=4)](https://github.com/paulkrugGetty "paulkrugGetty (12 commits)")[![jeffgoo](https://avatars.githubusercontent.com/u/732095?v=4)](https://github.com/jeffgoo "jeffgoo (8 commits)")[![Sarukod](https://avatars.githubusercontent.com/u/5098149?v=4)](https://github.com/Sarukod "Sarukod (7 commits)")[![ChrisSimmons](https://avatars.githubusercontent.com/u/301247?v=4)](https://github.com/ChrisSimmons "ChrisSimmons (4 commits)")[![tuco86](https://avatars.githubusercontent.com/u/1265813?v=4)](https://github.com/tuco86 "tuco86 (3 commits)")[![WillJW](https://avatars.githubusercontent.com/u/1878977?v=4)](https://github.com/WillJW "WillJW (1 commits)")[![ionutcalara](https://avatars.githubusercontent.com/u/5338839?v=4)](https://github.com/ionutcalara "ionutcalara (1 commits)")[![jphillips-gettyimages](https://avatars.githubusercontent.com/u/5446116?v=4)](https://github.com/jphillips-gettyimages "jphillips-gettyimages (1 commits)")[![mtreuberg](https://avatars.githubusercontent.com/u/1148760?v=4)](https://github.com/mtreuberg "mtreuberg (1 commits)")[![SweetViper](https://avatars.githubusercontent.com/u/8099997?v=4)](https://github.com/SweetViper "SweetViper (1 commits)")[![tistre](https://avatars.githubusercontent.com/u/3024544?v=4)](https://github.com/tistre "tistre (1 commits)")[![aaronbrazell](https://avatars.githubusercontent.com/u/725303?v=4)](https://github.com/aaronbrazell "aaronbrazell (1 commits)")

---

Tags

getty-imagesphpsdksearchimagesphotosphotoembedartistgettygettyimagescreative

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[elasticsearch/elasticsearch

PHP Client for Elasticsearch

5.3k178.3M943](/packages/elasticsearch-elasticsearch)[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[solarium/solarium

PHP Solr client

93432.7M98](/packages/solarium-solarium)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15224.3M65](/packages/opensearch-project-opensearch-php)

PHPackages © 2026

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