NAV Navigation
cURL Node.JS PHP
Landing image that shows people working with an API to create a rocket ship
API reference

Overview

The Shutterstock API provides access to Shutterstock's library of media, as well as information about customers' accounts and the contributors that provide the media. It allows customer platforms to search for media, view information and previews for the media, and license and download media.

This documentation provides information about each endpoint in the API. The right-hand pane of this page shows example requests and responses for each endpoint in cURL, Node.js/JavaScript, and PHP. The PHP examples requires PHP 5.4 or greater, plus the curl and json modules.

You can also load a collection of the endpoints into the REST API client Postman by clicking this button:

For FAQs about the API, see Frequently asked questions.

Getting started

Follow these steps to start licensing media:

  1. Create an application. To license media, you also need a paid subscription, but the API provides a free option for you to try out the API without licensing media. For information about applications and subscriptions, see Subscriptions.
  2. Authenticate to the API to get a token. Authentication is required for all endpoints in the Shutterstock public API. The API accepts HTTP basic authentication for some endpoints and OAuth authentication for all endpoints. See Authentication.
  3. Use the GET /v2/user/subscriptions endpoint to get your subscription ID.
  4. Use the licensing endpoint for the media type to license media, such as the POST /v2/images/licenses endpoint for images.

Examples

This API reference includes examples in several programming languages. Most of the examples assume that your OAuth token is in the SHUTTERSTOCK_API_TOKEN environment variable.

Examples for cURL

The cURL examples work on the command line of many operating systems, including Windows, MacOS, and Linux, though you may need to install the cURL program.

Examples for JavaScript and Node.JS

The examples for JavaScript and Node.JS use the Shutterstock JavaScript SDK. To install the SDK, run yarn add shutterstock-api or npm install shutterstock-api --save from the command line.

As an alternative to using the SDK, you can make requests with any JavaScript HTTPS request library. Regardless of which library you use, you must ensure that your request includes the user-agent header. Some libraries include this header automatically and others do not.

Examples for PHP

The PHP examples require the curl and json PHP modules.

Basic requests

Basic request: searching for images

curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=hiking" \
--data-urlencode "image_type=photo" \
--data-urlencode "orientation=vertical" \
--data-urlencode "people_number=3"
$queryFields = [
  "query" => "hiking",
  "image_type" => "photo",
  "orientation" => "vertical",
  "people_number" => 3
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "query": "hiking",
  "image_type": "photo",
  "orientation": "vertical",
  "people_number": 3
};

imagesApi.searchImages(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

After you have authenticated to the API, you can send requests to the API using any programming language or program that can send HTTP requests. The base URL for all endpoints is https://api.shutterstock.com. For examples, see the right-hand pane.

Languages

Get the list of image categories in Spanish

curl -X GET "https://api.shutterstock.com/v2/images/categories" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "language=es"
$queryFields = [
  "language" => "es"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/categories?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "language": "es"
};

imagesApi.getImageCategories(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Example response

[
  {"id":"26","name":"Abstractos"},
  {"id":"1","name":"Animales/ Naturaleza"},
  {"id":"11","name":"Las Artes"},
  {"id":"3","name":"Fondos/Texturas"},
  {"id":"27","name":"Belleza/Moda"},
  {"id":"2","name":"Edificios/Lugares Famosos"},
  {"id":"4","name":"Negocios/Finanzas"},
  {"id":"5","name":"Educación"}
]

Some endpoints can accept or return data in multiple languages. For example, the GET /v2/images/search and GET /v2/videos/search endpoints can accept search terms in languages other then English, and they return metadata properties such as categories and keywords in the specified language. Other endpoints such as the GET /v2/images/{id} and GET /v2/videos/{id} endpoints can return metadata properties such as categories and keywords in languages other than English. Not all response data is translated, and not all endpoints support languages other than English.

To search or return data in a language other than English, pass the language code (such as fr or zh-Hant) in the language query parameter or the Accept-Language header, as in the example in the right-hand pane.

For examples of searching in different languages, see Localizing searches.

For the list of languages that the API accepts, see the Language schema.

Responses

Example search response

{
  "page": 1,
  "per_page": 1,
  "total_count": 1070,
  "search_id": "rTBCE8T2weANh6pK85Fdvw",
  "data": [
    {
      "id": "1105302317",
      "aspect": 0.6667,
      "assets": {
        "preview": {
          "height": 450,
          "url": "https://image.shutterstock.com/display_pic_with_logo/3265442/1105302317/stock-photo-a-woman-with-children-goes-hiking-the-woman-took-her-sons-by-the-arms-the-family-goes-on-a-dirt-1105302317.jpg",
          "width": 300
        },
        "small_thumb": {
          "height": 100,
          "url": "https://thumb7.shutterstock.com/thumb_small/3265442/1105302317/stock-photo-a-woman-with-children-goes-hiking-the-woman-took-her-sons-by-the-arms-the-family-goes-on-a-dirt-1105302317.jpg",
          "width": 67
        },
        "large_thumb": {
          "height": 150,
          "url": "https://thumb7.shutterstock.com/thumb_large/3265442/1105302317/stock-photo-a-woman-with-children-goes-hiking-the-woman-took-her-sons-by-the-arms-the-family-goes-on-a-dirt-1105302317.jpg",
          "width": 100
        },
        "huge_thumb": {
          "height": 260,
          "url": "https://image.shutterstock.com/image-photo/woman-children-goes-hiking-took-260nw-1105302317.jpg",
          "width": 173
        },
        "preview_1000": {
          "url": "https://ak.picdn.net/shutterstock/photos/1105302317/watermark_1000/af3ff3de71d94d7739337e0c35debfb3/preview_1000-1105302317.jpg",
          "width": 667,
          "height": 1000
        },
        "preview_1500": {
          "url": "https://image.shutterstock.com/z/stock-photo-a-woman-with-children-goes-hiking-the-woman-took-her-sons-by-the-arms-the-family-goes-on-a-dirt-1105302317.jpg",
          "width": 1000,
          "height": 1500
        }
      },
      "contributor": {
        "id": "3265442"
      },
      "description": "A woman with children goes hiking. The woman took her sons by the arms. The family goes on a dirt road. The boy walks with his brother and mother in the forest. Hike with backpacks. Fisheye lens",
      "image_type": "photo",
      "media_type": "image"
    }
  ],
  "spellcheck_info": {}
}

Successful requests return a 200, 201, or 204 response code. For error responses, see Errors.

Some endpoints return information in JSON format. In most cases, the metadata is in the root fields of the JSON data, and the data about the media is in a data field. Most programming languages have libraries that can accept and manipulate JSON data.

Some API subscriptions return a limited set of results. See Subscriptions.

Paging responses

Paging search results

curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=giraffes" \
--data-urlencode "page=2" \
--data-urlencode "per_page=5"
$queryFields = [
  "query" => "giraffes",
  "page" => 2,
  "per_page" => 5
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "query": "giraffes",
  "page": 2,
  "per_page": 5
};

imagesApi.searchImages(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Many endpoints, including search endpoints, split long response data into multiple pages with the page and per_page parameters. For example, if a search result has 20 pieces of media, you can retrieve items 6-10 by using page=2 and per_page=5 in the request, as shown in the examples in the right-hand pane. You can show up to 500 results per page for most requests. Some endpoints have different limits; see the description of the per_page parameter for the individual endpoints.

Sorting results

Sorting search results

curl -X GET "https://api.shutterstock.com/v2/videos/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=boats" \
--data-urlencode "sort=popular"


curl -X GET "https://api.shutterstock.com/v2/audio/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "instruments=Piano" \
--data-urlencode "duration_from=300"
--data-urlencode "sort=bpm" \
--data-urlencode "sort_order=desc"
$videoQueryFields = [
  "query" => "boats",
  "sort" => "popular"
];

$videoOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/search?" . http_build_query($videoQueryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$videoHandle = curl_init();
curl_setopt_array($videoHandle, $videoOptions);
$videoResponse = curl_exec($videoHandle);
curl_close($videoHandle);

$videoDecodedResponse = json_decode($videoResponse);
print_r($videoDecodedResponse);


$audioQueryFields = [
  "query" => "Piano",
  "duration_from" => 300,
  "sort" => "bpm",
  "sort_order" => "desc"
];

$audioOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/search?" . http_build_query($audioQueryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$audioHandle = curl_init();
curl_setopt_array($audioHandle, $audioOptions);
$audioResponse = curl_exec($audioHandle);
curl_close($audioHandle);

$audioDecodedResponse = json_decode($audioResponse);
print_r($audioDecodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const videoQueryParams = {
  "query": "boats",
  "sort": "popular"
};

videosApi.searchVideos(videoQueryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

const audioApi = new sstk.AudioApi();

const audioQueryParams = {
  "query": "Piano",
  "duration_from": 300,
  "sort": "bpm",
  "sort_order": "desc"
};

audioApi.searchAudio(audioQueryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

The sort parameter controls how results are ordered. By default, image and video searches return the most popular media first. Audio searches without the sort parameter return tracks based on the popularity of that track in the location of the request.

The image and video search endpoints can order results in the following ways:

The audio search endpoint can sort results in the following ways:

For audio only, you can use the sort_order parameter to return results in ascending ("asc") or descending ("desc", the default) order.

Full view and minimal view

Showing full detail in the results

curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=airplane" \
--data-urlencode "view=full"
$queryFields = [
  "query" => "airplane",
  "view" => "full"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "query": "airplane",
  "view": "full"
};

imagesApi.searchImages(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

The view parameter on some search and informational endpoints controls how much detail is shown in the response. By default (view=minimal), the response includes a moderate amount of detail about each search result, but if you set the view parameter to full, the response includes complete information about each result. For example, full image results include the full list of keywords and categories that apply to each image.

For examples of the results, see Results.

Showing only specific fields

Image search with fields parameter

curl -X GET "https://api.shutterstock.com/v2/images/search" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=dolphins" \
--data-urlencode "fields=data(id,assets/preview/url)"
$queryFields = [
  "query" => "kites",
  "fields" => "data(id,assets/preview/url)"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const axios = require("axios");

axios.get("https://api.shutterstock.com/v2/images/search", {
  "params": {
    "query": "kites",
    "fields": "data(id,assets/preview/url)"
  },
  "headers": {
    "Authorization": `Bearer ${process.env.SHUTTERSTOCK_API_TOKEN}`,
    "User-Agent": "request"
  }
})
  .then(({ data }) => {
    console.log(JSON.stringify(data.data, null, 2));
  })
  .catch((error) => {
    console.error(error);
  });

Example response

{
  "data": [
    {
      "id": "547308685",
      "assets": {
        "preview": {
          "url": "https://image.shutterstock.com/display_pic_with_logo/567127/547308685/stock-photo-dolphin-547308685.jpg"
        }
      }
    },
    {
      "id": "794200186",
      "assets": {
        "preview": {
          "url": "https://image.shutterstock.com/display_pic_with_logo/1758188/794200186/stock-vector-silhouettes-of-dolphins-set-vector-illustration-794200186.jpg"
        }
      }
    },
    {
      "id": "388057081",
      "assets": {
        "preview": {
          "url": "https://image.shutterstock.com/display_pic_with_logo/324673/388057081/stock-photo-three-beautiful-dolphins-jumping-over-breaking-waves-hawaii-pacific-ocean-wildlife-scenery-marine-388057081.jpg"
        }
      }
    }
  ]
}

You can limit the information shown further with the fields parameter. You pass one or more fields and the API returns only those fields. The examples in the right pane perform an image search and return only the ID of the image and a link to a preview image. The value of the fields parameter specifies fields in the same way that Google supports it across many of their APIs. For more information, see Partial responses in the Google API documentation.

To specify the fields to return, use slashes to indicate the position of the field in the hierarchy of the normal JSON response. For example, the value data(id,assets/preview/url) returns the data.id field and the data.assets.preview.url field.

The JavaScript SDK does not support the fields parameter, so you must use an HTTP request library as in the example in the right-hand column.

Errors

The API returns error codes such as 400, 403, 404, and 500 along with information about the error. Here are some common error responses:

{
  "message": "Validation failed",
  "errors": [
    {
      "code": "VALIDATION_OBJECT_REQUIRED",
      "message": "Missing required property: name",
      "path": "$.body.name"
    }
  ]
}

A 400 Bad Request response often means that the request body is improperly formatted or missing required fields. In the case of missing fields, the response includes the name of the field that is missing, as in the example in the right-hand column.

A 401 Unauthorized response often means that the request did not include a valid OAuth token or basic authentication credentials. See Authentication.

A 403 Forbidden response can mean that the token in the request does not contain the scopes that the endpoint requires.

A 404 Not Found response can mean that the media, license, or collection you are trying to access does not exist.

A 500 Internal Server Error response means that an error happened on the server. This can mean that the request is not valid, such as if you try to delete or edit a collection that does not exist, or if the API otherwise can't do what you requested. It can also mean a temporary problem with the API. Check your request and try again or contact us.

Licensing errors

Licensing error response

{
  "data": [
  {
    "image_id": "14204581221111111",
    "error": "Media unavailable"
  }
],
"errors": [
  {
    "message": "Failed to license 1 image",
    "items": [
      {
        "image_id": "14204581221111111",
        "index": 0
      }
      ]
    }
  ]
}

The licensing endpoints return the same errors as other endpoints for authentication problems, such as if the token is not valid. For other problems, such as if the requested media is not found, the licensing endpoints return a 200 OK response and an error message in the response body.

For example, if you try to license an image but provide an invalid image ID, the response body includes the message "Media unavailable," as in the example in the right-hand column.

Rate limits

Depending on the subscription type, some applications are limited to a certain number of API requests per minute. If your application exceeds its limit, the API returns an error response with a status code of 429. To request a higher rate limit, contact us.

Subscriptions

To access the API, you need an API application and an API subscription or free account. To get started, see the API subscription page.

These API subscriptions are separate from the subscriptions that are available on the Shutterstock web site, so be sure to get an API subscription if you want to work with the API. See https://www.shutterstock.com/api/pricing.

You can use an API subscription to license and download media only with the API; API subscriptions don't work on the Shutterstock web site. If you have a subscription that does not include API access and want to use it with the API, contact us.

To test your subscription, see Licensing sandbox.

This table summarizes what you can do with each type of API subscription. For specifics about your subscription, refer to your account.

Capability No API subscription Standard API subscription Business API subscription
Image library Limited library Expanded library Complete Shutterstock library
Maximum API requests per minute Limited Limited Custom
Number of search results Limited Limited Unlimited
License and download images No One at a time Many at a time
View image, video, and track details Yes Yes Yes
Create collections Yes Yes Yes
Access unwatermarked images No Yes Yes
Use reverse image search and similar image search No No Yes
Embed Shutterstock Editor No No Yes

If your subscription provides access to the limited media library, all requests that you make to the API provide results only from that limited library, including search, details, and licensing requests. For this reason, you might see different media by searching on the API versus searching on shutterstock.com. Before trying to license media, make sure that you can access it through the API with your API subscription.

To get your subscription ID, use the GET /v2/user/subscriptions endpoint. If you have issues with API access, Contact us.

Applications

To access the REST API you need an application, which represents the application, program, or computer commands that are accessing the API. To use the API, you need the application's consumer key and consumer secret, which are shown on the https://www.shutterstock.com/account/developers/apps page.

When you have the application's consumer key and consumer secret, you can use them to access the API directly or to request a token that you can use to access the API. For more information on these methods of authentication, see Authentication.

To create an application:

  1. Log in at shutterstock.com, go to your account page, and and click Developers.
  2. On the Developers page, click Create new app.
  3. On the Create New App popup, fill in these fields:
    • App name: Specify any name that describes your application.
    • Callback URL: Specify a comma-separated list of the host names (not full URLs) where your application is running. If you’ve got an application running on a server, use the host name of the server. Otherwise, leave the default host name localhost for testing purposes.
    • Referrer: If you are using referrer authentication, specify a comma-separated list of valid referrer domains. Each item in the list must match one of the callback host names. The API accepts only requests that have an HTTP Referrer header from this list. Otherwise, leave this field blank.
    • Included products: This list shows the API products that the application has access to. To get access to other products, contact your Shutterstock representative, visit the Pricing page or contact us.
    • Company name: The name of your company.
    • Website: Your company's web site.
    • Intended use: Select an option that describes how you will use the API.
    • Description: Describe in detail how the application will use the API.
    • Terms of service: Read an accept the Terms of Service.
  4. Click Save.

The new application appears on the My apps page. Each application has a consumer key and a consumer secret. You use this consumer key and consumer secret either to use the API directly with basic authentication or to request a token for OAuth authentication; see Authentication. Do not share your key and secret, because they can be used to access your account through the API.

Products

Each application has access to one or more API products. These products control the level of access that the application has to the API and the Shutterstock media library. These products are separate from the subscriptions that control how many assets you can license and download.

If you create an application without buying an API subscription first, the application uses the free API product, which is labeled as the "Self Serve" product. Applications that use this free API product can search and view media but not license or download media. If you have a paid API subscription, your applications use an API product with additional access to license and download media, within the limitations of the subscription. Other products include access to computer vision and editorial endpoints.

To tell which API products your application is using, open your applications, expand your application, and go to its Details tab.

Authentication

All endpoints in the Shutterstock API require authentication. The API accepts HTTP basic authentication for some endpoints and OAuth authentication for all endpoints.

All requests must also specify a User-Agent header. The value of this header should either be the type of client, such as "NodeJS" or "Python," or the name of the customer's application.

Before you authenticate to the API, you need an API subscription and an API application. See Subscriptions.

Basic authentication

The API accepts HTTP basic authentication (also known as basic authentication) for some endpoints that do not access specific customer information. Follow these steps to use basic authentication:

curl -X GET --user 123abc456def:1a2b3c4d \
https://api.shutterstock.com/v2/images/search \
-G \
--data-urlencode "query=sunrise"
$queryFields = [
  "query" => "sunrise"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
  CURLOPT_USERPWD => "123abc456def:1a2b3c4d",
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

const applicationClientId = "123abc456def";
const applicationClientSecret = "1a2b3c4d";
sstk.setBasicAuth(applicationClientId, applicationClientSecret);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "query": "kites",
  "image_type": "photo",
  "page": 1,
  "per_page": 5,
  "sort": "popular",
  "view": "minimal"
};

imagesApi.searchImages(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
  1. Create an account at https://www.shutterstock.com if you don't already have one.
  2. Set up an application at https://developers.shutterstock.com/user/me/apps and get the consumer key and consumer secret from the application.
  3. Pass the consumer key and consumer secret to the API along with the request. For example, you can use basic authentication to search for images by using the GET /v2/images/search endpoint. The example in the right-hand pane passes the ID and secret (in this case, 123abc456def and 1a2b3c4d) in place of a user name and password.

API endpoints that require an OAuth scope do not accept basic authentication. To use these endpoints, you must use OAuth authentication.

OAuth authentication

Most endpoints require OAuth 2.0 authentication. In this type of authentication, you use an application and an individual user's login credentials to obtain a token. Then you can use that token as credentials for API requests in place of a user name and password.

Some endpoints require one or more scopes, or permissions, which let the user control what the application can do with the token. For example, to edit a user's collections, the token must include the collections.edit scope. Applications can request multiple tokens with different scopes or a single token with multiple scopes.

Follow these steps to use OAuth authentication:

Get a temporary authentication code

curl -X GET "https://api.shutterstock.com/v2/oauth/authorize" \
-G \
--data-urlencode "scope=licenses.create licenses.view purchases.view" \
--data-urlencode "state=demo_`date +%s`" \
--data-urlencode "response_type=code" \
--data-urlencode "redirect_uri=http://localhost:3000/callback" \
--data-urlencode "client_id=$CLIENT_ID"
$queryFields = [
  "scope" => "licenses.create,licenses.view,purchases.view",
  "state" => "demo_" . microtime(true),
  "response_type" => "code",
  "redirect_uri" => "http://localhost:3000/callback",
  "client_id" => "$clientId"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/oauth/authorize?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const axios = require("axios");

axios.get("https://api.shutterstock.com/v2/oauth/authorize", {
  "params": {
    "scope": "licenses.create licenses.view purchases.view",
    "state": "demo_" + Math.round(new Date() / 1000),
    "response_type": "code",
    "redirect_uri": "http://localhost:3000/callback",
    "client_id": clientId
  },
  // Don't follow the redirect because this program is not running in a browser
  "maxRedirects": 0,
})
  .catch(({ response }) => {
    // HTTP 302: Redirect
    console.log(response.data);
  });
  1. Create an account at https://www.shutterstock.com if you don't already have one.

  2. Set up an application at https://developers.shutterstock.com and get the consumer key and consumer secret from the application.

  3. Give the application a callback host name. If you've got an application running on a server, use the host name of the server. Otherwise, leave the default host name localhost for testing purposes.

  4. Pass your consumer key to the GET /v2/oauth/authorize endpoint to get a temporary authentication code. See the right-hand pane for an example.

    Use these parameters:

    • client_id: The consumer key from your application on https://developers.shutterstock.com.
    • redirect_uri: The callback URI for your application. This callback URI must use a host name that you set up in your application. (Again, for testing purposes, you can use "localhost," as in http://localhost:3000/callback.)
    • response_type: Specify code to receive a temporary authentication code that you can use to get an access token.
    • scope: A space-separated list of scopes (or permissions) for the token. See OAuth scopes.
    • state: A value that the endpoint passes back to your application so you can include other information or verify that the request worked.

    The endpoint returns a 302 return code and a URL. Here's an example:

    Moved Temporarily. Redirecting to https://accounts.shutterstock.com/login?next=%2Foauth%2Fauthorize%3Fscope%3Dlicenses.create%20licenses.view%20purchases.view%26state%3Ddemo_1498496256%26response_type%3Dcode%26redirect_uri%3Dhttp%3A%2F%2Flocalhost%3A3000%2Fcallback%26client_id%3DCLIENT_ID%26realm%3Dcustomer

  5. Open the URL in a web browser, log in, and allow your Shutterstock account to access the callback host name. The Permission Request window lets you make sure that you want to let programs with the token access your Shutterstock account with the specific permissions: The Permission Request window, showing the scopes that your application will have by using the token

    When you click Allow, the Shutterstock API redirects your web browser to the callback URL with information in the parameters. If you don't have a full application set up yet, the browser gives an error because the web page isn't available, but that's OK because for now, all you need is the URL. Here's an example:

    http://localhost:3000/callback?code=ABC123&state=demo_1498496256

    For testing the API, copy the authentication code from the URL (in the previous example, it's ABC123) and use it in the next step. When you're ready to code a complete application, you can set it up to embed or refer to the login web page, accept the request from this URL, and store the information from the URL parameters. This code can be used only once, and it expires after 5 minutes.

  6. Finally, authenticate to the API and get an access token. To request a token that does not expire, specify expires=false or omit the expires parameter. To request a token that expires after one hour and then can be refreshed, specify expires=true.

Use the authentication code to get a token

curl -X POST "https://api.shutterstock.com/v2/oauth/access_token" \
--data-urlencode "client_id=$CLIENT_ID" \
--data-urlencode "client_secret=$CLIENT_SECRET" \
--data-urlencode "grant_type=authorization_code" \
--data-urlencode "expires=false" \
--data-urlencode "code=$CODE"
$body = [
  "client_id" => $clientId,
  "client_secret" => $clientSecret,
  "grant_type" => "authorization_code",
  "expires" => false,
  "code" => $code
];
$encodedBody = json_encode($body);
$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/oauth/access_token",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const axios = require("axios");

const body = {
  "client_id": clientId,
  "client_secret": clientSecret,
  "grant_type": "authorization_code",
  "expires": false,
  "code": code
};

axios.post("https://api.shutterstock.com/v2/oauth/access_token", body)
  .then((res) => {
    console.log(res);
  });

Use the POST /v2/oauth/access_token endpoint, as in the example in the right-hand pane. The parameters for this endpoint include the application's consumer key, consumer secret, and the code you got from the URL in the previous step.

This endpoint returns the access token in a JSON response. If you requested a token that does not expire, the API returns an access token that starts with v2/, as in this example:

{"access_token":"v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a","token_type":"Bearer"}

If you requested a token that expires, the API returns an access token that starts with 1/ and a refresh token, as in this example. You will need the refresh token to refresh the access token later.

{"access_token":"1/eyJjbGllbnRfaWQiOiJjNDc4Yi0yNjYzMC1","expires_in":3600,"token_type":"Bearer","user_token":"eyJhbGciOiTtcXy71dhyfjBVU","refresh_token":"3/d_0F6_AmGRO5a7NNhjdCwobDudbdvDNdPQTWV1IovpWPgWy"}

Search for images

curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a" \
-G \
--data-urlencode "query=kites" \
--data-urlencode "image_type=photo" \
--data-urlencode "page=1" \
--data-urlencode "per_page=5" \
--data-urlencode "sort=popular" \
--data-urlencode "view=minimal"
$queryFields = [
  "query" => "kites",
  "image_type" => "photo",
  "page" => 1,
  "per_page" => 5,
  "sort" => "popular",
  "view" => "minimal"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken("Bearer v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a");

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "query": "kites",
  "image_type": "photo",
  "page": 1,
  "per_page": 5,
  "sort": "popular",
  "view": "minimal"
};

imagesApi.searchImages(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Now you can use the token to access the API by passing it as an authorization header, as in the example of searching for images to the right. Further examples in this documentation assume that you put the token in the SHUTTERSTOCK_API_TOKEN environment variable, but you can also store the token in a variable in your code. Specifically, the cURL and Node.js examples are designed to use the environment variable and PHP assumes that the token is in the code.

Keep this token private, because other people could use it to access the account's subscriptions and media.

You can use the same application to get tokens for any number of users. Just repeat the request to the GET /v2/oauth/authorize endpoint with the application information and then sign in as a different user. Each token is tied to the user's account.

For more information about these endpoints, see OAuth.

Refreshing tokens

Refreshing a token

curl -X POST "https://api.shutterstock.com/v2/oauth/access_token" \
--data-urlencode "client_id=$CLIENT_ID" \
--data-urlencode "client_secret=$CLIENT_SECRET"
--data-urlencode "grant_type=refresh_token" \
--data-urlencode "refresh_token=$REFRESH_TOKEN" \
$body = [
  "client_id" => $clientId,
  "client_secret" => $clientSecret,
  "grant_type" => "refresh_token",
  "refresh_token" => $refreshToken
];
$encodedBody = http_build_query($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/oauth/access_token",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const axios = require("axios");

const body = {
  "client_id": clientId,
  "client_secret": clientSecret,
  "grant_type": "refresh_token",
  "refresh_token": refreshToken,
};

axios.post("https://api.shutterstock.com/v2/oauth/access_token", body)
  .then((res) => {
    console.log(res);
  })
  .catch((err) => {
    console.error(err);
  });

If you requested a token with the parameter expires=true, the token begins with "1/", and it expires in one hour. You can refresh the token to continue using it.

If you requested a token that does not expire, the token does not need to be refreshed. This type of token is valid until the user account that is associated with the token changes its password.

To refresh a token that expires, pass the refresh token, which begins with "3/", to the POST /v2/oauth/access_token endpoint. You must also pass either the consumer secret from the application or the user ID of the user account that is associated with the token. Use these parameters:

The response includes the existing refresh token and a new token that is valid for one hour.

OAuth scopes

Most endpoints require an access token with one or more scopes, or permissions. You can see the scopes that an individual endpoint requires in the endpoint reference.

The following table shows the available scopes.

Scope Description
No scope Grants the user.view scope by default
collections.edit Grants the ability to create collections, edit collections, and modify the contents of collections
collections.view Grants read-only access to collections and their contents
licenses.create Grants the ability to download and license media on behalf of the user
licenses.view Grants read-only access to a user's licenses
purchases.view Grants read-only access to a user's purchase history
user.view Grants read-only access to a user's basic account information (including the user name, id, and first and last name)

Searching for media

Simple image keyword search

curl -X GET "https://api.shutterstock.com/v2/images/search" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=kites"
$queryFields = [
  "query" => "kites"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "query": "kites"
};

imagesApi.searchImages(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Simple video keyword search

curl -X GET "https://api.shutterstock.com/v2/videos/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=hot air balloon"
$queryFields = [
  "query" => "hot air balloon"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const queryParams = {
  "query": "hot air balloon"
};

videosApi.searchVideos(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Simple audio keyword search

curl -X GET "https://api.shutterstock.com/v2/audio/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=bluegrass"
$queryFields = [
  "query" => "bluegrass"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const queryParams = {
  "query": "bluegrass"
};

audioApi.searchAudio(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

To search with a keyword, pass the search keywords to the appropriate endpoint:

The search keywords must be URL encoded and in the query query parameter. The API searches for the keywords in all textual fields, including but not limited to the description, keywords, and title. See the right-hand pane for examples of simple image, video, and audio search requests.

Searches do not support wildcards such as *.

For examples of search results, see Results.

Some API subscriptions return a limited set of results. See Subscriptions.

Search endpoints require basic or OAuth authentication. See Authentication.

Result detail

When you search, you can use the view and fields parameters to control how much data the API returns. See Responses.

Conditional searches

Searches with conditional operators

curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=dog AND cat"

curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=mountain NOT camping"
$inclusionQueryFields = [
  "query" => "dog AND cat"
];

$inclusionOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($inclusionQueryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$inclusionHandle = curl_init();
curl_setopt_array($inclusionHandle, $inclusionOptions);
$inclusionResponse = curl_exec($inclusionHandle);
curl_close($inclusionHandle);

$inclusionDecodedResponse = json_decode($inclusionResponse);
print_r($inclusionDecodedResponse);


$exclusionQueryFields = [
  "query" => "mountain NOT camping"
];

$exclusionOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($exclusionQueryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$exclusionHandle = curl_init();
curl_setopt_array($exclusionHandle, $exclusionOptions);
$exclusionResponse = curl_exec($exclusionHandle);
curl_close($exclusionHandle);

$exclusionDecodedResponse = json_decode($exclusionResponse);
print_r($exclusionDecodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams1 = {
  "query": "dog AND cat"
};

imagesApi.searchImages(queryParams1)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

const queryParams2 = {
  "query": "mountain NOT camping"
};

imagesApi.searchImages(queryParams2)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Searches for images and videos can use AND, OR, and NOT conditions, but searches for audio do not support these keywords.

To use AND, OR, or NOT in searches, you include these operators in the query query parameter. The operators must be in upper case and they must be in English, regardless of the language the keywords are in.

You can group conditional search terms with parentheses. For example, to search for images with either dogs or cats, but not both, use (dog NOT cat) OR (cat NOT dog).

Sorting results

Sorting search results

curl -X GET "https://api.shutterstock.com/v2/videos/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=boats" \
--data-urlencode "sort=popular"


curl -X GET "https://api.shutterstock.com/v2/audio/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "instruments=Piano" \
--data-urlencode "duration_from=300"
--data-urlencode "sort=bpm" \
--data-urlencode "sort_order=desc"
$videoQueryFields = [
  "query" => "boats",
  "sort" => "popular"
];

$videoOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/vidoes/search?" . http_build_query($videoQueryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$videoHandle = curl_init();
curl_setopt_array($videoHandle, $videoOptions);
$videoResponse = curl_exec($videoHandle);
curl_close($videoHandle);

$videoDecodedResponse = json_decode($videoResponse);
print_r($videoDecodedResponse);


$audioQueryFields = [
  "query" => "Piano",
  "duration_from" => 300,
  "sort" => "bpm",
  "sort_order" => "desc"
];

$audioOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/search?" . http_build_query($audioQueryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$audioHandle = curl_init();
curl_setopt_array($audioHandle, $audioOptions);
$audioResponse = curl_exec($audioHandle);
curl_close($audioHandle);

$audioDecodedResponse = json_decode($audioResponse);
print_r($audioDecodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videoApi = new sstk.VideosApi();

const videoQueryParams = {
  "query": "boats",
  "sort": "popular"
};

videoApi.searchVideos(videoQueryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

const audioApi = new sstk.AudioApi();

const audioQueryParams = {
  "query": "Piano",
  "duration_from": 300,
  "sort": "bpm",
  "sort_order": "desc"
};

audioApi.searchAudio(audioQueryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

The sort parameter controls how results are ordered. By default, image and video searches return the most popular media first. Audio searches without the sort parameter return tracks based on the popularity of that track in the location of the request.

The image and video search endpoints can order results in the following ways:

The audio search endpoint can sort results in the following ways:

For audio only, you can use the sort_order parameter return results in ascending ("asc") or descending ("desc," the default) order.

Localizing searches

You can localize searches and their results by setting the language or region for the search.

Search languages

Searching in other languages

curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=chien" \
--data-urlencode "language=fr" \
--data-urlencode "region=fr"

curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=perro" \
--data-urlencode "language=es" \
--data-urlencode "region=es"
$frenchQueryFields = [
  "query" => "chien",
  "language" => "fr",
  "region" => "fr"
];

$frenchOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($frenchQueryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$frenchHandle = curl_init();
curl_setopt_array($frenchHandle, $frenchOptions);
$frenchResponse = curl_exec($frenchHandle);
curl_close($frenchHandle);

$frenchDecodedResponse = json_decode($frenchResponse);
print_r($frenchDecodedResponse);


$spanishQueryFields = [
  "query" => "perro",
  "language" => "es",
  "region" => "es"
];

$spanishOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($spanishQueryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$spanishHandle = curl_init();
curl_setopt_array($spanishHandle, $spanishOptions);
$spanishResponse = curl_exec($spanishHandle);
curl_close($spanishHandle);

$spanishDecodedResponse = json_decode($spanishResponse);
print_r($spanishDecodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParamsFR = {
  "query": "chien",
  "language": "fr",
  "region": "fr"
};

imagesApi.searchImages(queryParamsFR)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

const queryParamsES = {
  "query": "perro",
  "language": "es",
  "region": "es"
};

imagesApi.searchImages(queryParamsES)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

You can provide search keywords in languages other than English by specifying the language code (such as fr or zh-Hant) in the language query parameter or the Accept-Language header. If you set this parameter or header, you can also pass category names in that language. The response includes categories and keywords in that language. For the list of languages that the API accepts, see the Language schema.

Geo-ranking results

You can customize image search results based on location with the region parameter. This parameter accepts a two-character country code. You can also specify an IP address in this parameter and the API infers a country code from it.

Based on the location, the API changes rankings to provide more appropriate results. For example, searches for the term "football" return images of different sports depending on the location. Search results are raised or lowered in relevance based on how well they relate to the location.

Search parameters

Searching with parameters

curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=earthquake" \
--data-urlencode "sort=newest" \
--data-urlencode "image_type=photo"


curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "sort=popular" \
--data-urlencode "category=Holidays"
$newestQueryFields = [
  "query" => "earthquake",
  "sort" => "newest",
  "image_type" => "photo"
];

$newestOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($newestQueryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$newestHandle = curl_init();
curl_setopt_array($newestHandle, $newestOptions);
$newestResponse = curl_exec($newestHandle);
curl_close($newestHandle);

$newestDecodedResponse = json_decode($newestResponse);
print_r($newestDecodedResponse);


$popularQueryFields = [
  "sort" => "popular",
  "category" => "Holidays"
];

$popularOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($popularQueryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$popularHandle = curl_init();
curl_setopt_array($popularHandle, $popularOptions);
$popularResponse = curl_exec($popularHandle);
curl_close($popularHandle);

$popularDecodedResponse = json_decode($popularResponse);
print_r($popularDecodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams1 = {
  "query": "earthquake",
  "sort": "newest",
  "image_type": "photo"
};

api.searchImages(queryParams1)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

const queryParams2 = {
  "sort": "popular",
  "category": "Holidays"
};

imagesApi.searchImages(queryParams2)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Using parameters multiple times

curl -X GET "https://api.shutterstock.com/v2/audio/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "instrument=Trumpet" \
--data-urlencode "instrument=Drums"
$query = "instrument=Trumpet&instrument=Drums";

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/search?$query",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const queryParams = {
  "instrument": ["Trumpet", "Drums"]
};

audioApi.searchAudio(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Aside from the keywords in the query field, search requests can include many other search fields.

Some parameters can accept more than one value. In this case, you can specify the same parameter more than one time, as in the examples in the right-hand pane.

For a complete list of these search parameters, see the API documentation for the search endpoints:

Aspect ratios

To search for images by aspect ratio, specify the ratio as a positive decimal of the width divided by the height. For example, to search for images with a 4:3 aspect ratio, set the aspect_ratio parameter to 1.3333. The search endpoints calculate aspect ratio to four decimal places and return only images that exactly match this decimal aspect ratio.

Images with a higher aspect ratio are wider and images with a lower aspect ratio are narrower. Images with a landscape orientation have aspect ratios greater than 1 and images with a portrait orientation have aspect ratios less than or equal to 1, such as 0.75 for an image with a 3:4 aspect ratio.

Images do not always exactly match a standard ratio. Because of a difference of a few pixels, images that have a ratio of approximately 3:2 can have decimal aspect ratios of 1.4998, 1.5, or 1.5001. To search for images that have an aspect ratio of approximately 1.5, set the aspect_ratio_max parameter to 1.5005 and the aspect_ratio_min parameter to 1.4995.

To search for videos by aspect ratio, set the aspect_ratio parameter to a preset value such as 4_3 or 16_9. The search returns videos that have approximately that aspect ratio.

Sub-parameters

Searching with sub-parameters

curl -X GET "https://api.shutterstock.com/v2/audio/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "genres=Blues > Chicago"
$query = "genres=Blues > Chicago";

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/search?$query",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const queryParams = {
  "genres": ["Blues > Chicago"]
};

audioApi.searchAudio(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

The audio search parameters genre and moods have main genres and moods and sub-genres and sub-moods. For example, you can use the search parameter genre=Blues for all blues tracks, or you can use the parameter genre=Blues > Chicago for Chicago-style blues tracks. Similarly, you can use the parameter moods=Wedding for all wedding tracks, or you can specify the parameters moods=Wedding > Classical or moods=Wedding > Modern for classical or modern wedding tracks.

Upload base 64-encoded reference image and get similar images

RESPONSE=$(curl -X POST 'https://api.shutterstock.com/v2/cv/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}")

echo "The next step requires the jq program."

UPLOAD_ID=$(jq -r .upload_id <<< $RESPONSE)

curl -X GET https://api.shutterstock.com/v2/cv/similar/images \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "asset_type=images" \
--data-urlencode "asset_id=$UPLOAD_ID"
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);

$uploadBody = [
  "base64_image" => $encodedImageData
];
$uploadEncodedBody = json_encode($uploadBody);

$uploadOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/cv/images",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $uploadEncodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $uploadOptions);
$uploadResponse = curl_exec($handle);
curl_close($handle);

$uploadDecodedResponse = json_decode($uploadResponse);
print_r($uploadDecodedResponse->upload_id);

$similarQuery = [
  "asset_type" => "images",
  "asset_id" => $uploadDecodedResponse->upload_id,
];

$similarOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/cv/similar/images?" . http_build_query($similarQuery),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $similarOptions);
$similarResponse = curl_exec($handle);
curl_close($handle);

print_r($similarResponse);
const sstk = require("shutterstock-api");
const fs = require("fs");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const computerVisionApi = new sstk.ComputerVisionApi();

const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");

const body = new sstk.ImageCreateRequest(base64File);

computerVisionApi.uploadImage(body)
  .then((data) => {
    console.log(data.upload_id);
    return computerVisionApi.getSimilarImages(data.upload_id);
  })
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Computer vision provides images and videos that are similar to a reference image that you supply.

To upload an image for reverse image and video search or keyword suggestions with computer vision, use the POST /v2/cv/images endpoint. Then, use the upload ID that this endpoint returns to get similar images or videos from the GET /v2/cv/similar/images or GET /v2/cv/similar/videos endpoints. The API returns up to 200 images or videos that appear visually similar to your image.

Images must be in JPG or PNG format. They can be no larger than 10mb and can be no larger than 10,000 pixels in width or height. Some operating systems have a limit on the size of the parameters that you can send in a command-line request, such as with the curl program. If you see an error such as "Argument list too long," send a smaller image or make the request with a programming language such as PHP or Node.JS.

To use the computer vision endpoints, your application must be enabled for computer vision. Contact us for access.

Computer vision keyword suggestions

Upload base 64-encoded reference image and get suggested keywords

RESPONSE=$(curl -X POST 'https://api.shutterstock.com/v2/cv/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}")

echo "The next step requires the jq program."

UPLOAD_ID=$(jq -r .upload_id <<< $RESPONSE)

curl -X GET https://api.shutterstock.com/v2/cv/keywords \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "asset_id=$UPLOAD_ID"
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);

$uploadBody = [
  "base64_image" => $encodedImageData
];
$uploadEncodedBody = json_encode($uploadBody);

$uploadOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/cv/images",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $uploadEncodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $uploadOptions);
$uploadResponse = curl_exec($handle);
curl_close($handle);

$uploadDecodedResponse = json_decode($uploadResponse);
print_r($uploadDecodedResponse->upload_id);

$keywordsQuery = [
  "asset_id" => $uploadDecodedResponse->upload_id,
];

$keywordsOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/cv/keywords?" . http_build_query($keywordsQuery),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $keywordsOptions);
$keywordsResponse = curl_exec($handle);
curl_close($handle);

print_r($keywordsResponse);
const sstk = require("shutterstock-api");
const fs = require("fs");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const computerVisionApi = new sstk.ComputerVisionApi();

const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");

const body = new sstk.ImageCreateRequest(base64File);

computerVisionApi.uploadImage(body)
  .then((data) => {
    console.log(data.upload_id);
    return computerVisionApi.getKeywords(data.upload_id);
  })
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Computer vision can also provide suggested keywords for an image.

To get suggested keywords for an image, upload it to the POST /v2/cv/images endpoint as with reverse image search. Then, use the upload ID that this endpoint returns to get suggested keywords from the GET /v2/cv/keywords endpoint. You can also use the ID of an existing image in the Shutterstock collection. In this case, the suggested keywords may not be the same as the keywords in the image metadata.

Results

Example image search results

{
  "page": 1,
  "per_page": 1,
  "total_count": 6471766,
  "search_id": "BogDL7hW4kdptwSXvWsE3w",
  "data": [
    {
      "id": "755022088",
      "aspect": 1.5,
      "assets": {
        "preview": {
          "height": 300,
          "url": "https://image.shutterstock.com/display_pic_with_logo/2723875/755022088/stock-photo-aerial-view-to-ocean-waves-blue-water-background-755022088.jpg",
          "width": 450
        },
        "small_thumb": {
          "height": 67,
          "url": "https://thumb9.shutterstock.com/thumb_small/2723875/755022088/stock-photo-aerial-view-to-ocean-waves-blue-water-background-755022088.jpg",
          "width": 100
        },
        "large_thumb": {
          "height": 100,
          "url": "https://thumb9.shutterstock.com/thumb_large/2723875/755022088/stock-photo-aerial-view-to-ocean-waves-blue-water-background-755022088.jpg",
          "width": 150
        },
        "huge_thumb": {
          "height": 260,
          "url": "https://image.shutterstock.com/image-photo/aerial-view-ocean-waves-blue-260nw-755022088.jpg",
          "width": 390
        },
        "preview_1000": {
          "url": "https://ak.picdn.net/shutterstock/photos/755022088/watermark_1000/4aa68fbdca3b3c6b9792a555c7b793e9/preview_1000-755022088.jpg",
          "width": 1000,
          "height": 667
        },
        "preview_1500": {
          "url": "https://image.shutterstock.com/z/stock-photo-aerial-view-to-ocean-waves-blue-water-background-755022088.jpg",
          "width": 1500,
          "height": 1000
        }
      },
      "contributor": {
        "id": "2723875"
      },
      "description": "Aerial view to ocean waves. Blue water background",
      "image_type": "photo",
      "media_type": "image"
    }
  ],
  "spellcheck_info": {}
}

Example video search results

{
  "page": 1,
  "per_page": 1,
  "total_count": 323254,
  "search_id": "Kz8nE1uZ8f9SVZiC41DbPQ",
  "data": [
    {
      "media_type": "video",
      "id": "32074804",
      "description": "Large container ship at sea - Top down Aerial ",
      "aspect": 1.778,
      "duration": 39,
      "contributor": {
        "id": "474853"
      },
      "aspect_ratio": "16:9",
      "assets": {
        "thumb_webm": {
          "url": "https://ak4.picdn.net/shutterstock/videos/32074804/thumb/stock-footage-large-container-ship-at-sea-top-down-aerial.webm"
        },
        "thumb_mp4": {
          "url": "https://ak4.picdn.net/shutterstock/videos/32074804/thumb/stock-footage-large-container-ship-at-sea-top-down-aerial.mp4"
        },
        "preview_webm": {
          "url": "https://ak4.picdn.net/shutterstock/videos/32074804/preview/stock-footage-large-container-ship-at-sea-top-down-aerial.webm"
        },
        "preview_mp4": {
          "url": "https://ak4.picdn.net/shutterstock/videos/32074804/preview/stock-footage-large-container-ship-at-sea-top-down-aerial.mp4"
        },
        "thumb_jpg": {
          "url": "https://ak4.picdn.net/shutterstock/videos/32074804/thumb/1.jpg"
        },
        "preview_jpg": {
          "url": "https://ak4.picdn.net/shutterstock/videos/32074804/thumb/1.jpg"
        }
      }
    }
  ]
}

Example audio search results

{
  "page": 1,
  "per_page": 1,
  "total_count": 107,
  "search_id": "d375d427-7ba3-4636-b00b-2fb48a0bf41e",
  "data": [
    {
      "id": "394445",
      "description": "Groovy and whimsical, playful marimba and island percussion create an atmosphere of winsome fun.",
      "assets": {
        "clean_audio": {
          "file_size": 29402944
        },
        "preview_mp3": {
          "file_size": 3676706,
          "url": "https://ak.picdn.net/shutterstock/audio/394445/preview/preview.mp3"
        },
        "preview_ogg": {
          "file_size": 3866129,
          "url": "https://ak.picdn.net/shutterstock/audio/394445/preview/preview.ogg"
        },
        "waveform": {
          "file_size": 19060,
          "url": "https://ak.picdn.net/shutterstock/audio/394445/waveform/waveform.png"
        }
      },
      "title": "Calypso Bird",
      "media_type": "audio",
      "contributor": {
        "id": "2847971"
      },
      "published_time": "2015-09-17T11:31:27-04:00",
      "added_date": "2015-09-17"
    }
  ]
}

The search results start with information about the search and the results, including the search ID, the total number of results, and the paging information. Not all results are returned at once; to page through the results, see Responses.

You can sort the search results by factors like the popularity of the media and how recently it was added. For more information about sorting, see Sorting results.

By default, the results show basic information about each search result, including its description, its contributor, information about its dimensions, aspect ratio, or length, and links to previews. You can get more details about each result by including the view=full parameter with the search. For more information, see Responses.

Previewing media

To preview the media, use the URLs in the assets section of the search response. Each result includes one or more thumbnails and previews. Images include watermarked previews in different sizes, videos include thumbnail images and low-resolution watermarked preview videos, and audio tracks include versions with voice-overs. You can embed these previews on web pages or link to them.

To remove the sidebar and ID from preview images, see Removing the ID from preview versions of images.

The dimensions for thumbnail and preview images and videos depend on the aspect ratio of the original images and videos.

Image thumbnail and preview dimensions

Image search results and responses to the GET /v2/images/{id} endpoint include thumbnails and previews in multiple sizes. The response includes the dimensions of each image. Which sizes appear in your response depends on the type of your account.

The thumbnails and previews come with image IDs (also known as the "whitestrip") embedded on the images. The API response provides the dimensions of the image without the whitestrip. To show the image without the whitestrip, limit the display to the dimensions in the API response. For more information, see Removing the ID from preview versions of images.

Video thumbnail and preview dimensions

Thumbnails of videos with aspect ratios less than or equal to 16:9 are 180 pixels in height with an appropriate width for the aspect ratio. For example, 16:9 videos (such as 720p, 1080p, and 4K videos) have thumbnails that are 320x180 pixels, and 4:3 videos have thumbnails that are 238x180 pixels. Thumbnails of videos with aspect ratios greater than 16:9 have a height equal to 320 divided by the aspect ratio. For example, 1.9:1 videos have thumbnails that are 320x168. Video thumbnails are watermarked.

Previews of videos with aspect ratios less than or equal to 16:9 are 336 pixels in height with an appropriate width. For example, 16:9 videos have previews that are 596x336. Previews of videos with aspect ratios greater than 16:9 have a height equal to 600 divided by the aspect ratio. For example, 1.9:1 videos have previews that are 600x316. Preview videos are watermarked.

Licensing and downloading

Downloading media with the Shutterstock API has two main steps: First, you use a subscription to license one or more pieces of media. Then, you can use links in the response to download the media. Some subscriptions allow you to redownload the media later.

When you request a license with the API, it provides platform licenses for media. These platform licenses allow different uses of assets than the standard and enhanced licenses. For example, platform licenses can be used to resell media licenses or to use media in places such as applications, web sites, mobile apps, and social media. For details about what you can do with platform licenses, see Shutterstock API Terms of Service.

For information on licensing errors, see Errors.

Prerequisites

Look up your subscription IDs

curl -X GET 'https://api.shutterstock.com/v2/user/subscriptions' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/user/subscriptions",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const usersApi = new sstk.UsersApi();

usersApi.getUserSubsciptionList()
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

If you are using an API subscription from developers.shutterstock.com, you can leave out the subscription ID field in your licensing request. In this case, the API uses the subscription that is linked to the account in the token. If that account has more than one API subscription, it uses the subscription that is closest to its expiration date.

To get your subscription ID, use the GET /v2/user/subscriptions endpoint, as in the example in the right-hand pane. The examples assume that your subscription ID is in the SUBSCRIPTION_ID environment variable.

Licensing media

License images

DATA='{
  "images": [
    {
      "image_id": "59656357",
      "price": 12.50,
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
}'

curl -X POST "https://api.shutterstock.com/v2/images/licenses?subscription_id=$SUBSCRIPTION_ID" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "$DATA"
$body = [
  "images" => [
    [
      "image_id" => "539753938",
      "price"=> 12.50,
      "metadata"=> {
        "customer_id"=> "12345"
      }
    ]
  ]
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/licenses?subscription_id=$SUBSCRIPTION_ID",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const body = {
  "images": [
    {
      "image_id": "170076830",
      "price": 12.50,
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
};

const queryParams = {
  "size": "huge",
  "subscription_id": process.env.SUBSCRIPTION_ID
};

imagesApi.licenseImages(body, queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Example response

{
  "data": [
    {
      "image_id": "59656357",
      "download": {
        "url": "https://download.shutterstock.com/gatekeeper/[random-characters]/shutterstock_59656357.jpg"
      },
      "allotment_charge": 1
    }
  ]
}

To request a license and download media, pass the media ID and the subscription ID to the appropriate endpoint. For example, to license images, use the POST /v2/images/licenses endpoint, as in the example in the right-hand column. You can use the defaults for the size and format or specify values; the example specifies JPG images.

The request body must include the correct metadata for your subscription type. See Request metadata.

The response includes a download link for each media item.

Licensing sandbox

Test licensing with the licensing sandbox

DATA='{
  "images": [
    {
      "image_id": "59656357",
      "price": 12.50,
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
}'

curl -X POST "https://api-sandbox.shutterstock.com/v2/images/licenses?subscription_id=$SUBSCRIPTION_ID" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "$DATA"
$body = [
  "images" => [
    [
      "image_id" => "539753938",
      "price"=> 12.50,
      "metadata"=> {
        "customer_id"=> "12345"
      }
    ]
  ]
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api-sandbox.shutterstock.com/v2/images/licenses?subscription_id=$SUBSCRIPTION_ID",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setSandbox(true);

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const body = {
  "images": [
    {
      "image_id": "419235589",
      "price": 12.50,
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
};

const queryParams = {
  "format": "jpg",
  "size": "huge",
  "subscription_id": process.env.SUBSCRIPTION_ID
};

imagesApi.licenseImages(body, queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

You can use the licensing sandbox API to test your application's licensing code for images and video and verify that your subscription is working. Audio and editorial licensing are not available in the sandbox. To use the sandbox, change the base URL of your requests to https://api-sandbox.shutterstock.com. If you are using the JavaScript SDK, use the setSandbox method, as in the example in the right-hand pane (requires SDK version 1.0.11 or later).

The licensing sandbox API is exactly like the main API, except that requests to POST /v2/images/licenses or POST /v2/videos/licenses don't deduct credits from your subscription or provide licenses. Requests to POST /v2/audio/licenses and POST /v2/editorial/licenses in the sandbox fail. Instead of providing a license and full-size image or video, these two endpoints provide a preset sample image or video. The response includes an allotment_charge field as usual, but that allotment charge is not deducted from your subscription. All other endpoints in the sandbox API work exactly the same way as the main API.

The sandbox API verifies that the subscription is valid for the licensing request just like the main API. It also returns the same HTTP status codes, so the licensing endpoints return a 200 OK code if the request was valid. The sandbox API uses the same applications and it requires the same authentication and subscriptions as the main API.

Request metadata

The licensing request body must include metadata that includes details about the licensing request. The specific metadata fields depend on your subscription type and on the type of media that you are licensing. Some customers use this metadata to track details about how they use the media, such as the project that they licensed the media for. Resellers use this metadata to track the customer that they licensed the media to and the price that they charged.

API subscriptions

Example request body for API subscriptions

{
  "images": [
    {
      "image_id": "59656357",
      "price": 22.50,
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
}

If you are using an API subscription from the API subscription page, you must include the price and metadata.customer_id fields in the request body, as in the example in the right-hand column. These fields are for resellers to record their customer's ID and the floating-point price that they charged to the customer, within the restrictions of their revenue-sharing agreement. If you are using an API subscription and are not reselling the media, you can pass any string in the customer_id field and 0 in the price field.

For more information about API subscriptions, see Subscriptions.

Enterprise subscriptions

Example request body for Premier subscriptions

{
  "images": [
    {
      "image_id": "59656357",
      "metadata": {
        "customer_id": "12345",
        "geo_location": "US",
        "number_viewed": "15",
        "search_term": "dog"
      }
    }
  ]
}

Enterprise partners who are using Premier subscriptions must provide a metadata object on each media item to license. These partners customize their integration to have up to 4 metadata fields for tracking, grouping, or correlating licensing transactions on their invoices. Each integration requires a different set of metadata fields.

In this case, you must pass an empty or non-empty value for each field that your integration requires, as in the example in the right-hand column. To find the metadata fields that are required or optional for your subscription, use the GET /v2/user/subscriptions endpoint.

Editorial media licensing

Example request body for licensing editorial media

{
  "images": [
    {
      "image_id": "494469670",
      "editorial_acknowledgement": true
    }
  ]
}

To license editorial media, you must acknowledge the editorial agreement as part of the licensing request. In this case, include "editorial_acknowledgement": true in the request, as in the example in the right-hand pane.

To determine whether an image is considered an editorial image, look at the value for the model_released field in the image details. Editorial images have a code value of 3 and a translation_id field value of EDITORIAL_ONLY.

To determine whether a video clip is considered an editorial video clip, look at the value for the model_released field in the video details. Editorial videos have a value of editorial.

Revenue-sharing subscriptions

Example request body for revenue-sharing subscriptions

{
  "images": [
    {
      "image_id": "59656357",
      "price": 22.50,
      "metadata": {
        "customer_id": "12345",
        "geo_location": "US",
        "number_viewed": "15",
        "search_term": "dog"
      }
    }
  ]
}

Downloads under revenue-sharing programs must include the floating-point number final cost to the end customer in the price field. The revenue sharer keeps a percentage of this cost based on its agreement with Shutterstock. This price can not be lower than the price floor for the media asset; if it is, the API changes it to the price floor for the asset.

Subscriptions with comp licenses

Complimentary (comp) licenses are used for testing purposes, unlimited plans, and other special cases. The request for a comp license is the same as for any other type of license, but the resulting license is not always the same. If the subscription is configured for testing purposes and similar cases, the API provides a dummy license. This dummy license does not provide any rights to the customer; it permits customers to view the media without a full license. In this case, the customers have no rights to use the media in any way.

When the API processes a comp license transaction, it does not validate the metadata. Therefore, if you are using comp licenses for testing purposes and your transactions require metadata, you must make sure that the metadata is accurate.

Retrieving metadata

Response that includes licensing request metadata

{
  "data": [
    {
      "id": "i101534558",
      "user": {
        "username": "userone"
      },
      "license": "media",
      "subscription_id": "s49632241",
      "download_time": "2019-11-01T12:10:22-05:00",
      "metadata": {
        "client": "Company A",
        "other": "Important media",
        "purchase_order": "457234",
        "job": "Important project"
      },
      "is_downloadable": false,
      "image": {
        "id": "499124106",
        "format": {
          "size": "huge"
        }
      }
    }
  ]
}

To retrieve licensing request metadata, use the GET /v2/images/licenses endpoint. The response includes the metadata that was sent with each license request.

Redownloading media

Get a list of existing licenses

curl -X GET 'https://api.shutterstock.com/v2/images/licenses' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/licenses",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

imagesApi.getImageLicenseList()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Example response

{
  "data": [
  {
    "id": "i4117504982",
    "user": {
      "username": "jsmith"
      },
    "license": "standard",
    "subscription_id": "s14565368",
    "download_time": "2018-08-31T14:27:10-04:00",
    "image": {
      "id": "1079756147",
      "format": {
        "size": "huge"
      }
    }
  },
  {
    "id": "i4117504971",
    "user": {
      "username": "jsmith"
      },
    "license": "standard",
    "subscription_id": "s31565368",
    "download_time": "2018-08-31T14:27:10-04:00",
    "image": {
      "id": "59656357",
      "format": {
        "size": "huge"
      }
    }
  }
  ]
}

Get a redownload link

curl -X POST 'https://api.shutterstock.com/v2/images/licenses/i4152144892/downloads' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
$body = [];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/licenses/i4152144892/downloads",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const body = {
  "size": "huge"
};

imagesApi.downloadImage("i4152144892", body)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Example response

{
  "url":"https://download.shutterstock.com/gatekeeper/[random-characters]/shutterstock_1079756147.jpg"
}

Most of the time, you download media as soon as you license it, but some subscription types allow you to redownload media later. Platform licenses that you request through the API do not allow redownloads. Shutterstock considers each license to be a unique transaction for a single use of the media, so licensing a media item once does not necessarily mean that you can retrieve it later.

You can use the appropriate endpoint, such as GET /v2/images/licenses, to see your licenses. Then, if your subscription permits redownloads, you can use the license ID to request a new download URL from the POST v2/images/licenses/{license_id}/downloads endpoint, as in the example in the right-hand column.

Images

Search for images

curl -X GET https://api.shutterstock.com/v2/images/search \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=Vienna" \
--data-urlencode "orientation=horizontal" \
--data-urlencode "sort=popular"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "query": "New York",
  "sort": "popular",
  "orientation": "horizontal"
};

imagesApi.searchImages(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "query" => "New York",
  "sort" => "popular",
  "orientation" => "horizontal"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/search Try it out

This endpoint searches for images. If you specify more than one search parameter, the API uses an AND condition. Array parameters can be specified multiple times; in this case, the API uses an AND or an OR condition with those values, depending on the parameter. You can also filter search terms out in the query parameter by prefixing the term with NOT. Free API accounts show results only from a limited library of media, not the full Shutterstock media library. Also, the number of search fields they can use in a request is limited.

Parameters

Parameter Type Description
added_date string

Show images added on the specified date
Format: YYYY-MM-DD
Example: 2020-05-29

added_date_start string

Show images added on or after the specified date
Format: YYYY-MM-DD
Example: 2020-05-29

aspect_ratio_min number

Show images with the specified aspect ratio or higher, using a positive decimal of the width divided by the height, such as 1.7778 for a 16:9 image

aspect_ratio_max number

Show images with the specified aspect ratio or lower, using a positive decimal of the width divided by the height, such as 1.7778 for a 16:9 image

aspect_ratio number

Show images with the specified aspect ratio, using a positive decimal of the width divided by the height, such as 1.7778 for a 16:9 image

added_date_end string

Show images added before the specified date
Format: YYYY-MM-DD
Example: 2020-05-29

category string

Show images with the specified Shutterstock-defined category; specify a category name or ID

color string

Specify either a hexadecimal color in the format '4F21EA' or 'grayscale'; the API groups it into one of 15 color categories and returns images that primarily use that color category

contributor array[string]

Show images with the specified contributor names or IDs, allows multiple

contributor_country array[string]

Show images from contributors in one or more specified countries
Format: A two-character (ISO 3166 Alpha-2) country code
Example: US

fields string

Fields to display in the response; see the documentation for the fields parameter in the overview section

height integer

(Deprecated; use height_from and height_to instead) Show images with the specified height

height_from integer

Show images with the specified height or larger, in pixels

height_to integer

Show images with the specified height or smaller, in pixels

image_type array[string]

Show images of the specified type
Valid values: photo, illustration, vector

language Language

Set query and result language (uses Accept-Language header if not set)
Valid values: cs, da, de, en, es, fi, fr, hu, it, ja, ko, nb, nl, pl, pt, ru, sv, th, tr, zh, zh-Hant

license array[string]

Show only images with the specified license
Valid values: commercial, editorial, enhanced, sensitive, NOT enhanced, NOT sensitive

model array[string]

Show image results with the specified model IDs

orientation string

Show image results with horizontal or vertical orientation
Valid values: horizontal, vertical

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Maximum: 500, Default: 20

people_model_released boolean

Show images of people with a signed model release

people_age string

Show images that feature people of the specified age category
Valid values: infants, children, teenagers, 20s, 30s, 40s, 50s, 60s, older

people_ethnicity string

Show images with people of the specified ethnicity
Valid values: african, african_american, black, brazilian, chinese, caucasian, east_asian, hispanic, japanese, middle_eastern, native_american, pacific_islander, south_asian, southeast_asian, other

people_gender string

Show images with people of the specified gender
Valid values: male, female, both

people_number integer

Show images with the specified number of people
Maximum: 4

query string

One or more search terms separated by spaces; you can use NOT to filter out images that match a term

region string

Raise or lower search result rankings based on the result's relevance to a specified region; you can provide a country code or an IP address from which the API infers a country
Format: A two-character (ISO 3166 Alpha-2) country code or A valid IPv4 address
Example: US or 1.1.1.1

safe boolean

Enable or disable safe search
Default: true

sort string

Sort by
Valid values: newest, popular, relevance, random
Default: popular

spellcheck_query boolean

Spellcheck the search query and return results on suggested spellings
Default: true

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: minimal

width integer

(Deprecated; use width_from and width_to instead) Show images with the specified width

width_from integer

Show images with the specified width or larger, in pixels

width_to integer

Show images with the specified width or smaller, in pixels

Accepted authentication

Example responses

OK

{
  "page": 1,
  "per_page": 1,
  "total_count": 193097419,
  "search_id": "p5S6QwRikdFJTHXwsoiqTg",
  "data": [
    {
      "id": "1120280123",
      "aspect": 1.6667,
      "assets": {
        "preview": {
          "height": 269,
          "url": "https://image.shutterstock.com/display_pic_with_logo/3673637/1120280123/stock-vector-minimal-geometric-background-dynamic-shapes-composition-eps-vector-1120280123.jpg",
          "width": 450
        },
        "small_thumb": {
          "height": 60,
          "url": "https://thumb10.shutterstock.com/thumb_small/3673637/1120280123/stock-vector-minimal-geometric-background-dynamic-shapes-composition-eps-vector-1120280123.jpg",
          "width": 100
        },
        "large_thumb": {
          "height": 90,
          "url": "https://thumb10.shutterstock.com/thumb_large/3673637/1120280123/stock-vector-minimal-geometric-background-dynamic-shapes-composition-eps-vector-1120280123.jpg",
          "width": 150
        },
        "huge_thumb": {
          "height": 260,
          "url": "https://image.shutterstock.com/image-vector/minimal-geometric-background-dynamic-shapes-260nw-1120280123.jpg",
          "width": 435
        },
        "preview_1000": {
          "url": "https://ak.picdn.net/shutterstock/photos/1120280123/watermark_1000/f4954f705e782cc12cd13910137e3555/preview_1000-1120280123.jpg",
          "width": 1000,
          "height": 600
        },
        "preview_1500": {
          "url": "https://image.shutterstock.com/z/stock-vector-minimal-geometric-background-dynamic-shapes-composition-eps-vector-1120280123.jpg",
          "width": 1500,
          "height": 900
        }
      },
      "contributor": {
        "id": "3673637"
      },
      "description": "Minimal geometric background. Dynamic shapes composition. Eps10 vector.",
      "image_type": "vector",
      "media_type": "image",
      "url": "https://www.shutterstock.com/image-photo/1120280123"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK ImageSearchResults
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List image categories


curl -X GET https://api.shutterstock.com/v2/images/categories \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "language": "es"
};

imagesApi.getImageCategories(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/categories",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/categories Try it out

This endpoint lists the categories (Shutterstock-assigned genres) that images can belong to.

Parameters

Parameter Type Description
language Language

Language for the keywords and categories in the response
Valid values: cs, da, de, en, es, fi, fr, hu, it, ja, ko, nb, nl, pl, pt, ru, sv, th, tr, zh, zh-Hant

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "15",
      "name": "Science"
    },
    {
      "id": "17",
      "name": "Signs/Symbols"
    },
    {
      "id": "18",
      "name": "Sports/Recreation"
    },
    {
      "id": "16",
      "name": "Technology"
    },
    {
      "id": "0",
      "name": "Transportation"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK CategoryDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List similar images


curl -X GET https://api.shutterstock.com/v2/images/465011609/similar \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "language": "es"
};

imagesApi.getSimilarImages("465011609", queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/465011609/similar",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/{id}/similar Try it out

This endpoint returns images that are visually similar to an image that you specify.

Parameters

Parameter Type Description
id
(Required)
string

Image ID
(Parameter is part of path)

language Language

Language for the keywords and categories in the response
Valid values: cs, da, de, en, es, fi, fr, hu, it, ja, ko, nb, nl, pl, pt, ru, sv, th, tr, zh, zh-Hant

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 500, Default: 20

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: minimal

Accepted authentication

Example responses

OK

{
  "page": 1,
  "per_page": 1,
  "total_count": 200,
  "search_id": "",
  "data": [
    {
      "id": "224429596",
      "aspect": 1,
      "assets": {
        "preview": {
          "height": 450,
          "url": "https://image.shutterstock.com/display_pic_with_logo/302287/224429596/stock-vector-happy-halloween-vector-224429596.jpg",
          "width": 450
        },
        "small_thumb": {
          "height": 100,
          "url": "https://thumb1.shutterstock.com/thumb_small/302287/224429596/stock-vector-happy-halloween-vector-224429596.jpg",
          "width": 100
        },
        "large_thumb": {
          "height": 150,
          "url": "https://thumb1.shutterstock.com/thumb_large/302287/224429596/stock-vector-happy-halloween-vector-224429596.jpg",
          "width": 150
        },
        "huge_thumb": {
          "height": 260,
          "url": "https://image.shutterstock.com/image-vector/happy-halloween-vector-260nw-224429596.jpg",
          "width": 260
        },
        "preview_1000": {
          "url": "https://ak.picdn.net/shutterstock/photos/224429596/watermark_1000/9b5c88b67f10298f7b5340f21dffc953/preview_1000-224429596.jpg",
          "width": 1000,
          "height": 1000
        },
        "preview_1500": {
          "url": "https://image.shutterstock.com/z/stock-vector-happy-halloween-vector-224429596.jpg",
          "width": 1500,
          "height": 1500
        }
      },
      "contributor": {
        "id": "302287"
      },
      "description": "Happy Halloween - vector",
      "image_type": "vector",
      "media_type": "image"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK ImageSearchResults
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None


curl -X GET https://api.shutterstock.com/v2/images/recommendations \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "id=465011609" 
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "id": [
    465011609
  ]
};

imagesApi.getImageRecommendations(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/recommendations?id=465011609",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/recommendations Try it out

This endpoint returns images that customers put in the same collection as the specified image IDs.

Parameter Type Description
id
(Required)
array[string]

Image IDs

max_items integer

Maximum number of results returned in the response
Minimum: 1, Maximum: 500, Default: 20

safe boolean

Restrict results to safe images
Default: true

Example responses

OK

{
  "data": [
    {
      "id": "106363526"
    },
    {
      "id": "113284498"
    },
    {
      "id": "107390756"
    },
    {
      "id": "99379946"
    },
    {
      "id": "133918412"
    }
  ]
}
Status Meaning Description Schema
200 OK OK RecommendationDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List updated images

curl -X GET https://api.shutterstock.com/v2/images/updated \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "interval=30 MINUTE"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "interval": "30 MINUTE"
};

imagesApi.getUpdatedImages(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "interval" => "30 MINUTE"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/updated?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/updated Try it out

This endpoint lists images that have been updated in the specified time period to update content management systems (CMS) or digital asset management (DAM) systems. In most cases, use the interval parameter to show images that were updated recently, but you can also use the start_date and end_date parameters to specify a range of no more than three days. Do not use the interval parameter with either start_date or end_date.

Parameters

Parameter Type Description
type array[string]

Show images that were added, deleted, or edited; by default, the endpoint returns images that were updated in any of these ways
Valid values: addition, deletion, edit

start_date string

Show images updated on or after the specified date
Format: YYYY-MM-DD
Example: 2020-05-29

end_date string

Show images updated before the specified date
Format: YYYY-MM-DD
Example: 2020-05-29

interval string

Show images updated in the specified time period, where the time period is an interval (like SQL INTERVAL) such as 1 DAY, 6 HOUR, or 30 MINUTE; the default is 1 HOUR, which shows images that were updated in the hour preceding the request
Default: 1 HOUR

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 2000, Default: 100

sort string

Sort order
Valid values: newest, oldest
Default: newest

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "1398917399",
      "updated_time": "2019-06-04T15:56:44-04:00",
      "updates": [
        "edit"
      ]
    },
    {
      "id": "1398978491",
      "updated_time": "2019-06-04T15:56:44-04:00",
      "updates": [
        "edit"
      ]
    },
    {
      "id": "1414537214",
      "updated_time": "2019-06-04T15:56:44-04:00",
      "updates": [
        "edit"
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK UpdatedMediaDataList

Details

Get details about images


curl -X GET https://api.shutterstock.com/v2/images/465011609 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "language": "es"
};

imagesApi.getImage("465011609", queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/465011609",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/{id} Try it out

This endpoint shows information about an image, including a URL to a preview image and the sizes that it is available in.

Parameters

Parameter Type Description
id
(Required)
string

Image ID
(Parameter is part of path)

language Language

Language for the keywords and categories in the response
Valid values: cs, da, de, en, es, fi, fr, hu, it, ja, ko, nb, nl, pl, pt, ru, sv, th, tr, zh, zh-Hant

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: full

Accepted authentication

Example responses

OK

{
  "id": "465011609",
  "added_date": "2016-08-07",
  "aspect": 0.8501,
  "assets": {
    "huge_jpg": {
      "display_name": "Huge",
      "dpi": 300,
      "file_size": 6980608,
      "format": "jpg",
      "height": 4902,
      "is_licensable": true,
      "width": 4167
    },
    "vector_eps": {
      "display_name": "Vector",
      "format": "eps",
      "is_licensable": true
    },
    "preview": {
      "height": 450,
      "url": "https://image.shutterstock.com/display_pic_with_logo/1384888/465011609/stock-vector-happy-mid-autumn-festival-background-with-golden-glitter-moon-and-hand-drawn-moon-rabbits-vector-465011609.jpg",
      "width": 382
    },
    "small_thumb": {
      "height": 100,
      "url": "https://thumb7.shutterstock.com/thumb_small/1384888/465011609/stock-vector-happy-mid-autumn-festival-background-with-golden-glitter-moon-and-hand-drawn-moon-rabbits-vector-465011609.jpg",
      "width": 85
    },
    "large_thumb": {
      "height": 150,
      "url": "https://thumb7.shutterstock.com/thumb_large/1384888/465011609/stock-vector-happy-mid-autumn-festival-background-with-golden-glitter-moon-and-hand-drawn-moon-rabbits-vector-465011609.jpg",
      "width": 128
    },
    "huge_thumb": {
      "height": 260,
      "url": "https://image.shutterstock.com/image-vector/happy-mid-autumn-festival-background-260nw-465011609.jpg",
      "width": 221
    },
    "preview_1000": {
      "url": "https://ak.picdn.net/shutterstock/photos/465011609/watermark_1000/e80e64e55f14aeb951feaf93ea337dc0/preview_1000-465011609.jpg",
      "width": 850,
      "height": 1000
    },
    "preview_1500": {
      "url": "https://image.shutterstock.com/z/stock-vector-happy-mid-autumn-festival-background-with-golden-glitter-moon-and-hand-drawn-moon-rabbits-vector-465011609.jpg",
      "width": 1275,
      "height": 1500
    }
  },
  "categories": [
    {
      "id": "8",
      "name": "Holidays"
    },
    {
      "id": "11",
      "name": "The Arts"
    }
  ],
  "contributor": {
    "id": "1384888"
  },
  "description": "Happy Mid Autumn Festival background with golden glitter Moon and hand drawn Moon Rabbits. Vector illustration",
  "image_type": "vector",
  "is_adult": false,
  "is_illustration": true,
  "has_property_release": true,
  "keywords": [
    "abstract",
    "art",
    "artistic",
    "asian",
    "autumn",
    "background",
    "bunny",
    "calligraphy",
    "celebration",
    "china"
  ],
  "media_type": "image",
  "url": "https://www.shutterstock.com/image-photo/465011609"
}

Responses

Status Meaning Description Schema
200 OK OK Image
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List images


curl -X GET https://api.shutterstock.com/v2/images \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "id=1110335168" \
--data-urlencode "id=465011609" 
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "id": [
    "1110335168",
    "465011609"
  ],
  "view": "minimal"
};

imagesApi.getImageList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images?id=1110335168&id=465011609",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images Try it out

This endpoint lists information about one or more images, including the available sizes.

Parameters

Parameter Type Description
id
(Required)
array[string]

One or more image IDs

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: minimal

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "465011609",
      "aspect": 0.8501,
      "assets": {
        "preview": {
          "height": 450,
          "url": "https://image.shutterstock.com/display_pic_with_logo/1384888/465011609/stock-vector-happy-mid-autumn-festival-background-with-golden-glitter-moon-and-hand-drawn-moon-rabbits-vector-465011609.jpg",
          "width": 382
        },
        "small_thumb": {
          "height": 100,
          "url": "https://thumb7.shutterstock.com/thumb_small/1384888/465011609/stock-vector-happy-mid-autumn-festival-background-with-golden-glitter-moon-and-hand-drawn-moon-rabbits-vector-465011609.jpg",
          "width": 85
        },
        "large_thumb": {
          "height": 150,
          "url": "https://thumb7.shutterstock.com/thumb_large/1384888/465011609/stock-vector-happy-mid-autumn-festival-background-with-golden-glitter-moon-and-hand-drawn-moon-rabbits-vector-465011609.jpg",
          "width": 128
        },
        "huge_thumb": {
          "height": 260,
          "url": "https://image.shutterstock.com/image-vector/happy-mid-autumn-festival-background-260nw-465011609.jpg",
          "width": 221
        },
        "preview_1000": {
          "url": "https://ak.picdn.net/shutterstock/photos/465011609/watermark_1000/e80e64e55f14aeb951feaf93ea337dc0/preview_1000-465011609.jpg",
          "width": 850,
          "height": 1000
        },
        "preview_1500": {
          "url": "https://image.shutterstock.com/z/stock-vector-happy-mid-autumn-festival-background-with-golden-glitter-moon-and-hand-drawn-moon-rabbits-vector-465011609.jpg",
          "width": 1275,
          "height": 1500
        }
      },
      "contributor": {
        "id": "1384888"
      },
      "description": "Happy Mid Autumn Festival background with golden glitter Moon and hand drawn Moon Rabbits. Vector illustration",
      "image_type": "vector",
      "media_type": "image",
      "url": "https://www.shutterstock.com/image-photo/465011609"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK ImageDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Licenses and downloads

License images

DATA='{
  "images": [
    {
      "image_id": "59656357",
      "price": 12.50,
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
}'

curl -X POST "https://api.shutterstock.com/v2/images/licenses?subscription_id=$SUBSCRIPTION_ID" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "$DATA"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const body = {
  "images": [
    {
      "image_id": "419235589",
      "price": 12.50,
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
};

const queryParams = {
  "format": "jpg",
  "size": "huge",
  "subscription_id": process.env.SUBSCRIPTION_ID
};

imagesApi.licenseImages(body, queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$body = [
  "images" => [
    [
      "image_id" => "539753938",
      "price" => 12.50,
      "metadata" => [
        "customer_id" => "12345"
      ]
    ]
  ]
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/licenses?subscription_id=$SUBSCRIPTION_ID",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/images/licenses Try it out

This endpoint gets licenses for one or more images. You must specify the image IDs in the body parameter and other details like the format, size, and subscription ID either in the query parameter or with each image ID in the body parameter. Values in the body parameter override values in the query parameters.

Parameters

Parameter Type Description
subscription_id string

Subscription ID to use to license the image

format string

Image format
Valid values: eps, jpg
Default: jpg

size string

Image size
Valid values: small, medium, huge, vector
Default: huge

search_id string

Search ID that was provided in the results of an image search

Body

Schema: LicenseImageRequest
List of images to request licenses for and information about each license transaction; these values override the defaults in the query parameters

Fields:

Field Type Description
images [LicenseImage] Images to create licenses for
auth_cookie Cookie Cookie object
name string The name of the cookie
value string The value of the cookie
editorial_acknowledgement boolean Set to true to acknowledge the editorial agreement
format string Image format to download
image_id string Image ID
metadata LicenseRequestMetadata Additional information for license requests for enterprise accounts and API subscriptions, 4 fields maximum; which fields are required is set by the account holder
price number For revenue-sharing transactions, the final cost to the end customer
search_id string ID of the search that led to this licensing transaction
show_modal boolean (Deprecated)
size string Image size to download
subscription_id string ID of the subscription to use for the download.
verification_code string (Deprecated)

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "image_id": "547233985",
      "download": {
        "url": "https://download.shutterstock.com/gatekeeper/[random-characters]/shutterstock_547233985.jpg"
      },
      "allotment_charge": 1
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK LicenseImageResultDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List image licenses


curl -X GET https://api.shutterstock.com/v2/images/licenses \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

imagesApi.getImageLicenseList()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/licenses",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/licenses Try it out

This endpoint lists existing licenses. You can filter the results according to the type of license or the image ID.

Parameters

Parameter Type Description
image_id string

Show licenses for the specified image ID

license string

Show images that are available with the specified license, such as standard or enhanced; prepending a - sign excludes results from that license

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Maximum: 200, Default: 20

sort string

Sort order
Valid values: newest, oldest
Default: newest

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "i1188641320",
      "user": {
        "username": "userone"
      },
      "license": "standard",
      "subscription_id": "s18382630",
      "download_time": "2016-10-03T15:58:18-04:00",
      "metadata": {
        "client": "Company A",
        "other": "Important media",
        "purchase_order": "457234",
        "job": "Important project"
      },
      "image": {
        "id": "114350371",
        "format": {
          "size": "huge"
        }
      }
    },
    {
      "id": "i1188641335",
      "user": {
        "username": "userone"
      },
      "license": "standard",
      "subscription_id": "s18382630",
      "download_time": "2016-10-03T16:01:12-04:00",
      "metadata": {
        "client": "Company A",
        "other": "Important media",
        "purchase_order": "457234",
        "job": "Important project"
      },
      "image": {
        "id": "135658703",
        "format": {
          "size": "medium"
        }
      }
    },
    {
      "id": "i1188641341",
      "user": {
        "username": "userone"
      },
      "license": "standard",
      "subscription_id": "s18382630",
      "download_time": "2016-10-03T16:01:18-04:00",
      "metadata": {
        "client": "Company A",
        "other": "Important media",
        "purchase_order": "457234",
        "job": "Important project"
      },
      "image": {
        "id": "107771801",
        "format": {
          "size": "vector"
        }
      }
    }
  ],
  "page": 1,
  "per_page": 3
}

Responses

Status Meaning Description Schema
200 OK OK DownloadHistoryDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Download images

DATA='{
  "size": "huge"
}'

curl -X POST https://api.shutterstock.com/v2/images/licenses/i1188641347/downloads \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const licenseId = "i1188641347"; // license ID, not image ID

const body = {
  "size": "huge"
};

imagesApi.downloadImage(licenseId, body)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$body = [
  "size" => "huge"
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/licenses/i1188641347/downloads",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/images/licenses/{id}/downloads Try it out

This endpoint redownloads images that you have already received a license for.

Parameters

Parameter Type Description
id
(Required)
string

License ID
(Parameter is part of path)

Body

Schema: RedownloadImage
Information about the images to redownload

Fields:

Field Type Description
auth_cookie Cookie Cookie object
name string The name of the cookie
value string The value of the cookie
show_modal boolean (Deprecated)
size string Size of the image
verification_code string (Deprecated)

Accepted authentication

Example responses

OK

{
  "url": "https://download.qa.shutterstock.com/gatekeeper/LzEyMy9odWdlLmpwZyIsIm0iOjEsvdjNsbFNWbVNEQ2FhcHV1VlhhSU9VeUpVIl0/shutterstock_60447496.jpg'"
}

Responses

Status Meaning Description Schema
200 OK OK Url
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Collections

Create image collections

DATA='{
  "name": "My collection"
}'

curl -X POST https://api.shutterstock.com/v2/images/collections \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const body = {
  "name": "My collection"
};

imagesApi.createLightbox(body)
  .catch((error) => {
    console.error(error);
  });
$body = [
  "name" => "My collection"
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/images/collections Try it out

This endpoint creates one or more image collections (lightboxes). To add images to the collections, use POST /v2/images/collections/{id}/items.

Body

Schema: CollectionCreateRequest
The names of the new collections

Fields:

Field Type Description
name string The name of the collection

Accepted authentication

Example responses

Creation successful

{
  "id": "101202664"
}

Responses

Status Meaning Description Schema
200 OK No response was specified None
201 Created Creation successful CollectionCreateResponse
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List image collections


curl -X GET https://api.shutterstock.com/v2/images/collections \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "embed": "share_code",
  "page": 1,
  "per_page": 2
};

imagesApi.getLightboxList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/collections Try it out

This endpoint lists your collections of images and their basic attributes.

Parameters

Parameter Type Description
embed array[string]

Which sharing information to include in the response, such as a URL to the collection
Valid values: share_code, share_url

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 150, Default: 100

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "21663574",
      "name": "Kittens and puppies",
      "total_item_count": 0,
      "items_updated_time": "2018-08-02T07:33:24-04:00"
    },
    {
      "id": "21663571",
      "name": "young couples",
      "total_item_count": 0,
      "items_updated_time": "2018-08-02T07:33:22-04:00"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK CollectionDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Get the details of image collections


curl -X GET https://api.shutterstock.com/v2/images/collections/126351027 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

imagesApi.getLightbox("126351027")
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/126351027",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/collections/{id} Try it out

This endpoint gets more detailed information about a collection, including its cover image and timestamps for its creation and most recent update. To get the images in collections, use GET /v2/images/collections/{id}/items.

Parameters

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

embed array[string]

Which sharing information to include in the response, such as a URL to the collection
Valid values: share_code, share_url

share_code string

Code to retrieve a shared collection

Accepted authentication

Example responses

OK

{
  "id": "336351027",
  "name": "My collection",
  "total_item_count": 1,
  "items_updated_time": "2017-05-17T16:28:39-04:00",
  "cover_item": {
    "id": "954500"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Collection
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Rename image collections

DATA='{
  "name": "My new collection name"
}'

curl -X POST https://api.shutterstock.com/v2/images/collections/126351027 \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const collectionId = "126351027"; // Collection ID

const body = {
  "name": "My new collection name"
};

imagesApi.renameLightbox(collectionId, body)
  .catch((error) => {
    console.error(error);
  });
$body = [
  "name" => "My new collection name"
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/126351027",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/images/collections/{id} Try it out

This endpoint sets a new name for an image collection.

Parameters

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

Body

Schema: CollectionUpdateRequest
The new name for the collection

Fields:

Field Type Description
name string The new name of the collection

Accepted authentication

Responses

Status Meaning Description Schema
200 OK No response was specified None
204 No Content Successfully updated collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Delete image collections

curl -X DELETE https://api.shutterstock.com/v2/images/collections/136351027 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const collectionId = "136351027"; // Collection ID

imagesApi.deleteLightbox(collectionId)
  .catch((error) => {
    console.error(error);
  });
$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/136351027",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

DELETE /v2/images/collections/{id} Try it out

This endpoint deletes an image collection.

Parameters

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

Accepted authentication

Responses

Status Meaning Description Schema
200 OK No response was specified None
204 No Content Successfully deleted collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Add images to collections

DATA='{
  "items": [
    {
      "id": "49572945",
      "media_type": "image"
    }
  ]
}'

curl -X POST https://api.shutterstock.com/v2/images/collections/126351027/items \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const collectionId = "126351027"; // Collection ID

const body = {
  "items": [
    {
      "id": "495863218",
      "media_type": "image"
    }
  ]
};

imagesApi.addLightboxItems(collectionId, body)
  .catch((error) => {
    console.error(error);
  });
$body = [
  "items" => [
    [
      "id" => "49572945",
      "media_type" => "image"
    ]
  ]
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/126351027/items",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/images/collections/{id}/items Try it out

This endpoint adds one or more images to a collection by image IDs.

Parameters

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

Body

Schema: CollectionItemRequest
Array of image IDs to add to the collection

Fields:

Field Type Description
items [CollectionItem] List of items
added_time string The date the item was added to the collection
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00
id string ID of the item
media_type string The media type of the item, such as image, video, or audio

Accepted authentication

Responses

Status Meaning Description Schema
200 OK No response was specified None
204 No Content Successfully added collection items None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Get the contents of image collections


curl -X GET https://api.shutterstock.com/v2/images/collections/126351027/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

imagesApi.getLightboxItems("126351027")
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/126351027/items",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/collections/{id}/items Try it out

This endpoint lists the IDs of images in a collection and the date that each was added.

Parameters

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

share_code string

Code to retrieve the contents of a shared collection

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 150, Default: 100

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "38162050",
      "added_time": "2016-11-25T16:44:25-05:00"
    },
    {
      "id": "38139676",
      "added_time": "2016-11-25T16:44:22-05:00"
    },
    {
      "id": "787905",
      "added_time": "2016-11-25T16:44:19-05:00"
    },
    {
      "id": "826197",
      "added_time": "2016-11-25T16:44:16-05:00"
    },
    {
      "id": "38124508",
      "added_time": "2016-11-25T16:44:14-05:00"
    },
    {
      "id": "126445388",
      "added_time": "2016-11-25T16:44:02-05:00"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK CollectionItemDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Remove images from collections

curl -X DELETE https://api.shutterstock.com/v2/images/collections/186726599/items?item_id=495863218 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const collectionId = "126351027"; // Collection ID

// Array of images to remove
const imagesToRemove = {
  "item_id": [
    "495863218"
  ]
};

imagesApi.deleteLightboxItems(collectionId, imagesToRemove)
  .catch((error) => {
    console.error(error);
  });
$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/126351027/items?item_id=495863218",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

DELETE /v2/images/collections/{id}/items Try it out

This endpoint removes one or more images from a collection.

Parameters

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

item_id array[string]

One or more image IDs to remove from the collection

Accepted authentication

Responses

Status Meaning Description Schema
200 OK No response was specified None
204 No Content Successfully removed collection items None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None


curl -X GET https://api.shutterstock.com/v2/images/collections/featured \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "embed": "share_url",
  "type": "photo",
  "asset_hint": "share_url"
};

imagesApi.getFeaturedLightboxList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/featured",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/collections/featured Try it out

This endpoint lists featured collections of specific types and a name and cover image for each collection.

Parameter Type Description
embed string

Which sharing information to include in the response, such as a URL to the collection
Valid values: share_url

type array[string]

The types of collections to return
Valid values: photo, editorial, vector

asset_hint string

Cover image size
Valid values: 1x, 2x
Default: 1x

Example responses

OK

{
  "data": [
    {
      "total_item_count": 50,
      "items_updated_time": "2018-01-30T09:49:22-05:00",
      "name": "Flower Still Lifes",
      "id": "73497710",
      "created_time": "2018-03-06T19:19:02.000Z",
      "updated_time": "2018-03-06T21:28:06.000Z",
      "cover_item": {
        "url": "https://ak.picdn.net/assets/cms/ecedf10e57824db9516560f7523f084b445c1672-shutterstock_104947832.jpg"
      },
      "share_url": "http://www.shutterstock.com/collections/73497710-flower-still-lifes.html"
    },
    {
      "total_item_count": 100,
      "items_updated_time": "2016-05-18T10:49:02-04:00",
      "name": "Feeling Down",
      "id": "45566855",
      "created_time": "2018-03-06T18:54:19.000Z",
      "updated_time": "2018-03-07T13:58:21.000Z",
      "cover_item": {
        "url": "https://ak.picdn.net/assets/cms/3aa67c2b92c7cead79da08b955f409269553fade-shutterstock_343681901.jpg"
      },
      "share_url": "http://www.shutterstock.com/collections/45566855-feeling-down.html"
    }
  ]
}
Status Meaning Description Schema
200 OK OK FeaturedCollectionDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None


curl -X GET https://api.shutterstock.com/v2/images/collections/featured/136351027 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

imagesApi.getFeaturedLightbox("136351027")
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/featured/136351027",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/collections/featured/{id} Try it out

This endpoint gets more detailed information about a featured collection, including its cover image and timestamps for its creation and most recent update. To get the images, use GET /v2/images/collections/featured/{id}/items.

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

embed string

Which sharing information to include in the response, such as a URL to the collection
Valid values: share_url

asset_hint string

Cover image size
Valid values: 1x, 2x
Default: 1x

Example responses

OK

{
  "total_item_count": 100,
  "items_updated_time": "2016-05-18T10:49:02-04:00",
  "name": "Feeling Down",
  "id": "136351027",
  "created_time": "2018-03-06T18:54:19.000Z",
  "updated_time": "2018-03-07T13:58:21.000Z",
  "cover_item": {
    "url": "https://ak.picdn.net/assets/cms/3aa67c2b92c7ceadd79da08b95d5f409269553fade-shutterstock_343681901.jpg"
  }
}
Status Meaning Description Schema
200 OK OK FeaturedCollection
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Featured collection not found None


curl -X GET https://api.shutterstock.com/v2/images/collections/featured/136351027/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

imagesApi.getFeaturedLightboxItems("136351027")
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/featured/136351027/items",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/images/collections/featured/{id}/items Try it out

This endpoint lists the IDs of images in a featured collection and the date that each was added.

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 150, Default: 100

Example responses

OK

{
  "data": [
    {
      "id": "2931777093",
      "added_time": "2016-05-18T10:49:02-04:00"
    },
    {
      "id": "4101383321",
      "added_time": "2016-05-18T10:39:06-04:00"
    },
    {
      "id": "1821077001",
      "added_time": "2016-05-18T10:31:04-04:00"
    },
    {
      "id": "3451984902",
      "added_time": "2016-05-18T10:21:54-04:00"
    }
  ]
}
Status Meaning Description Schema
200 OK OK CollectionItemDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Featured collection not found None

Videos

Search for videos

curl -X GET "https://api.shutterstock.com/v2/videos/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=hot air balloon" \
--data-urlencode "duration_from=30" \
--data-urlencode "sort=popular"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const queryParams = {
  "query": "hot air balloon",
  "duration_from": 30,
  "sort": "popular"
};

videosApi.searchVideos(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "query" => "hot air balloon",
  "duration_from" => 30,
  "sort" => "popular"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/videos/search Try it out

This endpoint searches for videos. If you specify more than one search parameter, the API uses an AND condition. Array parameters can be specified multiple times; in this case, the API uses an AND or an OR condition with those values, depending on the parameter. You can also filter search terms out in the query parameter by prefixing the term with NOT.

Parameters

Parameter Type Description
added_date string

Show videos added on the specified date
Format: YYYY-MM-DD
Example: 2020-05-29

added_date_start string

Show videos added on or after the specified date
Format: YYYY-MM-DD
Example: 2020-05-29

added_date_end string

Show videos added before the specified date
Format: YYYY-MM-DD
Example: 2020-05-29

aspect_ratio string

Show videos with the specified aspect ratio
Valid values: 4_3, 16_9, nonstandard

category string

Show videos with the specified Shutterstock-defined category; specify a category name or ID

contributor array[string]

Show videos with the specified artist names or IDs

contributor_country array[string]

Show videos from contributors in one or more specified countries
Format: A two-character (ISO 3166 Alpha-2) country code
Example: US

duration integer

(Deprecated; use duration_from and duration_to instead) Show videos with the specified duration in seconds

duration_from integer

Show videos with the specified duration or longer in seconds

duration_to integer

Show videos with the specified duration or shorter in seconds

fps number

(Deprecated; use fps_from and fps_to instead) Show videos with the specified frames per second

fps_from number

Show videos with the specified frames per second or more

fps_to number

Show videos with the specified frames per second or fewer

language Language

Set query and result language (uses Accept-Language header if not set)
Valid values: cs, da, de, en, es, fi, fr, hu, it, ja, ko, nb, nl, pl, pt, ru, sv, th, tr, zh, zh-Hant

license array[string]

Show only videos with the specified license or licenses
Valid values: commercial, editorial

model array[string]

Show videos with each of the specified models

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Maximum: 500, Default: 20

people_age string

Show videos that feature people of the specified age range
Valid values: infants, children, teenagers, 20s, 30s, 40s, 50s, 60s, older

people_ethnicity string

Show videos with people of the specified ethnicity
Valid values: african, african_american, black, brazilian, chinese, caucasian, east_asian, hispanic, japanese, middle_eastern, native_american, pacific_islander, south_asian, southeast_asian, other

people_gender string

Show videos with people with the specified gender
Valid values: male, female, both

people_number integer

Show videos with the specified number of people
Maximum: 4

people_model_released boolean

Show only videos of people with a signed model release

query string

One or more search terms separated by spaces; you can use NOT to filter out videos that match a term

resolution string

Show videos with the specified resolution
Valid values: 4k, standard_definition, high_definition

safe boolean

Enable or disable safe search
Default: true

sort string

Sort by one of these categories
Valid values: newest, popular, relevance, random
Default: popular

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: minimal

Accepted authentication

Example responses

OK

{
  "page": 1,
  "per_page": 1,
  "total_count": 9488747,
  "search_id": "4LseqIiX-nIW7_vx8-jhWQ",
  "data": [
    {
      "media_type": "video",
      "id": "33248488",
      "description": "The Concept of: Digitalization of Information Flow Moving Through Rack Servers in Data Center. Shot on RED EPIC-W 8K Helium Cinema Camera.",
      "aspect": 1.778,
      "duration": 19,
      "contributor": {
        "id": "178456"
      },
      "aspect_ratio": "16:9",
      "assets": {
        "thumb_webm": {
          "url": "https://ak8.picdn.net/shutterstock/videos/33248488/thumb/stock-footage-the-concept-of-digitalization-of-information-flow-moving-through-rack-servers-in-data-center-shot.webm"
        },
        "thumb_mp4": {
          "url": "https://ak8.picdn.net/shutterstock/videos/33248488/thumb/stock-footage-the-concept-of-digitalization-of-information-flow-moving-through-rack-servers-in-data-center-shot.mp4"
        },
        "preview_webm": {
          "url": "https://ak8.picdn.net/shutterstock/videos/33248488/preview/stock-footage-the-concept-of-digitalization-of-information-flow-moving-through-rack-servers-in-data-center-shot.webm"
        },
        "preview_mp4": {
          "url": "https://ak8.picdn.net/shutterstock/videos/33248488/preview/stock-footage-the-concept-of-digitalization-of-information-flow-moving-through-rack-servers-in-data-center-shot.mp4"
        },
        "thumb_jpg": {
          "url": "https://ak8.picdn.net/shutterstock/videos/33248488/thumb/12.jpg"
        },
        "preview_jpg": {
          "url": "https://ak8.picdn.net/shutterstock/videos/33248488/thumb/12.jpg"
        }
      },
      "url": "https://www.shutterstock.com/video/clip-33248488"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK VideoSearchResults
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Not found None

List similar videos


curl -X GET https://api.shutterstock.com/v2/videos/2140697/similar \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const queryParams = {
  "language": "es"
};

videosApi.getSimilarVideos("2140697", queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/2140697/similar",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/videos/{id}/similar Try it out

This endpoint searches for videos that are similar to a video that you specify.

Parameters

Parameter Type Description
id
(Required)
string

The ID of a video for which similar videos should be returned
(Parameter is part of path)

language Language

Language for the keywords and categories in the response
Valid values: cs, da, de, en, es, fi, fr, hu, it, ja, ko, nb, nl, pl, pt, ru, sv, th, tr, zh, zh-Hant

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 500, Default: 20

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: minimal

Accepted authentication

Example responses

OK

{
  "page": 1,
  "per_page": 1,
  "total_count": 200,
  "search_id": "",
  "data": [
    {
      "media_type": "video",
      "id": "6658088",
      "description": "Caucasian parents wearing casual clothes standing watching ocean waves summer daughters carrying bodyboards surfboards slow motion",
      "aspect": 1.778,
      "duration": 23,
      "contributor": {
        "id": "87721"
      },
      "aspect_ratio": "16:9",
      "assets": {
        "thumb_webm": {
          "url": "https://ak8.picdn.net/shutterstock/videos/6658088/thumb/stock-footage-caucasian-parents-wearing-casual-clothes-standing-watching-ocean-waves-summer-daughters-carrying.webm"
        },
        "thumb_mp4": {
          "url": "https://ak8.picdn.net/shutterstock/videos/6658088/thumb/stock-footage-caucasian-parents-wearing-casual-clothes-standing-watching-ocean-waves-summer-daughters-carrying.mp4"
        },
        "preview_webm": {
          "url": "https://ak8.picdn.net/shutterstock/videos/6658088/preview/stock-footage-caucasian-parents-wearing-casual-clothes-standing-watching-ocean-waves-summer-daughters-carrying.webm"
        },
        "preview_mp4": {
          "url": "https://ak8.picdn.net/shutterstock/videos/6658088/preview/stock-footage-caucasian-parents-wearing-casual-clothes-standing-watching-ocean-waves-summer-daughters-carrying.mp4"
        },
        "thumb_jpg": {
          "url": "https://ak8.picdn.net/shutterstock/videos/6658088/thumb/1.jpg"
        },
        "preview_jpg": {
          "url": "https://ak8.picdn.net/shutterstock/videos/6658088/thumb/1.jpg"
        }
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK VideoSearchResults
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List updated videos

curl -X GET https://api.shutterstock.com/v2/videos/updated \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "interval=30 MINUTE"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const queryParams = {
  "interval": "30 MINUTE"
};

videosApi.getUpdatedVideos(queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "interval" => "30 MINUTE"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/updated?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/videos/updated Try it out

This endpoint lists videos that have been updated in the specified time period to update content management systems (CMS) or digital asset management (DAM) systems. In most cases, use the interval parameter to show videos that were updated recently, but you can also use the start_date and end_date parameters to specify a range of no more than three days. Do not use the interval parameter with either start_date or end_date.

Parameters

Parameter Type Description
start_date string

Show videos updated on or after the specified date
Format: YYYY-MM-DD
Example: 2020-05-29

end_date string

Show videos updated before the specified date
Format: YYYY-MM-DD
Example: 2020-05-29

interval string

Show videos updated in the specified time period, where the time period is an interval (like SQL INTERVAL) such as 1 DAY, 6 HOUR, or 30 MINUTE; the default is 1 HOUR, which shows videos that were updated in the hour preceding the request
Default: 1 HOUR

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 2000, Default: 100

sort string

Sort by oldest or newest videos first
Valid values: newest, oldest
Default: newest

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "1030611710",
      "updated_time": "2019-06-04T15:57:31-04:00",
      "updates": [
        "addition",
        "edit"
      ]
    },
    {
      "id": "1030611713",
      "updated_time": "2019-06-04T15:57:31-04:00",
      "updates": [
        "addition",
        "edit"
      ]
    },
    {
      "id": "1030611719",
      "updated_time": "2019-06-04T15:57:31-04:00",
      "updates": [
        "addition",
        "edit"
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK UpdatedMediaDataList

Details

List videos


curl -X GET https://api.shutterstock.com/v2/videos \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "id=639703" \
--data-urlencode "id=993721" 
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const queryParams = {
  "id": [
    "639703",
    "993721"
  ]
};

videosApi.getVideoList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos?id=639703&id=993721",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/videos Try it out

This endpoint lists information about one or more videos, including the aspect ratio and URLs to previews.

Parameters

Parameter Type Description
id
(Required)
array[string]

One or more video IDs

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: minimal

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "media_type": "video",
      "id": "639703",
      "description": "A family of African Forest Elephants play in the mud in the jungle of the Congo River basin.",
      "aspect": 1.481,
      "duration": 11,
      "contributor": {
        "id": "335419"
      },
      "aspect_ratio": "3:2",
      "assets": {
        "thumb_webm": {
          "url": "https://ak3.picdn.net/shutterstock/videos/639703/thumb/stock-footage-a-family-of-african-forest-elephants-play-in-the-mud-in-the-jungle-of-the-congo-river-basin.webm"
        },
        "thumb_mp4": {
          "url": "https://ak3.picdn.net/shutterstock/videos/639703/thumb/stock-footage-a-family-of-african-forest-elephants-play-in-the-mud-in-the-jungle-of-the-congo-river-basin.mp4"
        },
        "preview_webm": {
          "url": "https://ak3.picdn.net/shutterstock/videos/639703/preview/stock-footage-a-family-of-african-forest-elephants-play-in-the-mud-in-the-jungle-of-the-congo-river-basin.webm"
        },
        "preview_mp4": {
          "url": "https://ak3.picdn.net/shutterstock/videos/639703/preview/stock-footage-a-family-of-african-forest-elephants-play-in-the-mud-in-the-jungle-of-the-congo-river-basin.mp4"
        },
        "thumb_jpg": {
          "url": "https://ak3.picdn.net/shutterstock/videos/639703/thumb/1.jpg"
        },
        "preview_jpg": {
          "url": "https://ak3.picdn.net/shutterstock/videos/639703/thumb/1.jpg"
        }
      },
      "url": "https://www.shutterstock.com/video/clip-639703"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK VideoDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Get details about videos


curl -X GET https://api.shutterstock.com/v2/videos/30867073 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const queryParams = {
  "language": "es"
};

videosApi.getVideo("30867073", queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/30867073",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/videos/{id} Try it out

This endpoint shows information about a video, including URLs to previews and the sizes that it is available in.

Parameters

Parameter Type Description
id
(Required)
string

Video ID
(Parameter is part of path)

language Language

Language for the keywords and categories in the response
Valid values: cs, da, de, en, es, fi, fr, hu, it, ja, ko, nb, nl, pl, pt, ru, sv, th, tr, zh, zh-Hant

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: full

Accepted authentication

Example responses

OK

{
  "media_type": "video",
  "id": "30867073",
  "description": "Fans cheering for sports team on the bleachers of a professional stadium",
  "aspect": 1.896,
  "duration": 19,
  "categories": [
    {
      "name": "People",
      "id": "13"
    },
    {
      "name": "Sports/Recreation",
      "id": "18"
    }
  ],
  "keywords": [
    "4k resolution",
    "adult",
    "adults only",
    "american football - sport",
    "applauding",
    "arms raised"
  ],
  "has_model_release": true,
  "has_property_release": true,
  "models": [
    {
      "id": "22793203"
    }
  ],
  "contributor": {
    "id": "907171"
  },
  "is_adult": false,
  "aspect_ratio": "1.90:1",
  "added_date": "2017-09-18",
  "assets": {
    "thumb_webm": {
      "url": "https://ak3.picdn.net/shutterstock/videos/30867073/thumb/stock-footage-fans-cheering-for-sports-team-on-the-bleachers-of-a-professional-stadium.webm"
    },
    "thumb_mp4": {
      "url": "https://ak3.picdn.net/shutterstock/videos/30867073/thumb/stock-footage-fans-cheering-for-sports-team-on-the-bleachers-of-a-professional-stadium.mp4"
    },
    "preview_webm": {
      "url": "https://ak3.picdn.net/shutterstock/videos/30867073/preview/stock-footage-fans-cheering-for-sports-team-on-the-bleachers-of-a-professional-stadium.webm"
    },
    "preview_mp4": {
      "url": "https://ak3.picdn.net/shutterstock/videos/30867073/preview/stock-footage-fans-cheering-for-sports-team-on-the-bleachers-of-a-professional-stadium.mp4"
    },
    "thumb_jpgs": {
      "urls": [
        "https://ak3.picdn.net/shutterstock/videos/30867073/thumb/1.jpg",
        "https://ak3.picdn.net/shutterstock/videos/30867073/thumb/2.jpg",
        "https://ak3.picdn.net/shutterstock/videos/30867073/thumb/3.jpg",
        "https://ak3.picdn.net/shutterstock/videos/30867073/thumb/12.jpg"
      ]
    },
    "thumb_jpg": {
      "url": "https://ak3.picdn.net/shutterstock/videos/30867073/thumb/1.jpg"
    },
    "preview_jpg": {
      "url": "https://ak3.picdn.net/shutterstock/videos/30867073/thumb/1.jpg"
    },
    "sd": {
      "height": 480,
      "width": 910,
      "fps": 25,
      "format": "mov",
      "file_size": 18221056,
      "display_name": "Standard Definition MPEG",
      "is_licensable": true
    },
    "hd": {
      "height": 1080,
      "width": 2046,
      "fps": 25,
      "format": "mov",
      "file_size": 92101632,
      "display_name": "HD MPEG",
      "is_licensable": true
    },
    "web": {
      "height": 240,
      "width": 454,
      "fps": 25,
      "format": "mov",
      "file_size": 6441984,
      "display_name": "Low Resolution MPEG",
      "is_licensable": true
    },
    "4k": {
      "height": 2160,
      "width": 4096,
      "fps": 25,
      "format": "apch",
      "file_size": 1859655680,
      "display_name": "Original UltraHD 4K",
      "is_licensable": true
    }
  },
  "url": "https://www.shutterstock.com/video/clip-30867073"
}

Responses

Status Meaning Description Schema
200 OK OK Video
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Not found None

List video categories


curl -X GET https://api.shutterstock.com/v2/videos/categories \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const queryParams = {
  "language": "es"
};

videosApi.getVideoCategories(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/categories",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/videos/categories Try it out

This endpoint lists the categories (Shutterstock-assigned genres) that videos can belong to.

Parameters

Parameter Type Description
language Language

Language for the keywords and categories in the response
Valid values: cs, da, de, en, es, fi, fr, hu, it, ja, ko, nb, nl, pl, pt, ru, sv, th, tr, zh, zh-Hant

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "1",
      "name": "Animals/Wildlife"
    },
    {
      "id": "2",
      "name": "Buildings/Landmarks"
    },
    {
      "id": "3",
      "name": "Backgrounds/Textures"
    },
    {
      "id": "4",
      "name": "Business/Finance"
    },
    {
      "id": "5",
      "name": "Education"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK CategoryDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Licenses and downloads

License videos

DATA='{
  "videos": [
    {
      "video_id": "2140697",
      "size": "hd"
    },
    {
      "video_id": "5613314",
      "size": "4k"
    }
  ]
}'

curl -X POST 'https://api.shutterstock.com/v2/videos/licenses?subscription_id='$SUBSCRIPTION_ID \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const body = {
  "videos": [
    {
      "video_id": "419235589"
    },
    {
      "video_id": "1079756147"
    }
  ]
};

const queryParams = {
  "subscription_id": SHUTTERSTOCK_SUBSCRIPTION_ID,
  "size": "web"
};

videosApi.searchVideos(body, queryParams)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$body = [
  "videos" => [
    [
      "video_id" => "2140697",
      "size" => "hd"
    ],
    [
      "video_id" => "5613314",
      "size" => "4k"
    ]
  ]
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/licenses?subscription_id=$SUBSCRIPTION_ID",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/videos/licenses Try it out

This endpoint gets licenses for one or more videos. You must specify the video IDs in the body parameter and the size and subscription ID either in the query parameter or with each video ID in the body parameter. Values in the body parameter override values in the query parameters.

Parameters

Parameter Type Description
subscription_id string

The subscription ID to use for licensing

size string

The size of the video to license
Valid values: web, sd, hd, 4k
Default: web

search_id string

The Search ID that led to this licensing event

Body

Schema: LicenseVideoRequest
List of videos to request licenses for and information about each license transaction; these values override the defaults in the query parameters

Fields:

Field Type Description
videos [LicenseVideo] Videos to license
auth_cookie Cookie Cookie object
name string The name of the cookie
value string The value of the cookie
editorial_acknowledgement boolean Whether or not this item is editorial content
metadata LicenseRequestMetadata Additional information for license requests for enterprise accounts and API subscriptions, 4 fields maximum; which fields are required is set by the account holder
price number Retail price amount; only for rev-share partners
search_id string ID of the search that led to this licensing event
show_modal boolean (Deprecated)
size string Size of the video being licensed
subscription_id string ID of the subscription used for this license
video_id string ID of the video being licensed

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "video_id": "2140697",
      "download": {
        "url": "https://download.shutterstock.com/gatekeeper/W3siZSI6MTQ5NzAyNjU1MiwiayI6InZpZGVvLzIxNDA2OTcvc2QubW92IiwibSI6IjEiLCJkIjoic2h1dHRlcnN0b2NrLW1lZGlhIn0sInVsOFY1dElzb3lWZHNxb3JyWlJjS1dyb016TSJd/shutterstock_v2140697.mov"
      },
      "allotment_charge": 1
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK LicenseVideoResultDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List video licenses


curl -X GET https://api.shutterstock.com/v2/videos/licenses \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

videosApi.getVideoLicenseList()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/licenses",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/videos/licenses Try it out

This endpoint lists existing licenses. You can filter the results according to the type of license or the video ID.

Parameters

Parameter Type Description
video_id string

Show licenses for the specified video ID

license string

Show videos that are available with the specified license, such as standard or enhanced; prepending a - sign excludes results from that license

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 200, Default: 20

sort string

Sort by oldest or newest videos first
Valid values: newest, oldest
Default: newest

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "v3286346",
      "user": {
        "username": "myusername"
      },
      "license": "footage_premier",
      "subscription_id": "s8907043",
      "download_time": "2018-05-24T14:26:25-04:00",
      "metadata": {
        "customer_id": "12345",
        "geo_location": "US",
        "number_viewed": "15",
        "search_term": "dog"
      },
      "video": {
        "id": "2140697",
        "format": {
          "size": "sd"
        }
      }
    },
    {
      "id": "v3285467",
      "user": {
        "username": "myusername"
      },
      "license": "footage_premier",
      "subscription_id": "s8907043",
      "download_time": "2018-05-23T10:10:24-04:00",
      "metadata": {
        "customer_id": "12345",
        "geo_location": "US",
        "number_viewed": "15",
        "search_term": "dog"
      },
      "video": {
        "id": "2140697",
        "format": {
          "size": "sd"
        }
      }
    },
    {
      "id": "v3283718",
      "user": {
        "username": "myusername"
      },
      "license": "footage_premier",
      "subscription_id": "s8907043",
      "download_time": "2018-05-22T07:51:17-04:00",
      "metadata": {
        "customer_id": "12345",
        "geo_location": "US",
        "number_viewed": "15",
        "search_term": "dog"
      },
      "video": {
        "id": "2140697",
        "format": {
          "size": "sd"
        }
      }
    },
    {
      "id": "v3283019",
      "user": {
        "username": "myusername"
      },
      "license": "footage_premier",
      "subscription_id": "s8907043",
      "download_time": "2018-05-21T12:01:07-04:00",
      "metadata": {
        "customer_id": "12345",
        "geo_location": "US",
        "number_viewed": "15",
        "search_term": "dog"
      },
      "video": {
        "id": "2140697",
        "format": {
          "size": "sd"
        }
      }
    },
    {
      "id": "v3283016",
      "user": {
        "username": "myusername"
      },
      "license": "footage_premier",
      "subscription_id": "s8907043",
      "download_time": "2018-05-21T11:59:43-04:00",
      "metadata": {
        "customer_id": "12345",
        "geo_location": "US",
        "number_viewed": "15",
        "search_term": "dog"
      },
      "video": {
        "id": "2140697",
        "format": {
          "size": "sd"
        }
      }
    },
    {
      "id": "v3278213",
      "user": {
        "username": "myusername"
      },
      "license": "footage_premier",
      "subscription_id": "s8907043",
      "download_time": "2018-05-15T10:53:10-04:00",
      "metadata": {
        "customer_id": "12345",
        "geo_location": "US",
        "number_viewed": "15",
        "search_term": "dog"
      },
      "video": {
        "id": "2140697",
        "format": {
          "size": "sd"
        }
      }
    },
    {
      "id": "v3277514",
      "user": {
        "username": "myusername"
      },
      "license": "footage_premier",
      "subscription_id": "s8907043",
      "download_time": "2018-05-14T23:31:59-04:00",
      "metadata": {
        "customer_id": "12345",
        "geo_location": "US",
        "number_viewed": "15",
        "search_term": "dog"
      },
      "video": {
        "id": "2140697",
        "format": {
          "size": "sd"
        }
      }
    },
    {
      "id": "v3275900",
      "user": {
        "username": "myusername"
      },
      "license": "footage_premier",
      "subscription_id": "s8907043",
      "download_time": "2018-05-14T12:52:40-04:00",
      "metadata": {
        "customer_id": "12345",
        "geo_location": "US",
        "number_viewed": "15",
        "search_term": "dog"
      },
      "video": {
        "id": "2140697",
        "format": {
          "size": "sd"
        }
      }
    },
    {
      "id": "v3273884",
      "user": {
        "username": "myusername"
      },
      "license": "footage_premier",
      "subscription_id": "s8907043",
      "download_time": "2018-05-10T15:38:20-04:00",
      "metadata": {
        "customer_id": "12345",
        "geo_location": "US",
        "number_viewed": "15",
        "search_term": "dog"
      },
      "video": {
        "id": "2140697",
        "format": {
          "size": "sd"
        }
      }
    },
    {
      "id": "v3273878",
      "user": {
        "username": "myusername"
      },
      "license": "footage_premier",
      "subscription_id": "s8907043",
      "download_time": "2018-05-10T15:24:28-04:00",
      "metadata": {
        "customer_id": "12345",
        "geo_location": "US",
        "number_viewed": "15",
        "search_term": "dog"
      },
      "video": {
        "id": "2140697",
        "format": {
          "size": "sd"
        }
      }
    }
  ],
  "page": 1,
  "per_page": 20
}

Responses

Status Meaning Description Schema
200 OK OK DownloadHistoryDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Download videos

DATA='{}'

curl -X POST https://api.shutterstock.com/v2/videos/licenses/i1188641347/downloads \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const licenseId = "i1188641347";

const body = {};

videosApi.downloadVideos(licenseId, body)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$body = [];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/licenses/i1188641347/downloads",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/videos/licenses/{id}/downloads Try it out

This endpoint redownloads videos that you have already received a license for.

Parameters

Parameter Type Description
id
(Required)
string

The license ID of the item to (re)download
(Parameter is part of path)

Body

Schema: RedownloadVideo
Information about the videos to redownload

Fields:

Field Type Description
auth_cookie Cookie Cookie object
name string The name of the cookie
value string The value of the cookie
show_modal boolean (Deprecated)
verification_code string The verification code to use to redownload the video

Accepted authentication

Example responses

OK

{
  "url": "https://download1.shutterstock.com/gatekeeper/W3siZSI6MTUzMzMzMzUzMCwiayI6InZpZGVvLzM5NjU4ODEvaGQubW92IiwibSI6MSwiZCI6InNodXR0ZXJzdG9jay1tZWRpYSJ9LCJjZ2lvRU14T09hNWZGTHZsN21iTWVPRVQ3MFEiXQ/shutterstock_v3965881.mov"
}

Responses

Status Meaning Description Schema
200 OK OK Url
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Collections

Create video collections

DATA='{
  "name": "New collection name"
}'

curl -X POST https://api.shutterstock.com/v2/videos/collections \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const body = {
  "name": "New collection name"
};

videosApi.createClipbox(body)
  .catch((error) => {
    console.error(error);
  });
$body = [
  "name" => "New collection name"
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/videos/collections Try it out

This endpoint creates one or more collections (clipboxes). To add videos to collections, use POST /v2/videos/collections/{id}/items.

Body

Schema: CollectionCreateRequest
Collection metadata

Fields:

Field Type Description
name string The name of the collection

Accepted authentication

Example responses

200 Response

{
  "id": "48433105"
}

Successfully created collection

{
  "id": "10120264"
}

Responses

Status Meaning Description Schema
200 OK No response was specified CollectionCreateResponse
201 Created Successfully created collection CollectionCreateResponse
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List video collections


curl -X GET https://api.shutterstock.com/v2/videos/collections \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

videosApi.getClipboxList()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/videos/collections Try it out

This endpoint lists your collections of videos and their basic attributes.

Parameters

Parameter Type Description
page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 150, Default: 100

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "name": "kittens and puppies",
      "updated_time": "2017-07-05T08:51:00-04:00",
      "id": "17553374",
      "total_item_count": 0,
      "created_time": "2017-07-05T08:51:00-04:00"
    },
    {
      "name": "wild life",
      "updated_time": "2017-07-05T08:51:00-04:00",
      "id": "17553375",
      "total_item_count": 0,
      "created_time": "2017-07-05T08:51:00-04:00"
    },
    {
      "name": "young couples",
      "updated_time": "2017-07-06T08:50:57-04:00",
      "id": "17555175",
      "total_item_count": 2,
      "created_time": "2017-07-06T08:50:57-04:00"
    },
    {
      "name": "sky timelapses",
      "updated_time": "2017-07-06T08:50:58-04:00",
      "id": "17555176",
      "total_item_count": 2,
      "created_time": "2017-07-06T08:50:58-04:00"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK CollectionDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Get the details of video collections


curl -X GET https://api.shutterstock.com/v2/videos/collections/17555176 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

videosApi.getClipbox("17555176")
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/videos/collections/{id} Try it out

This endpoint gets more detailed information about a collection, including the timestamp for its creation and the number of videos in it. To get the videos in collections, use GET /v2/videos/collections/{id}/items.

Parameters

Parameter Type Description
id
(Required)
string

The ID of the collection to return
(Parameter is part of path)

Accepted authentication

Example responses

OK

{
  "name": "cats and dogs",
  "updated_time": "2017-07-05T08:51:00-04:00",
  "id": "17555176",
  "total_item_count": "0"
}

Responses

Status Meaning Description Schema
200 OK OK Collection
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Rename video collections

DATA='{
  "name": "Updated collection name"
}'

curl -X POST https://api.shutterstock.com/v2/videos/collections/17555176 \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const collectionId = "186765119";

const body = {
  "name": "My new collection name"
};

videosApi.renameClipbox(collectionId, body)
  .catch((error) => {
    console.error(error);
  });
$body = [
  "name" => "Updated collection name"
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/videos/collections/{id} Try it out

This endpoint sets a new name for a collection.

Parameters

Parameter Type Description
id
(Required)
string

The ID of the collection to rename
(Parameter is part of path)

Body

Schema: CollectionUpdateRequest
The new name for the collection

Fields:

Field Type Description
name string The new name of the collection

Accepted authentication

Responses

Status Meaning Description Schema
200 OK No response was specified None
204 No Content Successfully updated collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Delete video collections

curl -X DELETE https://api.shutterstock.com/v2/videos/collections/17555176 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const collectionId = "17555176";

videosApi.deleteClipbox(collectionId)
  .catch((error) => {
    console.error(error);
  });
$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

DELETE /v2/videos/collections/{id} Try it out

This endpoint deletes a collection.

Parameters

Parameter Type Description
id
(Required)
string

The ID of the collection to delete
(Parameter is part of path)

Accepted authentication

Responses

Status Meaning Description Schema
200 OK No response was specified None
204 No Content Successfully deleted collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Add videos to collections

DATA='{
  "items": [
    {
      "id": "10120264"
    },
    {
      "id": "24419024"
    }
  ]
}'

curl -X POST https://api.shutterstock.com/v2/videos/collections/17555176/items \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const collectionId = "17555176"; // Collection ID

// Array of videos to add
const body = {
  "items": [
    {
      "id": "10120264",
      "media_type": "video"
    }
  ]
};

videosApi.addLightboxItems(collectionId, body)
  .catch((error) => {
    console.error(error);
  });
$body = [
  "items" => [
    [
      "id" => "10120264"
    ],
    [
      "id" => "24419024"
    ]
  ]
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176/items",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/videos/collections/{id}/items Try it out

This endpoint adds one or more videos to a collection by video IDs.

Parameters

Parameter Type Description
id
(Required)
string

The ID of the collection to which items should be added
(Parameter is part of path)

Body

Schema: CollectionItemRequest
Array of video IDs to add to the collection

Fields:

Field Type Description
items [CollectionItem] List of items
added_time string The date the item was added to the collection
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00
id string ID of the item
media_type string The media type of the item, such as image, video, or audio

Accepted authentication

Responses

Status Meaning Description Schema
200 OK No response was specified None
204 No Content Successfully added collection items None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Get the contents of video collections


curl -X GET https://api.shutterstock.com/v2/videos/collections/17555176/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

videosApi.getClipboxItems("17555176")
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176/items",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/videos/collections/{id}/items Try it out

This endpoint lists the IDs of videos in a collection and the date that each was added.

Parameters

Parameter Type Description
id
(Required)
string

The ID of the Collection whose items are to be returned
(Parameter is part of path)

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 150, Default: 100

sort string

Sort order
Valid values: newest, oldest
Default: oldest

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "added_time": "2017-07-06T14:33:42-04:00",
      "id": "123123",
      "media_type": "video"
    },
    {
      "added_time": "2017-07-06T14:33:42-04:00",
      "id": "654654",
      "media_type": "video"
    }
  ],
  "page": 1,
  "per_page": 100
}

Responses

Status Meaning Description Schema
200 OK OK CollectionItemDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Remove videos from collections

curl -X DELETE https://api.shutterstock.com/v2/videos/collections/17555176/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const collectionId = "17555176";

// Array of videos to remove
const videosToRemove = {
  "item_id": [
    "10120264"
  ]
};

videosApi.deleteClipboxItems(collectionId, videosToRemove)
  .catch((error) => {
    console.error(error);
  });
$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176/items",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

DELETE /v2/videos/collections/{id}/items Try it out

This endpoint removes one or more videos from a collection.

Parameters

Parameter Type Description
id
(Required)
string

The ID of the Collection from which items will be deleted
(Parameter is part of path)

item_id array[string]

One or more video IDs to remove from the collection

Accepted authentication

Responses

Status Meaning Description Schema
200 OK No response was specified None
204 No Content Successfully removed collection items None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Audio

Search for tracks

curl -X GET "https://api.shutterstock.com/v2/audio/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=bluegrass" \
--data-urlencode "duration_from=60" \
--data-urlencode "moods=uplifting"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const queryParams = {
  "query": "bluegrass",
  "duration_from": 60,
  "moods": ["uplifting"]
};

audioApi.searchAudio(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "query" => "bluegrass",
  "duration_from" => 60,
  "moods" => "uplifting"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/audio/search Try it out

This endpoint searches for tracks. If you specify more than one search parameter, the API uses an AND condition. Array parameters can be specified multiple times; in this case, the API uses an AND or an OR condition with those values, depending on the parameter.

Parameters

Parameter Type Description
artists array[string]

Show tracks with one of the specified artist names or IDs

bpm integer

(Deprecated; use bpm_from and bpm_to instead) Show tracks with the specified beats per minute

bpm_from integer

Show tracks with the specified beats per minute or faster

bpm_to integer

Show tracks with the specified beats per minute or slower

duration integer

Show tracks with the specified duration in seconds

duration_from integer

Show tracks with the specified duration or longer in seconds

duration_to integer

Show tracks with the specified duration or shorter in seconds

genre array[string]

Show tracks with each of the specified genres; to get the list of genres, use GET /v2/audio/genres

is_instrumental boolean

Show instrumental music only

instruments array[string]

Show tracks with each of the specified instruments; to get the list of instruments, use GET /v2/audio/instruments

moods array[string]

Show tracks with each of the specified moods; to get the list of moods, use GET /v2/audio/moods

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Maximum: 500, Default: 20

query string

One or more search terms separated by spaces

sort string

Sort by
Valid values: score, ranking_all, artist, title, bpm, freshness, duration

sort_order string

Sort order
Valid values: asc, desc
Default: desc

vocal_description string

Show tracks with the specified vocal description (male, female)

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: minimal

fields string

Fields to display in the response; see the documentation for the fields parameter in the overview section

library string

Which library to search
Valid values: shutterstock, premier
Default: premier

language string

Which language to search in

Accepted authentication

Example responses

OK

{
  "vocal_description": "",
  "keywords": [
    "celebratory",
    "chic",
    "euphoric",
    "good times",
    "hip",
    "optimistic",
    "party",
    "soaring",
    "upbeat"
  ],
  "artists": [
    {
      "name": "Klimenko Music"
    }
  ],
  "genres": [
    "Dance/Electronic",
    "Electro Pop",
    "Pop/Rock"
  ],
  "instruments": [
    "Piano",
    "Synth bass",
    "Synth drums",
    "Synthesizer"
  ],
  "id": "442583",
  "isrc": "",
  "description": "Pulsing and feel-good, featuring soaring synthesizer, groovy synth bass drums and synth drums that create a euphoric, upbeat mood.",
  "similar_artists": [],
  "releases": [],
  "is_instrumental": true,
  "title": "Another Tomorrow",
  "is_adult": false,
  "lyrics": "",
  "media_type": "audio",
  "recording_version": "",
  "moods": [
    "Bright",
    "Confident",
    "Fun",
    "Happy",
    "Inspiring",
    "Optimistic",
    "Playful",
    "Sophisticated",
    "Stylish",
    "Uplifting"
  ],
  "language": "en",
  "assets": {
    "clean_audio": {
      "file_size": 35188408
    },
    "preview_mp3": {
      "file_size": 4400203,
      "url": "https://ak.picdn.net/shutterstock/audio/442583/preview/preview.mp3"
    },
    "preview_ogg": {
      "file_size": 4453197,
      "url": "https://ak.picdn.net/shutterstock/audio/442583/preview/preview.ogg"
    },
    "waveform": {
      "file_size": 18778,
      "url": "https://ak.picdn.net/shutterstock/audio/442583/waveform/waveform.png"
    }
  },
  "contributor": {
    "id": "2847971"
  },
  "duration": 183,
  "album": {
    "id": "",
    "title": ""
  },
  "published_time": "2016-08-16T14:30:03-04:00",
  "updated_time": "2016-08-18T17:59:33-04:00",
  "bpm": 110,
  "added_date": "2016-08-16",
  "url": "https://www.shutterstock.com/music/track/another-tomorrow/442583"
}

Responses

Status Meaning Description Schema
200 OK OK AudioSearchResults
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List audio genres


curl -X GET https://api.shutterstock.com/v2/audio/genres \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

audioApi.getGenres()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/genres",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/audio/genres Try it out

This endpoint returns a list of all audio genres.

Accepted authentication

Example responses

OK

{
  "data": [
    "Rock"
  ]
}

Responses

Status Meaning Description Schema
200 OK OK GenreList

List audio instruments


curl -X GET https://api.shutterstock.com/v2/audio/instruments \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

audioApi.getInstruments()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/instruments",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/audio/instruments Try it out

This endpoint returns a list of all audio instruments.

Accepted authentication

Example responses

OK

{
  "data": [
    "Electric Guitar"
  ]
}

Responses

Status Meaning Description Schema
200 OK OK InstrumentList

List audio moods


curl -X GET https://api.shutterstock.com/v2/audio/moods \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

audioApi.getMoods()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/moods",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/audio/moods Try it out

This endpoint returns a list of all audio moods.

Accepted authentication

Example responses

OK

{
  "data": [
    "Aggressive"
  ]
}

Responses

Status Meaning Description Schema
200 OK OK MoodList

Details

List audio tracks


curl -X GET https://api.shutterstock.com/v2/audio \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "id=442583" \
--data-urlencode "id=434750" 
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const queryParams = {
  "id": [
    "442583",
    "434750"
  ],
  "view": "full"
};

audioApi.getTrackList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio?id=442583&id=434750",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/audio Try it out

This endpoint lists information about one or more audio tracks, including the description and publication date.

Parameters

Parameter Type Description
id
(Required)
array[string]

One or more audio IDs

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: minimal

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "vocal_description": "",
      "keywords": [
        "breezy",
        "celebration",
        "festive",
        "good times",
        "hopeful",
        "optimistic",
        "party",
        "positive",
        "reflective"
      ],
      "artists": [
        {
          "name": "Fin Productions"
        }
      ],
      "genres": [
        "Dance/Electronic",
        "Electro Pop",
        "Pop/Rock"
      ],
      "instruments": [
        "Bass",
        "Drums",
        "Electric guitar",
        "Pads",
        "Percussion",
        "Synthesizer"
      ],
      "id": "434750",
      "isrc": "",
      "description": "Pulsing and feel-good, featuring slick electric guitar, synthesizer, bass, electronic drum pads and drums that create a positive, celebratory mood.",
      "similar_artists": [],
      "releases": [],
      "is_instrumental": true,
      "title": "Fresh Love",
      "is_adult": false,
      "lyrics": "",
      "media_type": "audio",
      "recording_version": "",
      "moods": [
        "Bright",
        "Confident",
        "Fun",
        "Happy",
        "Inspiring",
        "Optimistic",
        "Playful",
        "Sophisticated",
        "Stylish",
        "Uplifting"
      ],
      "language": "en",
      "assets": {
        "clean_audio": {
          "file_size": 30760372
        },
        "preview_mp3": {
          "file_size": 3846606,
          "url": "https://ak.picdn.net/shutterstock/audio/434750/preview/preview.mp3"
        },
        "preview_ogg": {
          "file_size": 4402608,
          "url": "https://ak.picdn.net/shutterstock/audio/434750/preview/preview.ogg"
        },
        "waveform": {
          "file_size": 19822,
          "url": "https://ak.picdn.net/shutterstock/audio/434750/waveform/waveform.png"
        }
      },
      "contributor": {
        "id": "2847971"
      },
      "duration": 160,
      "album": {
        "id": "",
        "title": ""
      },
      "published_time": "2016-04-12T17:45:29-04:00",
      "updated_time": "2016-08-18T18:03:11-04:00",
      "bpm": 100,
      "added_date": "2016-04-12",
      "url": "https://www.shutterstock.com/music/track/another-tomorrow/442583"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK AudioDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Get details about audio tracks


curl -X GET https://api.shutterstock.com/v2/audio/442583 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const queryParams = {
  "view": "full"
};

audioApi.getTrack("442583", queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/442583",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/audio/{id} Try it out

This endpoint shows information about a track, including its genres, instruments, and other attributes.

Parameters

Parameter Type Description
id
(Required)
string

Audio track ID
(Parameter is part of path)

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: full

Accepted authentication

Example responses

OK

{
  "vocal_description": "",
  "keywords": [
    "celebratory",
    "chic",
    "euphoric",
    "good times",
    "hip",
    "optimistic",
    "party",
    "soaring",
    "upbeat"
  ],
  "artists": [
    {
      "name": "Klimenko Music"
    }
  ],
  "genres": [
    "Dance/Electronic",
    "Electro Pop",
    "Pop/Rock"
  ],
  "instruments": [
    "Piano",
    "Synth bass",
    "Synth drums",
    "Synthesizer"
  ],
  "id": "442583",
  "isrc": "",
  "description": "Pulsing and feel-good, featuring soaring synthesizer, groovy synth bass drums and synth drums that create a euphoric, upbeat mood.",
  "similar_artists": [],
  "releases": [],
  "is_instrumental": true,
  "title": "Another Tomorrow",
  "is_adult": false,
  "lyrics": "",
  "media_type": "audio",
  "recording_version": "",
  "moods": [
    "Bright",
    "Confident",
    "Fun",
    "Happy",
    "Inspiring",
    "Optimistic",
    "Playful",
    "Sophisticated",
    "Stylish",
    "Uplifting"
  ],
  "language": "en",
  "assets": {
    "clean_audio": {
      "file_size": 35188408
    },
    "preview_mp3": {
      "file_size": 4400203,
      "url": "https://ak.picdn.net/shutterstock/audio/442583/preview/preview.mp3"
    },
    "preview_ogg": {
      "file_size": 4453197,
      "url": "https://ak.picdn.net/shutterstock/audio/442583/preview/preview.ogg"
    },
    "waveform": {
      "file_size": 18778,
      "url": "https://ak.picdn.net/shutterstock/audio/442583/waveform/waveform.png"
    }
  },
  "contributor": {
    "id": "2847971"
  },
  "duration": 183,
  "album": {
    "id": "",
    "title": ""
  },
  "published_time": "2016-08-16T14:30:03-04:00",
  "updated_time": "2016-08-18T17:59:33-04:00",
  "bpm": 110,
  "added_date": "2016-08-16",
  "url": "https://www.shutterstock.com/music/track/another-tomorrow/442583"
}

Responses

Status Meaning Description Schema
200 OK OK Audio
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Licenses and downloads

License audio tracks

DATA='{
  "audio": [
    {
      "audio_id": "591623",
      "license": "audio_standard",
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
}'

curl -X POST https://api.shutterstock.com/v2/audio/licenses \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const body = {
  "audio": [
    {
      "audio_id": "446348",
      "license": "premier_music_comp",
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
};

audioApi.licenseTrack(body)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$body = [
  "audio" => [
    [
      "audio_id" => "591623",
      "license" => "audio_standard",
      "metadata" => [
      "customer_id" => "12345"
      ]
    ]
  ]
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/licenses",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/audio/licenses Try it out

This endpoint gets licenses for one or more tracks.

Parameters

Parameter Type Description
license string

License type
Valid values: audio_standard, audio_enhanced, audio_platform, premier_music_basic, premier_music_extended, premier_music_pro, premier_music_comp
Default: audio_standard

search_id string

The ID of the search that led to licensing this track

Body

Schema: LicenseAudioRequest
Tracks to license

Fields:

Field Type Description
audio [LicenseAudio] List of audio tracks to license
audio_id string ID of the track being licensed
license string Type of license
search_id string ID of the search that led to this licensing event

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "audio_id": "1",
      "download": {
        "url": "http://download2.dev.shutterstock.com/gatekeeper/abc/original.wav"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK LicenseAudioResultDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List audio licenses


curl -X GET https://api.shutterstock.com/v2/audio/licenses \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const queryParams = {
  "audio_id": "1"
};

audioApi.getAudioLicenseList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/licenses",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/audio/licenses Try it out

This endpoint lists existing licenses. You can filter the results according to the track ID to see if you have an existing license for a specific track.

Parameters

Parameter Type Description
audio_id string

Show licenses for the specified track ID

Accepted authentication

Example responses

200 Response

{
  "description": "List of download events",
  "properties": {
    "data": {
      "description": "Download events",
      "items": {
        "description": "Information about a downloaded media item. Applicable for all media types, only one of 'audio', 'image' or 'video' will be in a single DownloadHistory object",
        "properties": {
          "audio": {
            "description": "Information about the downloaded media",
            "properties": {
              "format": {
                "description": "Information about the format of a download",
                "properties": {
                  "format": {
                    "description": "The format of the downloaded media",
                    "type": "string"
                  },
                  "size": {
                    "description": "The size of the downloaded media",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "id": {
                "description": "ID of the download history media details",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "download_time": {
            "description": "Date the media was downloaded the first time",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "ID of the download",
            "type": "string"
          },
          "image": {
            "description": "Information about the downloaded media",
            "properties": {
              "format": {
                "description": "Information about the format of a download",
                "properties": {
                  "format": {
                    "description": "The format of the downloaded media",
                    "type": "string"
                  },
                  "size": {
                    "description": "The size of the downloaded media",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "id": {
                "description": "ID of the download history media details",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "is_downloadable": {
            "description": "Specifies if the media is downloadable via its respective downloads endpoint",
            "type": "boolean"
          },
          "license": {
            "description": "The name of the license of this download",
            "type": "string"
          },
          "metadata": {
            "description": "The metadata that was passed in the original licensing request",
            "type": "object"
          },
          "subscription_id": {
            "description": "ID of the subscription used to perform this download",
            "type": "string"
          },
          "user": {
            "description": "Information about a user",
            "properties": {
              "username": {
                "description": "The name of the user who downloaded the item",
                "type": "string"
              }
            },
            "required": [
              "username"
            ],
            "type": "object"
          },
          "video": {
            "description": "Information about the downloaded media",
            "properties": {
              "format": {
                "description": "Information about the format of a download",
                "properties": {
                  "format": {
                    "description": "The format of the downloaded media",
                    "type": "string"
                  },
                  "size": {
                    "description": "The size of the downloaded media",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "id": {
                "description": "ID of the download history media details",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "download_time",
          "license"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "errors": {
      "description": "Error list; appears only if there was an error",
      "items": {
        "description": "Error object",
        "properties": {
          "code": {
            "description": "The error code of this error",
            "type": "string"
          },
          "data": {
            "description": "Debugging information about the error",
            "type": "string"
          },
          "items": {
            "description": "A list of items that produced the error",
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "message": {
            "description": "Specific details about this error",
            "type": "string"
          },
          "path": {
            "description": "Internal code reference to the source of the error",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "message": {
      "description": "Server-generated message, if any",
      "type": "string"
    },
    "page": {
      "description": "The current page of results",
      "type": "integer"
    },
    "per_page": {
      "description": "The number of results per page",
      "type": "integer"
    },
    "total_count": {
      "description": "The total number of results across all pages",
      "type": "integer"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK DownloadHistoryDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Download audio tracks

curl -X POST https://api.shutterstock.com/v2/audio/licenses/i1188641348/downloads \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const licenseId = "i1188641348"; // license ID, not track ID

audioApi.downloadTracks(licenseId)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/licenses/i1188641348/downloads",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/audio/licenses/{id}/downloads Try it out

This endpoint redownloads tracks that you have already received a license for.

Parameters

Parameter Type Description
id
(Required)
string

License ID
(Parameter is part of path)

Accepted authentication

Example responses

200 Response

{
  "description": "URL object",
  "properties": {
    "url": {
      "description": "URL that can be used to download the unwatermarked, licensed asset",
      "type": "string"
    }
  },
  "required": [
    "url"
  ],
  "type": "object"
}

Responses

Status Meaning Description Schema
200 OK OK Url
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Collections

Create audio collections

DATA='{
  "name": "Best rock music"
}'

curl -X POST https://api.shutterstock.com/v2/audio/collections \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const body = {
  "name": "Best rock music"
};

audioApi.createSoundbox(body)
  .catch((error) => {
    console.error(error);
  });
$body = [
  "name" => "Best rock music"
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/audio/collections Try it out

This endpoint creates one or more collections (soundboxes). To add tracks, use POST /v2/audio/collections/{id}/items.

Body

Schema: CollectionCreateRequest
Collection metadata

Fields:

Field Type Description
name string The name of the collection

Accepted authentication

Example responses

200 Response

{
  "id": "48433105"
}

Successfully created collection

{
  "id": "48433105"
}

Responses

Status Meaning Description Schema
200 OK No response was specified CollectionCreateResponse
201 Created Successfully created collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Response Schema

List audio collections


curl -X GET https://api.shutterstock.com/v2/audio/collections \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const queryParams = {
  "page": "1",
  "per_page": "100"
};

audioApi.getSoundboxList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/audio/collections Try it out

This endpoint lists your collections of audio tracks and their basic attributes.

Parameters

Parameter Type Description
page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 150, Default: 100

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "name": "Test Collection cdad",
      "updated_time": "2014-11-05T19:29:56-05:00",
      "id": "5747953",
      "total_item_count": 0,
      "created_time": "2014-11-05T19:29:56-05:00"
    },
    {
      "name": "Test Collection ff5f",
      "updated_time": "2014-11-05T19:29:56-05:00",
      "id": "5747955",
      "total_item_count": 0,
      "created_time": "2014-11-05T19:29:56-05:00"
    },
    {
      "name": "Updated Collection ebc4",
      "updated_time": "2014-11-05T19:29:58-05:00",
      "id": "5747957",
      "total_item_count": 0,
      "created_time": "2014-11-05T19:29:58-05:00"
    },
    {
      "name": "Test Collection 0072",
      "updated_time": "2014-11-05T19:32:13-05:00",
      "id": "5747971",
      "total_item_count": 0,
      "created_time": "2014-11-05T19:32:13-05:00"
    },
    {
      "name": "Test Collection d332",
      "updated_time": "2014-11-05T19:32:13-05:00",
      "id": "5747973",
      "total_item_count": 0,
      "created_time": "2014-11-05T19:32:13-05:00"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK CollectionDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Get the details of audio collections


curl -X GET https://api.shutterstock.com/v2/audio/collections/48433107 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

audioApi.getSoundbox("48433107")
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections/48433107",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/audio/collections/{id} Try it out

This endpoint gets more detailed information about a collection, including the number of items in it and when it was last updated. To get the tracks in collections, use GET /v2/audio/collections/{id}/items.

Parameters

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

Accepted authentication

Example responses

OK

{
  "name": "Test Collection c28c",
  "updated_time": "2016-08-18T18:52:56-04:00",
  "id": "48433107",
  "total_item_count": 0
}

Responses

Status Meaning Description Schema
200 OK OK Collection
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found None

Rename audio collections

DATA='{
  "name": "Best rock music"
}'

curl -X POST https://api.shutterstock.com/v2/audio/collections/48433107 \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const collectionId = "48433107";

const body = {
  "name": "Best rock music"
};

audioApi.renameSoundbox(collectionId, body)
  .catch((error) => {
    console.error(error);
  });
$body = [
  "name" => "Best rock music"
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections/48433107",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/audio/collections/{id} Try it out

This endpoint sets a new name for a collection.

Parameters

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

Body

Schema: CollectionUpdateRequest
Collection changes

Fields:

Field Type Description
name string The new name of the collection

Accepted authentication

Responses

Status Meaning Description Schema
200 OK No response was specified None
204 No Content Successfully updated collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Delete audio collections

curl -X DELETE https://api.shutterstock.com/v2/audio/collections/48433111 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const collectionId = "48433107";

audioApi.deleteSoundbox(collectionId)
  .catch((error) => {
    console.error(error);
  });
$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections/48433111",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

DELETE /v2/audio/collections/{id} Try it out

This endpoint deletes a collection.

Parameters

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

Accepted authentication

Responses

Status Meaning Description Schema
200 OK No response was specified None
204 No Content Successfully deleted collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Add audio tracks to collections

DATA='{
  "items": [
    {
      "id": "442583"
    },
    {
      "id": "7491192"
    }
  ]
}'

curl -X POST https://api.shutterstock.com/v2/audio/collections/48433115/items \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const collectionId = "48433115";

const body = {
  "items": [
    {
      "id": "442583"
    },
    {
      "id": "7491192"
    }
  ]
};

audioApi.addSoundboxItems(collectionId, body)
  .catch((error) => {
    console.error(error);
  });
$body = [
  "items" => [
    [
      "id" => "442583"
    ],
    [
      "id" => "7491192"
    ]
  ]
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections/48433115/items",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/audio/collections/{id}/items Try it out

This endpoint adds one or more tracks to a collection by track IDs.

Parameters

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

Body

Schema: CollectionItemRequest
List of items to add to collection

Fields:

Field Type Description
items [CollectionItem] List of items
added_time string The date the item was added to the collection
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00
id string ID of the item
media_type string The media type of the item, such as image, video, or audio

Accepted authentication

Responses

Status Meaning Description Schema
200 OK No response was specified None
204 No Content Successfully added collection items None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Get the contents of audio collections


curl -X GET https://api.shutterstock.com/v2/audio/collections/48433113/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

audioApi.getSoundboxItems("48433113")
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections/48433113/items",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/audio/collections/{id}/items Try it out

This endpoint lists the IDs of tracks in a collection and the date that each was added.

Parameters

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 150, Default: 100

sort string

Sort order
Valid values: newest, oldest
Default: oldest

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "added_time": "2016-08-18T18:52:59-04:00",
      "id": "76688182",
      "media_type": "audio"
    },
    {
      "added_time": "2016-08-18T18:52:59-04:00",
      "id": "40005859",
      "media_type": "audio"
    }
  ],
  "page": 1,
  "per_page": 100
}

Responses

Status Meaning Description Schema
200 OK OK CollectionItemDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Remove audio tracks from collections

curl -X DELETE https://api.shutterstock.com/v2/audio/collections/48433119/items?item_id=36345523 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const collectionId = "48433119";

// Array of tracks to remove
const tracksToRemove = {
  "item_id": [
    "76688182",
    "40005859"
  ]
};

audioApi.deleteSoundboxItems(collectionId, tracksToRemove)
  .catch((error) => {
    console.error(error);
  });
$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections/48433119/items?item_id=495863218",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

DELETE /v2/audio/collections/{id}/items Try it out

This endpoint removes one or more tracks from a collection.

Parameters

Parameter Type Description
id
(Required)
string

Collection ID
(Parameter is part of path)

item_id array[string]

One or more item IDs to remove from the collection

Accepted authentication

Responses

Status Meaning Description Schema
200 OK No response was specified None
204 No Content Successfully removed collection items None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Editorial

Search editorial content

curl -X GET https://api.shutterstock.com/v2/editorial/search \
-H "Accept: application/json" \
-G \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
--data-urlencode "query=football" \
--data-urlencode "country=USA" \
--data-urlencode "sort=newest" \
--data-urlencode "date_start=2018-10-23"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const editorialApi = new sstk.EditorialApi();

const queryParams = {
  "query": "football",
  "country": "USA",
  "sort": "newest",
  "date_start": "2018-10-23"
};

const country = "USA";

editorialApi.searchEditorial(country, queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "query" => "football",
  "country" => "USA",
  "date_start" => "2018-10-23",
  "sort" => "newest"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/editorial/search Try it out

This endpoint searches for editorial images. If you specify more than one search parameter, the API uses an AND condition. Array parameters can be specified multiple times; in this case, the API uses an AND or an OR condition with those values, depending on the parameter. You can also filter search terms out in the query parameter by prefixing the term with NOT.

Parameters

Parameter Type Description
query string

One or more search terms separated by spaces

sort string

Sort by
Valid values: relevant, newest, oldest
Default: relevant

category string

Show editorial content within a certain editorial category; specify by category name

country
(Required)
string

Show only editorial content that is available for distribution in a certain country
Format: A three-character (ISO 3166 Alpha-3) country code
Example: USA

supplier_code array[string]

Show only editorial content from certain suppliers

date_start string

Show only editorial content generated on or after a specific date
Format: YYYY-MM-DD
Example: 2020-05-29

date_end string

Show only editorial content generated on or before a specific date
Format: YYYY-MM-DD
Example: 2020-05-29

per_page integer

Number of results per page
Minimum: 1, Maximum: 50, Default: 20

cursor string

The cursor of the page with which to start fetching results; this cursor is returned from previous requests

Accepted authentication

Example responses

OK

{
  "per_page": 1,
  "total_count": 1556949,
  "search_id": "q8igACM5gqQY75owjLoVvw",
  "next": "eyJ2IjoxLCJzIjoxfQ==",
  "prev": "",
  "data": [
    {
      "id": "9804979n",
      "title": "Hong Kong kicks off international e-Sports competition, China - 24 Aug 2018",
      "caption": "",
      "description": "Members of the TyLoo e-Sports team from China prepare to face off against the Kinguin e-Sports team from Poland at the ICBC (Asia) e-Sports and Music Festival Hong Kong 2018, Hong Kong, China, 24 August 2018. The festival runs from 24 to 26 August with professional gamers from around the world competing in international e-sports tournaments.",
      "byline": "ALEX HOFFORD/EPA-EFE/Shutterstock",
      "keywords": [],
      "date_taken": "2018-08-24",
      "categories": [],
      "aspect": 1.481,
      "assets": {
        "thumb_170": {
          "height": 115,
          "width": 170,
          "url": "https://editorial01.shutterstock.com/thumb/9804979n/c4377a53/Shutterstock_9804979n.jpg"
        },
        "thumb_220": {
          "height": 149,
          "width": 220,
          "url": "https://editorial01.shutterstock.com/thumb-220/9804979n/c57a68c7/Shutterstock_9804979n.jpg"
        },
        "watermark_450": {
          "height": 304,
          "width": 450,
          "url": "https://editorial01.shutterstock.com/wm-preview-450/9804979n/37d19dce/Shutterstock_9804979n.jpg"
        },
        "watermark_1500": {
          "height": 1500,
          "width": 1040,
          "url": "https://editorial01.shutterstock.com/wm-preview-1500/9933285a/ab82fea4/Shutterstock_9933285a.jpg"
        },
        "original": {
          "display_name": "Original",
          "height": 3263,
          "width": 4831,
          "is_licensable": true
        },
        "small_jpg": {
          "display_name": "Small",
          "height": 337,
          "width": 500,
          "is_licensable": true
        },
        "medium_jpg": {
          "display_name": "Med",
          "height": 675,
          "width": 1000,
          "is_licensable": true
        }
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK EditorialSearchResults
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
406 Not Acceptable Not Acceptable None

List editorial categories


curl -X GET https://api.shutterstock.com/v2/editorial/categories \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const editorialApi = new sstk.EditorialApi();

editorialApi.getEditorialCategories()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/categories",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/editorial/categories Try it out

This endpoint lists the categories that editorial images can belong to, which are separate from the categories that other types of assets can belong to.

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "name": "Animal"
    },
    {
      "name": "Awards"
    },
    {
      "name": "Art"
    },
    {
      "name": "Film Stills"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK EditorialCategoryResults
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List updated content

curl -X GET https://api.shutterstock.com/v2/editorial/updated \
-H "Accept: application/json" \
-G \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
--data-urlencode "type=edit" \
--data-urlencode "country=USA" \
--data-urlencode "date_updated_start=2020-02-02T13:00:00Z" \
--data-urlencode "date_updated_end=2020-02-02T15:00:00Z"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const editorialApi = new sstk.EditorialApi();

const type = "edit";
const dateUpdatedStart = "2020-02-02T13:00:00Z";
const dateUpdatedEnd = "2020-02-02T15:00:00Z";
const country = "USA";

editorialApi.getUpdatedImages(type, dateUpdatedStart, dateUpdatedEnd, country)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "type" => "edit",
  "country" => "USA",
  "date_updated_start" => "2020-02-02T13:00:00Z",
  "date_updated_end" => "2020-02-02T15:00:00Z",
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/updated?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/editorial/updated Try it out

This endpoint lists editorial images that have been updated in the specified time period to update content management systems (CMS) or digital asset management (DAM) systems. In most cases, use the date_updated_start and date_updated_end parameters to specify a range updates based on when the updates happened. You can also use the date_taken_start and date_taken_end parameters to specify a range of updates based on when the image was taken.

Parameters

Parameter Type Description
type
(Required)
string

Specify addition to return only images that were added or edit to return only images that were edited or deleted
Valid values: edit, addition

date_updated_start
(Required)
string

Show images images added, edited, or deleted after the specified date. Acceptable range is 1970-01-01T00:00:01 to 2038-01-19T00:00:00.
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

date_updated_end
(Required)
string

Show images images added, edited, or deleted before the specified date. Acceptable range is 1970-01-01T00:00:01 to 2038-01-19T00:00:00.
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

date_taken_start string

Show images that were taken on or after the specified date; use this parameter if you want recently created images from the collection instead of updated older assets

date_taken_end string

Show images that were taken before the specified date

cursor string

The cursor of the page with which to start fetching results; this cursor is returned from previous requests

sort string

Sort by
Valid values: newest, oldest
Default: newest

supplier_code array[string]

Show only editorial content from certain suppliers

country
(Required)
string

Show only editorial content that is available for distribution in a certain country
Format: A three-character (ISO 3166 Alpha-3) country code
Example: USA

per_page integer

Number of results per page
Minimum: 100, Maximum: 500, Default: 500

Accepted authentication

Example responses

OK

{
  "per_page": 1,
  "next": "eyJ2IjoxLCJzIjoxfQ==",
  "prev": "",
  "data": [
    {
      "id": "9804979n",
      "title": "Hong Kong kicks off international e-Sports competition, China - 24 Aug 2018",
      "caption": "",
      "description": "Members of the TyLoo e-Sports team from China prepare to face off against the Kinguin e-Sports team from Poland at the ICBC (Asia) e-Sports and Music Festival Hong Kong 2018, Hong Kong, China, 24 August 2018. The festival runs from 24 to 26 August with professional gamers from around the world competing in international e-sports tournaments.",
      "byline": "ALEX HOFFORD/EPA-EFE/Shutterstock",
      "supplier_code": "EPA",
      "keywords": [],
      "date_taken": "2018-08-24",
      "categories": [],
      "aspect": 1.481,
      "assets": {
        "thumb_170": {
          "height": 115,
          "width": 170,
          "url": "https://editorial01.shutterstock.com/thumb/9804979n/c4377a53/Shutterstock_9804979n.jpg"
        },
        "thumb_220": {
          "height": 149,
          "width": 220,
          "url": "https://editorial01.shutterstock.com/thumb-220/9804979n/c57a68c7/Shutterstock_9804979n.jpg"
        },
        "watermark_450": {
          "height": 304,
          "width": 450,
          "url": "https://editorial01.shutterstock.com/wm-preview-450/9804979n/37d19dce/Shutterstock_9804979n.jpg"
        },
        "watermark_1500": {
          "height": 1500,
          "width": 1040,
          "url": "https://editorial01.shutterstock.com/wm-preview-1500/9933285a/ab82fea4/Shutterstock_9933285a.jpg"
        },
        "original": {
          "display_name": "Original",
          "height": 3263,
          "width": 4831,
          "is_licensable": true
        },
        "small_jpg": {
          "display_name": "Small",
          "height": 337,
          "width": 500,
          "is_licensable": true
        },
        "medium_jpg": {
          "display_name": "Med",
          "height": 675,
          "width": 1000,
          "is_licensable": true
        }
      },
      "updated_time": "2019-07-15T20:04:44-04:00",
      "updates": [
        "addition"
      ],
      "commercial_status": {
        "status": "available"
      },
      "rights": {
        "countries": "CAN,+DEU,+GBR,+USA,-*"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK EditorialUpdatedResults
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
406 Not Acceptable Not Acceptable None

Details

Get editorial content details


curl -X GET https://api.shutterstock.com/v2/editorial/9926131a \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "country=USA" 
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const editorialApi = new sstk.EditorialApi();

const queryParams = {
  "country": "USA"
};

editorialApi.getEditorialImage("9926131a", queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/9926131a?country=USA",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/editorial/{id} Try it out

This endpoint shows information about an editorial image, including a URL to a preview image and the sizes that it is available in.

Parameters

Parameter Type Description
id
(Required)
string

Editorial ID
(Parameter is part of path)

country
(Required)
string

Returns only if the content is available for distribution in a certain country
Format: A three-character (ISO 3166 Alpha-3) country code
Example: USA

Accepted authentication

Example responses

OK

{
  "id": "9767412v",
  "title": "Tokyo 2020 Olympics mascot Miraitowa and Paralympics mascot Someity debut, Japan - 22 Jul 2018",
  "caption": "",
  "description": "Tokyo 2020 Olympics mascot Miraitowa greets with former Japanese prime minister Yoshiko Mori, President of Tokyo 2020 Olympics Committee, as mascots of Tokyo 2020 Olympics and Paralympics debut in Tokyo, Japan, 22 July 2018. Tokyo 2020 Olympics will start on 24 July 2020 and run until 09 August 2020.",
  "byline": "KIMIMASA MAYAMA/EPA-EFE/Shutterstock",
  "keywords": [],
  "date_taken": "2018-07-22",
  "categories": [],
  "aspect": 1.33,
  "assets": {
    "thumb_170": {
      "height": 128,
      "width": 170,
      "url": "https://editorial01.shutterstock.com/thumb/9767412v/36aeb953/Shutterstock_9767412v.jpg"
    },
    "thumb_220": {
      "height": 165,
      "width": 220,
      "url": "https://editorial01.shutterstock.com/thumb-220/9767412v/b786b189/Shutterstock_9767412v.jpg"
    },
    "watermark_450": {
      "height": 338,
      "width": 450,
      "url": "https://editorial01.shutterstock.com/wm-preview-450/9767412v/f75b6680/Shutterstock_9767412v.jpg"
    },
    "watermark_1500": {
      "height": 1500,
      "width": 1040,
      "url": "https://editorial01.shutterstock.com/wm-preview-1500/9933285a/ab82fea4/Shutterstock_9933285a.jpg"
    },
    "original": {
      "display_name": "Original",
      "height": 3447,
      "width": 4586,
      "is_licensable": true
    },
    "small_jpg": {
      "display_name": "Small",
      "height": 375,
      "width": 500,
      "is_licensable": true
    },
    "medium_jpg": {
      "display_name": "Med",
      "height": 751,
      "width": 1000,
      "is_licensable": true
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK EditorialContent
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
406 Not Acceptable Not Acceptable None

Licenses and downloads

License editorial content

DATA='{
  "editorial": [
    {
      "editorial_id": "8594090h",
      "license": "premier_editorial_comp"
    }
  ],
  "country": "USA"
}'

curl -X POST https://api.shutterstock.com/v2/editorial/licenses \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const editorialApi = new sstk.EditorialApi();

const body = {
  "editorial": [
    {
      "editorial_id": "8594090h",
      "license": "premier_editorial_comp"
    }
  ],
  "country": "USA"
};

editorialApi.licenseEditorialImage(body)
  .then(({ data }) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$body = [
  "editorial" => [
    [
      "editorial_id" => "8594090h",
      "license" => "premier_editorial_comp"
    ]
  ],
  "country" => "USA"
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/licenses",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/editorial/licenses Try it out

This endpoint gets licenses for one or more editorial images. You must specify the country and one or more editorial images to license.

Body

Schema: LicenseEditorialContentRequest
License editorial content

Fields:

Field Type Description
country string Mandatory country code for where the editorial content will be distributed; this value is used for rights checks
Format: A three-character (ISO 3166 Alpha-3) country code
Example: USA
editorial [LicenseEditorialContent] Editorial content to license
editorial_id string Editorial ID
license string License agreement to use for licensing
metadata LicenseRequestMetadata Additional information for license requests for enterprise accounts and API subscriptions, 4 fields maximum; which fields are required is set by the account holder
size string Asset size to download

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "editorial_id": "69656358",
      "download": {
        "url": "https://s3-eu-west-1.amazonaws.com/api-downloads.rexfeatures.com/[random-characters].jpg?Expires=1524717323"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK LicenseEditorialContentResultDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
406 Not Acceptable Not Acceptable None

Livefeeds

Get editorial livefeed list


curl -X GET https://api.shutterstock.com/v2/editorial/livefeeds \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "country=USA" 
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const editorialApi = new sstk.EditorialApi();

const queryParams = {
  "country": "USA"
};

editorialApi.getEditorialLivefeedList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/livefeeds?country=USA",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/editorial/livefeeds Try it out

Parameters

Parameter Type Description
country
(Required)
string

Returns only livefeeds that are available for distribution in a certain country
Format: A three-character (ISO 3166 Alpha-3) country code
Example: USA

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 50, Default: 20

Accepted authentication

Example responses

OK

{
  "page": 1,
  "per_page": 1,
  "total_count": 6011,
  "data": [
    {
      "id": "2018%2F10%2F19%2F'Butterfly'%20photocall%2C%20Rome%20Film%20Festival",
      "name": "'Butterfly' photocall, Rome Film Festival",
      "total_item_count": 24,
      "created_time": "2018-10-19T20:27:26+00:00",
      "cover_item": {
        "height": 170,
        "width": 113,
        "url": "https://editorial01.shutterstock.com/thumb/9938080a/532b2be1/Shutterstock_9938080a.jpg",
        "id": "9938080a"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK EditorialLivefeedList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
406 Not Acceptable Not Acceptable None

Get editorial livefeed


curl -X GET https://api.shutterstock.com/v2/editorial/livefeeds/2018%2F10%2F15%2FWomen%20of%20the%20Year%20Lunch%20%26%20Awards%2C%20London \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "country=USA" 
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const editorialApi = new sstk.EditorialApi();

const queryParams = {
  "country": "USA"
};

editorialApi.getEditorialLivefeed("2018%2F10%2F15%2FWomen%20of%20the%20Year%20Lunch%20%26%20Awards%2C%20London", queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/livefeeds/2018%2F10%2F15%2FWomen%20of%20the%20Year%20Lunch%20%26%20Awards%2C%20London?country=USA",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/editorial/livefeeds/{id} Try it out

Parameters

Parameter Type Description
id
(Required)
string

Editorial livefeed ID; must be an URI encoded string
(Parameter is part of path)

country
(Required)
string

Returns only if the livefeed is available for distribution in a certain country
Format: A three-character (ISO 3166 Alpha-3) country code
Example: USA

Accepted authentication

Example responses

OK

{
  "id": "2018%2F10%2F19%2F'The%20House%20with%20a%20Clock%20in%20Its%20Walls'%20premiere%2C%20Rome%20Film%20Festival",
  "name": "'The House with a Clock in Its Walls' premiere, Rome Film Festival",
  "total_item_count": 100,
  "cover_item": {
    "height": 170,
    "width": 114,
    "url": "https://editorial01.shutterstock.com/thumb/9938511p/7d1f17d9/Shutterstock_9938511p.jpg",
    "id": "9938511p"
  }
}

Responses

Status Meaning Description Schema
200 OK OK EditorialLivefeed
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
406 Not Acceptable Not Acceptable None

Get editorial livefeed items


curl -X GET https://api.shutterstock.com/v2/editorial/livefeeds/2018%2F10%2F15%2FWomen%20of%20the%20Year%20Lunch%20%26%20Awards%2C%20London/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "country=USA" 
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const editorialApi = new sstk.EditorialApi();

const queryParams = {
  "country": "USA"
};

editorialApi.getEditorialLivefeedItems("2018%2F10%2F15%2FWomen%20of%20the%20Year%20Lunch%20%26%20Awards%2C%20London", queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/livefeeds/2018%2F10%2F15%2FWomen%20of%20the%20Year%20Lunch%20%26%20Awards%2C%20London/items?country=USA",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/editorial/livefeeds/{id}/items Try it out

Parameters

Parameter Type Description
id
(Required)
string

Editorial livefeed ID; must be an URI encoded string
(Parameter is part of path)

country
(Required)
string

Returns only if the livefeed items are available for distribution in a certain country
Format: A three-character (ISO 3166 Alpha-3) country code
Example: USA

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "9938573m",
      "title": "'The House with a Clock in Its Walls' premiere, Rome Film Festival, Italy - 19 Oct 2018",
      "caption": "",
      "description": "Christian Marazziti and Ariadna Romero",
      "byline": "Maurizio D'Avanzo/IPA/Shutterstock",
      "keywords": [],
      "date_taken": "2018-10-19",
      "categories": [
        {
          "name": "Actor"
        },
        {
          "name": "Female"
        },
        {
          "name": "Personality"
        }
      ],
      "aspect": 0.666,
      "assets": {
        "thumb_170": {
          "height": 170,
          "width": 113,
          "url": "https://editorial01.shutterstock.com/thumb/9938573m/4d5708ce/Shutterstock_9938573m.jpg"
        },
        "thumb_220": {
          "height": 220,
          "width": 146,
          "url": "https://editorial01.shutterstock.com/thumb-220/9938573m/b78aabde/Shutterstock_9938573m.jpg"
        },
        "watermark_450": {
          "height": 450,
          "width": 300,
          "url": "https://editorial01.shutterstock.com/wm-preview-450/9938573m/4a9a4add/Shutterstock_9938573m.jpg"
        },
        "watermark_1500": {
          "height": 1500,
          "width": 1040,
          "url": "https://editorial01.shutterstock.com/wm-preview-1500/9933285a/ab82fea4/Shutterstock_9933285a.jpg"
        },
        "original": {
          "display_name": "Original",
          "height": 4928,
          "width": 3280,
          "is_licensable": true
        },
        "small_jpg": {
          "display_name": "Small",
          "height": 500,
          "width": 332,
          "is_licensable": true
        },
        "medium_jpg": {
          "display_name": "Med",
          "height": 1000,
          "width": 660,
          "is_licensable": true
        }
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK EditorialContentDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
406 Not Acceptable Not Acceptable None

Computer Vision

Upload

Upload images

curl -X POST 'https://api.shutterstock.com/v2/cv/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const computerVisionApi = new sstk.ComputerVisionApi();

const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");

const body = new sstk.ImageCreateRequest(base64File);

computerVisionApi.uploadImage(body)
  .then((data) => {
    console.log(data.upload_id);
  });
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);

$uploadBody = [
  "base64_image" => $encodedImageData
];
$uploadEncodedBody = json_encode($uploadBody);

$uploadOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/cv/images",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $uploadEncodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $uploadOptions);
$uploadResponse = curl_exec($handle);
curl_close($handle);

$uploadDecodedResponse = json_decode($uploadResponse);
print_r($uploadDecodedResponse->upload_id);

POST /v2/cv/images Try it out

This endpoint uploads an image for reverse image or video search. Images must be in JPEG or PNG format. To get the search results, pass the upload ID that this endpoint returns to the GET /v2/cv/similar/images or GET /v2/cv/similar/videos endpoints. Contact us for access to this endpoint.

Body

Schema: ImageCreateRequest
A Base 64 encoded jpeg or png; images can be no larger than 10mb and can be no larger than 10,000 pixels in width or height

Fields:

Field Type Description
base64_image string A Base 64 encoded jpeg or png; images can be no larger than 10mb and can be no larger than 10,000 pixels in width or height

Accepted authentication

Example responses

Created

{
  "upload_id": "Udb14e1c3540bdbf82b4b3fe12d3a44f2"
}

Responses

Status Meaning Description Schema
201 Created Created ComputerVisionImageCreateResponse
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
413 Payload Too Large Payload Too Large None
415 Unsupported Media Type Unsupported Media Type None

Similar

List similar images

RESPONSE=$(curl -X POST 'https://api.shutterstock.com/v2/cv/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}")

echo "The next step requires the jq program."

UPLOAD_ID=$(jq -r .upload_id <<< $RESPONSE)

curl -X GET https://api.shutterstock.com/v2/cv/similar/images \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "asset_id=$UPLOAD_ID"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const computerVisionApi = new sstk.ComputerVisionApi();

const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");

const body = new sstk.ImageCreateRequest(base64File);

computerVisionApi.uploadImage(body)
  .then((data) => {
    console.log(data.upload_id);
    return computerVisionApi.getSimilarImages(data.upload_id);
  })
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);

$uploadBody = [
  "base64_image" => $encodedImageData
];
$uploadEncodedBody = json_encode($uploadBody);

$uploadOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/cv/images",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $uploadEncodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $uploadOptions);
$uploadResponse = curl_exec($handle);
curl_close($handle);

$uploadDecodedResponse = json_decode($uploadResponse);
print_r($uploadDecodedResponse->upload_id);

$similarQuery = [
  "asset_type" => "images",
  "asset_id" => $uploadDecodedResponse->upload_id,
];

$similarOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/cv/similar/images?" . http_build_query($similarQuery),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $similarOptions);
$similarResponse = curl_exec($handle);
curl_close($handle);

print_r($similarResponse);

GET /v2/cv/similar/images Try it out

This endpoint returns images that are visually similar to an image that you specify or upload.

Parameters

Parameter Type Description
asset_id
(Required)
string

The asset ID or upload ID to find similar images for

license array[string]

Show only images with the specified license
Valid values: commercial, editorial, enhanced, sensitive, NOT enhanced, NOT sensitive
Default: commercial

safe boolean

Enable or disable safe search
Default: true

language Language

Language for the keywords and categories in the response
Valid values: cs, da, de, en, es, fi, fr, hu, it, ja, ko, nb, nl, pl, pt, ru, sv, th, tr, zh, zh-Hant

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 500, Default: 20

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: minimal

Accepted authentication

Example responses

OK

{
  "page": 1,
  "per_page": 1,
  "total_count": 200,
  "search_id": "",
  "data": [
    {
      "id": "224429596",
      "aspect": 1,
      "assets": {
        "preview": {
          "height": 450,
          "url": "https://image.shutterstock.com/display_pic_with_logo/302287/224429596/stock-vector-happy-halloween-vector-224429596.jpg",
          "width": 450
        },
        "small_thumb": {
          "height": 100,
          "url": "https://thumb1.shutterstock.com/thumb_small/302287/224429596/stock-vector-happy-halloween-vector-224429596.jpg",
          "width": 100
        },
        "large_thumb": {
          "height": 150,
          "url": "https://thumb1.shutterstock.com/thumb_large/302287/224429596/stock-vector-happy-halloween-vector-224429596.jpg",
          "width": 150
        },
        "huge_thumb": {
          "height": 260,
          "url": "https://image.shutterstock.com/image-vector/happy-halloween-vector-260nw-224429596.jpg",
          "width": 260
        },
        "preview_1000": {
          "url": "https://ak.picdn.net/shutterstock/photos/224429596/watermark_1000/9b5c88b67f10298f7b5340f21dffc953/preview_1000-224429596.jpg",
          "width": 1000,
          "height": 1000
        },
        "preview_1500": {
          "url": "https://image.shutterstock.com/z/stock-vector-happy-halloween-vector-224429596.jpg",
          "width": 1500,
          "height": 1500
        }
      },
      "contributor": {
        "id": "302287"
      },
      "description": "Happy Halloween - vector",
      "image_type": "vector",
      "media_type": "image"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK ImageSearchResults
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List similar videos

RESPONSE=$(curl -X POST 'https://api.shutterstock.com/v2/cv/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}")

echo "The next step requires the jq program."

UPLOAD_ID=$(jq -r .upload_id <<< $RESPONSE)

curl -X GET https://api.shutterstock.com/v2/cv/similar/videos \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "asset_id=$UPLOAD_ID"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const computerVisionApi = new sstk.ComputerVisionApi();

const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");

const body = new sstk.ImageCreateRequest(base64File);

computerVisionApi.uploadImage(body)
  .then((data) => {
    console.log(data.upload_id);
    return computerVisionApi.getSimilarVideos(data.upload_id);
  })
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);

$uploadBody = [
  "base64_image" => $encodedImageData
];
$uploadEncodedBody = json_encode($uploadBody);

$uploadOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/cv/images",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $uploadEncodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $uploadOptions);
$uploadResponse = curl_exec($handle);
curl_close($handle);

$uploadDecodedResponse = json_decode($uploadResponse);
print_r($uploadDecodedResponse->upload_id);

$similarQuery = [
  "asset_type" => "images",
  "asset_id" => $uploadDecodedResponse->upload_id,
];

$similarOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/cv/similar/videos?" . http_build_query($similarQuery),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $similarOptions);
$similarResponse = curl_exec($handle);
curl_close($handle);

print_r($similarResponse);

GET /v2/cv/similar/videos Try it out

This endpoint returns videos that are visually similar to an image that you specify or upload.

Parameters

Parameter Type Description
asset_id
(Required)
string

The asset ID or upload ID to find similar videos for

license array[string]

Show only videos with the specified license
Valid values: commercial, editorial, enhanced, sensitive, NOT enhanced, NOT sensitive
Default: commercial

safe boolean

Enable or disable safe search
Default: true

language Language

Language for the keywords and categories in the response
Valid values: cs, da, de, en, es, fi, fr, hu, it, ja, ko, nb, nl, pl, pt, ru, sv, th, tr, zh, zh-Hant

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 500, Default: 20

view string

Amount of detail to render in the response
Valid values: minimal, full
Default: minimal

Accepted authentication

Example responses

OK

{
  "page": 1,
  "per_page": 1,
  "total_count": 200,
  "search_id": "",
  "data": [
    {
      "media_type": "video",
      "id": "33248488",
      "description": "The Concept of: Digitalization of Information Flow Moving Through Rack Servers in Data Center. Shot on RED EPIC-W 8K Helium Cinema Camera.",
      "aspect": 1.778,
      "duration": 19,
      "contributor": {
        "id": "178456"
      },
      "aspect_ratio": "16:9",
      "assets": {
        "thumb_webm": {
          "url": "https://ak8.picdn.net/shutterstock/videos/33248488/thumb/stock-footage-the-concept-of-digitalization-of-information-flow-moving-through-rack-servers-in-data-center-shot.webm"
        },
        "thumb_mp4": {
          "url": "https://ak8.picdn.net/shutterstock/videos/33248488/thumb/stock-footage-the-concept-of-digitalization-of-information-flow-moving-through-rack-servers-in-data-center-shot.mp4"
        },
        "preview_webm": {
          "url": "https://ak8.picdn.net/shutterstock/videos/33248488/preview/stock-footage-the-concept-of-digitalization-of-information-flow-moving-through-rack-servers-in-data-center-shot.webm"
        },
        "preview_mp4": {
          "url": "https://ak8.picdn.net/shutterstock/videos/33248488/preview/stock-footage-the-concept-of-digitalization-of-information-flow-moving-through-rack-servers-in-data-center-shot.mp4"
        },
        "thumb_jpg": {
          "url": "https://ak8.picdn.net/shutterstock/videos/33248488/thumb/12.jpg"
        },
        "preview_jpg": {
          "url": "https://ak8.picdn.net/shutterstock/videos/33248488/thumb/12.jpg"
        }
      },
      "url": "https://www.shutterstock.com/video/clip-33248488"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK VideoSearchResults
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Keywords

List suggested keywords

RESPONSE=$(curl -X POST 'https://api.shutterstock.com/v2/cv/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}")

echo "The next step requires the jq program."

UPLOAD_ID=$(jq -r .upload_id <<< $RESPONSE)

curl -X GET https://api.shutterstock.com/v2/cv/keywords \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "asset_id=$UPLOAD_ID"
const sstk = require("shutterstock-api");
const fs = require("fs");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const computerVisionApi = new sstk.ComputerVisionApi();

const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");

const body = new sstk.ImageCreateRequest(base64File);

computerVisionApi.uploadImage(body)
  .then((data) => {
    console.log(data.upload_id);
    return computerVisionApi.getKeywords(data.upload_id);
  })
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);

$uploadBody = [
  "base64_image" => $encodedImageData
];
$uploadEncodedBody = json_encode($uploadBody);

$uploadOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/cv/images",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $uploadEncodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $uploadOptions);
$uploadResponse = curl_exec($handle);
curl_close($handle);

$uploadDecodedResponse = json_decode($uploadResponse);
print_r($uploadDecodedResponse->upload_id);

$keywordsQuery = [
  "asset_id" => $uploadDecodedResponse->upload_id,
];

$keywordsOptions = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/cv/keywords?" . http_build_query($keywordsQuery),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $keywordsOptions);
$keywordsResponse = curl_exec($handle);
curl_close($handle);

print_r($keywordsResponse);

GET /v2/cv/keywords Try it out

This endpoint returns a list of suggested keywords for a media item that you specify or upload.

Parameters

Parameter Type Description
asset_id
(Required)
any

The asset ID or upload ID to suggest keywords for

Accepted authentication

Example responses

OK

{
  "data": [
    "nature",
    "wildlife",
    "animal",
    "cute",
    "bamboo",
    "panda",
    "china",
    "wild",
    "endangered",
    "black",
    "bear"
  ]
}

Responses

Status Meaning Description Schema
200 OK OK KeywordDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
415 Unsupported Media Type Unsupported Media Type None

Legacy

Upload ephemeral images

curl -X POST 'https://api.shutterstock.com/v2/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");

const body = new sstk.ImageCreateRequest(base64File);

const queryParams = {
  "page": 1,
  "per_page": 20,
  "view": "minimal"
};

imagesApi.uploadEphemeralImage(body)
  .then((data) => {
    console.log(data.id);
    return imagesApi.getSimilarImages(data.id, queryParams);
  })
  .then((similarImageData) => {
    console.log(similarImageData);
  })
  .catch((error) => {
    console.error(error);
  });
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);

$body = [
  "base64_image" => $encodedImageData
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
    "Content-Type: application/json"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/images Try it out

Deprecated; use POST /v2/cv/images instead. This endpoint uploads an image for reverse image search. The image must be in JPEG or PNG format. To get the search results, pass the ID that this endpoint returns to the GET /v2/images/{id}/similar endpoint.

Body

Schema: ImageCreateRequest
The image data in JPEG or PNG format

Fields:

Field Type Description
base64_image string A Base 64 encoded jpeg or png; images can be no larger than 10mb and can be no larger than 10,000 pixels in width or height

Accepted authentication

Example responses

Created

{
  "id": "Udb14e1c3540bdbf82b4b3fe12d3a44f2"
}

Responses

Status Meaning Description Schema
201 Created Created ImageCreateResponse
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
413 Payload Too Large Payload Too Large None

Contributors

Contributors

Get details about multiple contributors


curl -X GET https://api.shutterstock.com/v2/contributors \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "id=800506" \
--data-urlencode "id=1653538" 
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const contributorsApi = new sstk.ContributorsApi();

const queryParams = {
  "id": [
    800506,
    1653538
  ]
};

contributorsApi.getContributorList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/contributors?id=800506&id=1653538",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/contributors Try it out

This endpoint lists information about one or more contributors, including contributor type, equipment they use and other attributes.

Parameters

Parameter Type Description
id
(Required)
array[string]

One or more contributor IDs

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "800506",
      "display_name": "Dave Pusey",
      "about": "Dave is a self confessed emotional photographer, capturing, keeping and sharing images for the stories of the wild that they convey.",
      "equipment": [
        "Both Canon & Nikon"
      ],
      "contributor_type": [
        "illustrator",
        "videographer"
      ],
      "styles": [
        "black_and_white",
        "landscape",
        "nature"
      ],
      "subjects": [
        "animals",
        "holiday",
        "nature",
        "travel",
        "wildlife"
      ],
      "website": "leovantage.com",
      "location": "za",
      "portfolio_url": "http://www.shutterstock.com/g/davep",
      "social_media": {
        "facebook": "pages/Dave-Pusey-Photography/131399733564475"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK ContributorProfileDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Get details about a single contributor


curl -X GET https://api.shutterstock.com/v2/contributors/1653538 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const contributorsApi = new sstk.ContributorsApi();

contributorsApi.getContributor("1653538")
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/contributors/1653538",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/contributors/{contributor_id} Try it out

This endpoint shows information about a single contributor, including contributor type, equipment they use, and other attributes.

Parameters

Parameter Type Description
contributor_id
(Required)
string

Contributor ID
(Parameter is part of path)

Accepted authentication

Example responses

OK

{
  "id": "1653538",
  "display_name": "Mees Kuiper",
  "about": "A 18 year old photographer living in Amsterdam.",
  "equipment": [
    "Nikon D7000",
    "Nikkor 70-300mm",
    "Nikkor 24-70mm"
  ],
  "contributor_type": [
    "photographer",
    "illustrator",
    "videographer"
  ],
  "styles": [],
  "subjects": [
    "animals",
    "buildings",
    "nature",
    "people",
    "wildlife"
  ],
  "location": "nl",
  "portfolio_url": "http://www.shutterstock.com/g/Mees Kuiper",
  "social_media": {}
}

Responses

Status Meaning Description Schema
200 OK OK ContributorProfile
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List contributors' collections


curl -X GET https://api.shutterstock.com/v2/contributors/800506/collections \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const contributorsApi = new sstk.ContributorsApi();

contributorsApi.getContributorCollectionsList("800506")
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/contributors/800506/collections",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/contributors/{contributor_id}/collections Try it out

This endpoint lists collections based on contributor ID.

Parameters

Parameter Type Description
contributor_id
(Required)
string

Contributor ID
(Parameter is part of path)

sort string

Sort order
Valid values: newest, last_updated, item_count

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "name": "Lion Cubs",
      "cover_item": {
        "id": "87672997",
        "media_type": "image"
      },
      "updated_time": "2014-05-01T05:22:07-04:00",
      "id": "135931",
      "total_item_count": 10,
      "created_time": "2012-04-07T02:07:28-04:00"
    },
    {
      "name": "African Landscapes",
      "cover_item": {
        "id": "79489261",
        "media_type": "image"
      },
      "updated_time": "2014-05-01T05:38:34-04:00",
      "id": "1991564",
      "total_item_count": 5,
      "created_time": "2014-05-01T05:23:20-04:00"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK CollectionDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Contributor not found None

Get details about contributors' collections


curl -X GET https://api.shutterstock.com/v2/contributors/800506/collections/1991678 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const contributorsApi = new sstk.ContributorsApi();

contributorsApi.getContributorCollections("800506", "1991678")
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/contributors/800506/collections/1991678",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/contributors/{contributor_id}/collections/{id} Try it out

This endpoint gets more detailed information about a contributor's collection, including its cover image, timestamps for its creation, and most recent update. To get the items in collections, use GET /v2/contributors/{contributor_id}/collections/{id}/items.

Parameters

Parameter Type Description
contributor_id
(Required)
string

Contributor ID
(Parameter is part of path)

id
(Required)
string

Collection ID that belongs to the contributor
(Parameter is part of path)

Accepted authentication

Example responses

OK

{
  "name": "Baby Elephants",
  "cover_item": {
    "id": "168592952",
    "media_type": "image"
  },
  "updated_time": "2014-05-01T05:50:21-04:00",
  "id": "1991678",
  "total_item_count": 3
}

Responses

Status Meaning Description Schema
200 OK OK Collection
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Set not found None

Get the items in contributors' collections


curl -X GET https://api.shutterstock.com/v2/contributors/800506/collections/1991678/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const contributorsApi = new sstk.ContributorsApi();

contributorsApi.getContributorCollectionItems("800506", "1991678")
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/contributors/800506/collections/1991678/items",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/contributors/{contributor_id}/collections/{id}/items Try it out

This endpoint lists the IDs of items in a contributor's collection and the date that each was added.

Parameters

Parameter Type Description
contributor_id
(Required)
string

Contributor ID
(Parameter is part of path)

id
(Required)
string

Collection ID that belongs to the contributor
(Parameter is part of path)

page integer

Page number
Minimum: 1, Default: 1

per_page integer

Number of results per page
Minimum: 1, Maximum: 50, Default: 20

sort string

Sort order
Valid values: newest, oldest

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "added_time": "2014-05-01T05:49:46-04:00",
      "id": "168592952",
      "media_type": "image"
    },
    {
      "added_time": "2014-05-01T05:49:59-04:00",
      "id": "88269310",
      "media_type": "image"
    },
    {
      "added_time": "2014-05-01T05:50:21-04:00",
      "id": "94373977",
      "media_type": "image"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK CollectionItemDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Set not found None

Users

Details

Get user details


curl -X GET https://api.shutterstock.com/v2/user \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const usersApi = new sstk.UsersApi();

usersApi.getUser()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/user",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/user Try it out

Accepted authentication

Example responses

OK

{
  "id": "101782699",
  "username": "yourusername",
  "full_name": "your name",
  "first_name": "firstname",
  "last_name": "lastname",
  "language": "es",
  "contributor_id": "212"
}

Responses

Status Meaning Description Schema
200 OK OK UserDetails
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Get access token details


curl -X GET https://api.shutterstock.com/v2/user/access_token \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const usersApi = new sstk.UsersApi();

usersApi.getAccessToken()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/user/access_token",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/user/access_token Try it out

Accepted authentication

Example responses

OK

{
  "client_id": "bf6e5dabd4rc1d770dc8",
  "realm": "customer",
  "scopes": [
    "user.view",
    "user.edit"
  ],
  "username": "testuser",
  "user_id": "120229367",
  "customer_id": "148363",
  "expires_in": 361354404
}

Responses

Status Meaning Description Schema
200 OK OK AccessTokenDetails
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List user subscriptions


curl -X GET https://api.shutterstock.com/v2/user/subscriptions \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const usersApi = new sstk.UsersApi();

usersApi.getUserSubsciptionList()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/user/subscriptions",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/user/subscriptions Try it out

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "s1729",
      "expiration_time": "2016-11-17T16:46:36-05:00",
      "license": "standard",
      "description": "25-A-Day Subscription",
      "formats": [
        {
          "size": "huge",
          "format": "jpg",
          "media_type": "image",
          "min_resolution": 4000000,
          "description": "Huge"
        },
        {
          "size": "medium",
          "format": "jpg",
          "media_type": "image",
          "min_resolution": 1000,
          "description": "Med"
        },
        {
          "size": "supersize",
          "format": "jpg",
          "media_type": "image",
          "min_resolution": 16000000,
          "description": "Super"
        },
        {
          "size": "small",
          "format": "jpg",
          "media_type": "image",
          "min_resolution": 500,
          "description": "Small"
        },
        {
          "size": "vector",
          "format": "eps",
          "media_type": "image",
          "description": "Vector"
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK SubscriptionDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Test

Echo

Echo text


curl -X GET https://api.shutterstock.com/v2/test \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const testApi = new sstk.TestApi();

testApi.echo()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/test",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/test Try it out

Parameters

Parameter Type Description
text string

Text to echo
Default: ok

Authentication

This endpoint does not require authentication.

Example responses

OK

{
  "text": "ok"
}

Responses

Status Meaning Description Schema
200 OK OK TestEcho
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Validate

Validate input


curl -X GET https://api.shutterstock.com/v2/test/validate \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "id=123" 
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const testApi = new sstk.TestApi();

const queryParams = {
  "id": 123
};

testApi.validate(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/test/validate?id=123",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

GET /v2/test/validate Try it out

Parameters

Parameter Type Description
id
(Required)
integer

Integer ID

tag array[string]

List of tags

user-agent string

User agent

Authentication

This endpoint does not require authentication.

Example responses

OK

{
  "header": {
    "user-agent": "PostmanRuntime/7.1.1"
  },
  "query": {
    "id": 12
  }
}

Responses

Status Meaning Description Schema
200 OK OK TestValidate
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Oauth

Authorization

Authorize applications

curl "https://api.shutterstock.com/v2/oauth/authorize" \ -X GET \ -G \ --data-urlencode "scope=licenses.create licenses.view purchases.view" \ --data-urlencode "state=demo_`date +%s`" \ --data-urlencode "response_type=code" \ --data-urlencode "redirect_uri=http://localhost:3000/callback" \ --data-urlencode "client_id=$CLIENT_ID"
const axios = require("axios");

axios.get("https://api.shutterstock.com/v2/oauth/authorize", {
  "params": {
    "scope": "licenses.create licenses.view purchases.view",
    "state": "demo_" + Math.round(new Date() / 1000),
    "response_type": "code",
    "redirect_uri": "http://localhost:3000/callback",
    "client_id": clientId
  },
  // Don't follow the redirect because this program is not running in a browser
  "maxRedirects": 0,
})
  .catch(({ response }) => {
    // HTTP 302: Redirect
    console.log(response.data);
  });
$queryFields = [ "client_id" => $clientId, "redirect_uri" => "http://localhost:3000/callback", "response_type" => "code", "scope" => "licenses.create licenses.view purchases.view", "state" => time() ];
$options = [ CURLOPT_URL => "https://api.shutterstock.com/v2/oauth/authorize?" . http_build_query($queryFields), CURLOPT_USERAGENT => "php/curl", CURLOPT_RETURNTRANSFER => 1 ];
$handle = curl_init(); curl_setopt_array($handle, $options); $response = curl_exec($handle); curl_close($handle);
$decodedResponse = json_decode($response); print_r($decodedResponse);

GET /v2/oauth/authorize Try it out

This endpoint returns a redirect URI (in the 'Location' header) that the customer uses to authorize your application and, together with POST /v2/oauth/access_token, generate an access token that represents that authorization.

Parameters

Parameter Type Description
client_id
(Required)
string

Client ID (Consumer Key) of your application

realm string

User type to be authorized (usually 'customer')
Valid values: customer, contributor
Default: customer

redirect_uri
(Required)
string

The callback URI to send the request to after authorization; must use a host name that is registered with your application

response_type
(Required)
string

Type of temporary authorization code that will be used to generate an access code; the only valid value is 'code'
Valid values: code

scope string

Space-separated list of scopes to be authorized
Default: user.view

state
(Required)
string

Unique value used by the calling app to verify the request

Authentication

This endpoint does not require authentication.

Example responses

Redirect user to authenticate with Shutterstock

"https://accounts.shutterstock.com/login?next=%2Foauth%2Fauthorize%3Fresponse_type%3Dcode%26state%3D1539619928633%26scope%3Dlicenses.create%20licenses.view%20purchases.view%26client_id%3D6d097450b209c6dcd859%26redirect_uri%3Dhttp%3A%2F%2Flocalhost%3A3000%2Fmyapp%2Fauth%2Fcallback%26realm%3Dcustomer"

Responses

Status Meaning Description Schema
200 OK No response was specified None
302 Found Redirect user to authenticate with Shutterstock AuthorizeResponse
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Get access tokens

curl "https://api.shutterstock.com/v2/oauth/access_token" \ -X POST \ --data-urlencode "client_id=$CLIENT_ID" \ --data-urlencode "client_secret=$CLIENT_SECRET" \ --data-urlencode "grant_type=authorization_code" \ --data-urlencode "code=$CODE"
const axios = require("axios");

const body = {
  "client_id": clientId,
  "client_secret": clientSecret,
  "grant_type": "authorization_code",
  "code": code,
};

axios.post("https://api.shutterstock.com/v2/oauth/access_token", body)
  .then((res) => {
    console.log(res);
  });
$body = [
  "client_id" => $clientId,
  "client_secret" => $clientSecret,
  "grant_type" => "authorization_code",
  "code" => $code
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/oauth/access_token",
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $encodedBody,
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);
print_r($decodedResponse);

POST /v2/oauth/access_token Try it out

This endpoint returns an access token for the specified user and with the specified scopes. The token does not expire until the user changes their password. The body parameters must be encoded as form data.

Body

Field Type Description
client_id string Client ID (Consumer Key) of your application
client_secret string Client Secret (Consumer Secret) of your application
code string Response code from the /oauth/authorize flow; required if grant_type=authorization_code
grant_type string Grant type: authorization_code generates user tokens, client_credentials generates short-lived client grants
realm string User type to be authorized (usually 'customer')
expires string Whether or not the token expires, expiring tokens come with a refresh_token to renew the access_token

Authentication

This endpoint does not require authentication.

Example responses

OK

{
  "access_token": "v2/NmQwOTc0NTBiMjA5YzZkY2Q4NTkvMTA4OTg1MDk5L2N1c3RvbWVyLzIvZjB2a0RseGo4Rkt6ZjRmVWJNMm10V2VzcHh1NTBlZWJ6andUQU1NeTVYYnNFTDVWOFRJakItS2RnZTlmbEY1Y3haNWdXLUtYc2JhaXo5djk0V0p2QzZUUWZ4c2FNWm41NkdLYUgyVWlCaVUtQTNVMV9YQWpzd3lpblI3SlZEem8wSG1qQ2NzSkJlX3VQTnNXenBIdkd4SXViVi1rRGJTVENCV0g1U3U0RXRJSV9rSm5lQkl5QXlvbm5JN241UUhv",
  "token_type": "Bearer"
}

Responses

Status Meaning Description Schema
200 OK OK OauthAccessTokenResponse
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Schemas

AccessTokenDetails

{
  "description": "Access token details that are currently associated with this user",
  "properties": {
    "client_id": {
      "description": "Client ID that is associated with the user",
      "type": "string"
    },
    "contributor_id": {
      "description": "Contributor ID that is associated with the user",
      "type": "string"
    },
    "customer_id": {
      "description": "Customer ID that is associated with the user",
      "type": "string"
    },
    "expires_in": {
      "description": "Number of seconds until the access token expires; no expiration if this value is null",
      "type": "integer"
    },
    "organization_id": {
      "description": "Organization ID that is associated with the user",
      "type": "string"
    },
    "realm": {
      "description": "Type of access token",
      "enum": [
        "customer",
        "contributor"
      ],
      "type": "string"
    },
    "scopes": {
      "description": "Scopes that this access token provides when used as authentication",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "user_id": {
      "description": "User ID that is associated with the user",
      "type": "string"
    },
    "username": {
      "description": "User name that is associated with the user",
      "type": "string"
    }
  },
  "type": "object"
}

Access token details that are currently associated with this user

Properties

Name Type Description
client_id string

Client ID that is associated with the user

contributor_id string

Contributor ID that is associated with the user

customer_id string

Customer ID that is associated with the user

expires_in integer

Number of seconds until the access token expires; no expiration if this value is null

organization_id string

Organization ID that is associated with the user

realm string

Type of access token
Valid values: customer, contributor

scopes [string]

Scopes that this access token provides when used as authentication

user_id string

User ID that is associated with the user

username string

User name that is associated with the user

Album

{
  "description": "Album metadata",
  "properties": {
    "id": {
      "type": "string",
      "description": "The album ID"
    },
    "title": {
      "type": "string",
      "description": "The album title"
    }
  },
  "required": [
    "id",
    "title"
  ],
  "type": "object",
  "additionalProperties": false
}

Album metadata

Properties

Name Type Description
id
(Required)
string

The album ID

title
(Required)
string

The album title

Allotment

{
  "description": "An allotment of credits as part of a subscription",
  "properties": {
    "downloads_left": {
      "description": "Number of credits remaining in the subscription",
      "type": "integer"
    },
    "downloads_limit": {
      "description": "Total number of credits available to this subscription",
      "type": "integer"
    },
    "end_time": {
      "description": "Date the subscription ends",
      "format": "date-time",
      "type": "string"
    },
    "start_time": {
      "description": "Date the subscription started",
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object"
}

An allotment of credits as part of a subscription

Properties

Name Type Description
downloads_left integer

Number of credits remaining in the subscription

downloads_limit integer

Total number of credits available to this subscription

end_time string

Date the subscription ends
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

start_time string

Date the subscription started
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

Artist

{
  "description": "Metadata about the artist that created the media",
  "properties": {
    "name": {
      "type": "string",
      "description": "The artist's name"
    }
  },
  "required": [
    "name"
  ],
  "type": "object"
}

Metadata about the artist that created the media

Properties

Name Type Description
name
(Required)
string

The artist's name

Audio

{
  "added_date": "2016-08-16",
  "album": {
    "id": "",
    "title": ""
  },
  "artists": [
    {
      "name": "Klimenko Music"
    }
  ],
  "assets": {
    "clean_audio": {
      "file_size": 35188408
    },
    "preview_mp3": {
      "file_size": 4400203,
      "url": "https://ak.picdn.net/shutterstock/audio/442583/preview/preview.mp3"
    },
    "preview_ogg": {
      "file_size": 4453197,
      "url": "https://ak.picdn.net/shutterstock/audio/442583/preview/preview.ogg"
    },
    "waveform": {
      "file_size": 18778,
      "url": "https://ak.picdn.net/shutterstock/audio/442583/waveform/waveform.png"
    }
  },
  "bpm": 110,
  "contributor": {
    "id": "2847971"
  },
  "description": "Pulsing and feel-good, featuring soaring synthesizer, groovy synth bass drums and synth drums that create a euphoric, upbeat mood.",
  "duration": 183,
  "genres": [
    "Dance/Electronic",
    "Electro Pop",
    "Pop/Rock"
  ],
  "id": "442583",
  "instruments": [
    "Piano",
    "Synth bass",
    "Synth drums",
    "Synthesizer"
  ],
  "is_adult": false,
  "is_instrumental": true,
  "isrc": "",
  "keywords": [
    "celebratory",
    "chic",
    "euphoric",
    "good times",
    "hip",
    "optimistic",
    "party",
    "soaring",
    "upbeat"
  ],
  "language": "en",
  "lyrics": "",
  "media_type": "audio",
  "moods": [
    "Bright",
    "Confident",
    "Fun",
    "Happy",
    "Inspiring",
    "Optimistic",
    "Playful",
    "Sophisticated",
    "Stylish",
    "Uplifting"
  ],
  "published_time": "2016-08-16T14:30:03-04:00",
  "recording_version": "",
  "releases": [],
  "similar_artists": [],
  "title": "Another Tomorrow",
  "updated_time": "2016-08-18T17:59:33-04:00",
  "vocal_description": "",
  "url": "https://www.shutterstock.com/music/track/another-tomorrow/442583"
}

Audio metadata

Properties

Name Type Description
added_date string

Date this track was added to the Shutterstock library
Format: YYYY-MM-DD
Example: 2020-05-29

affiliate_url string

Affiliate referral link; appears only for registered affiliate partners

album Album

Album metadata

artists [Artist]

List of artists

assets AudioAssets

Files that are available as part of an audio asset

bpm integer

BPM (beats per minute) of this track

contributor
(Required)
Contributor

Information about a contributor

deleted_time string

none
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

description string

Description of this track

duration integer

Duration of this track in seconds

genres [string]

List of all genres for this track

id
(Required)
string

Shutterstock ID of this track

instruments [string]

List of all instruments that appear in this track

is_adult boolean

Whether or not this track contains adult content

is_instrumental boolean

Whether or not this track is purely instrumental (lacking lyrics)

isrc string

none

keywords [string]

List of all keywords for this track

language string

Language of this track's lyrics

lyrics string

Lyrics of this track

media_type
(Required)
string

Media type of this track; should always be "audio"

model_releases [ModelRelease]

List of all model releases for this track

moods [string]

List of all moods of this track

published_time string

Time this track was published
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

recording_version string

Recording version of this track

releases [string]

List of all releases of this track

similar_artists [Artist]

List of all similar artists of this track

submitted_time string

Time this track was submitted
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

title string

Title of this track

updated_time string

Time this track was last updated
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

vocal_description string

Vocal description of this track

url string

Link to track information page; included only for certain accounts

AudioAssetDetails

{
  "description": "Information about a file that is part of an audio asset",
  "properties": {
    "file_size": {
      "description": "File size of the track",
      "type": "integer"
    },
    "url": {
      "description": "URL the track is available at",
      "type": "string"
    }
  },
  "type": "object"
}

Information about a file that is part of an audio asset

Properties

Name Type Description
file_size integer

File size of the track

url string

URL the track is available at

AudioAssets

{
  "description": "Files that are available as part of an audio asset",
  "properties": {
    "album_art": {
      "description": "Information about a file that is part of an audio asset",
      "properties": {
        "file_size": {
          "description": "File size of the track",
          "type": "integer"
        },
        "url": {
          "description": "URL the track is available at",
          "type": "string"
        }
      },
      "type": "object"
    },
    "clean_audio": {
      "description": "Information about a file that is part of an audio asset",
      "properties": {
        "file_size": {
          "description": "File size of the track",
          "type": "integer"
        },
        "url": {
          "description": "URL the track is available at",
          "type": "string"
        }
      },
      "type": "object"
    },
    "original_audio": {
      "description": "Information about a file that is part of an audio asset",
      "properties": {
        "file_size": {
          "description": "File size of the track",
          "type": "integer"
        },
        "url": {
          "description": "URL the track is available at",
          "type": "string"
        }
      },
      "type": "object"
    },
    "preview_mp3": {
      "description": "Information about a file that is part of an audio asset",
      "properties": {
        "file_size": {
          "description": "File size of the track",
          "type": "integer"
        },
        "url": {
          "description": "URL the track is available at",
          "type": "string"
        }
      },
      "type": "object"
    },
    "preview_ogg": {
      "description": "Information about a file that is part of an audio asset",
      "properties": {
        "file_size": {
          "description": "File size of the track",
          "type": "integer"
        },
        "url": {
          "description": "URL the track is available at",
          "type": "string"
        }
      },
      "type": "object"
    },
    "waveform": {
      "description": "Information about a file that is part of an audio asset",
      "properties": {
        "file_size": {
          "description": "File size of the track",
          "type": "integer"
        },
        "url": {
          "description": "URL the track is available at",
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}

Files that are available as part of an audio asset

Properties

Name Type Description
album_art AudioAssetDetails

Information about a file that is part of an audio asset

clean_audio AudioAssetDetails

Information about a file that is part of an audio asset

original_audio AudioAssetDetails

Information about a file that is part of an audio asset

preview_mp3 AudioAssetDetails

Information about a file that is part of