NAV Navigation
cURL Node.JS PHP CLI
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, PHP, and the Shutterstock command-line client.

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 and license media from Shutterstock's free media collection. 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 the Shutterstock CLI

The examples for the Shutterstock command-line client work on the command line of many operating systems. To install the CLI, run pip install shutterstock-cli.

The Shutterstock CLI requires Python version 3 and the pip package manager.

The CLI uses these environment variables:

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 requires PHP 5.4 or greater, plus the curl and json 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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images search-images --query hiking --image-type photo --orientation vertical --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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images list-image-categories --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.listImageCategories(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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images search-images --query giraffes --page 2 --per-page 3
$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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos search-videos --query boats --sort popular

shutterstock audio search-tracks --instruments Piano --duration-from 300 --sort bpm --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.searchTracks(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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images search-images --query airplane --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)"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images search-images --query dolphins --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, 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

All 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. The message in the response states the UTC time in milliseconds for when the application's quota renews, as in this example:

{
    "message": "Too many requests",
    "limit": 1000,
    "remaining": 0,
    "reset": 1624268836452
}

You can also access rate limit information from all requests via the response headers in the API response:

To request a higher rate limit, contact us.

Subscriptions

To access the API, you need an API application and either a free or paid API subscription. The type of subscription determines which media library you have access to and what level of access you have to other features such as reverse image search. To set up a paid API subscription, see the API subscription page. To set up a free API subscription, create an application and select the free subscription as described in Applications.

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 get your subscription ID, use the GET /v2/user/subscriptions endpoint. To test your subscription, see Licensing sandbox.

Subscription features

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

Capability Free API subscription Standard API subscription Business API subscription
Media library access Free 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 Yes Yes Yes
View image, video, and track details Yes Yes Yes
Create collections Yes Yes Yes
Access unwatermarked images Free image collection only Yes Yes
Use reverse image search and similar image search Limited Limited Custom
Generate custom music Limited Limited Custom
Embed Shutterstock Editor and video editing No No Yes

Media libraries

Each type of subscription provides access to a specific media library; all API requests use only the media in that library, including search, details, and licensing requests. For example, when you search with a free subscription, the results are limited to images in the Free stock photos collection. 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.

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.

Your application can use an existing API subscription or you can start a free subscription when you create the application.

To create an application:

  1. Log in at shutterstock.com, go to your account page, 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 and paths (not full URLs) where your application is running, such as "mycompany.com/myApplication." If you’ve got an application running on a server, use the host name of the server and path to the application. Otherwise, leave the default host name localhost for testing purposes.

    • Referrer: If you are creating a front-end or client-side integration or using one of Shutterstock's front-end integrations, such as the Shutterstock UI search widget, specify a comma-separated list of valid referrer domains and paths, such as "mycompany.com/myApplication." Each item in the list must match one of the callback host names.

      When you add paths to this list, the API accepts requests with an HTTP Referer header from one of these paths and with the API key in the api_key query parameter. Front-end integrations often use this style of authentication to hide secrets from the end user.

    • 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.

    • Subscription: Optionally, select this check box to start a free subscription or use your existing free subscription. If you have a paid subscription, you can use it with any of your applications.

    • 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 media library that the application accesses and whether the application can access other features such as reverse image search. These products are separate from the subscriptions that control how many assets you can license and download and what level of access the application has to other features.

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"
export SHUTTERSTOCK_KEY="123abc456def"
export SHUTTERSTOCK_SECRET="1a2b3c4d"

shutterstock images search-images --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://www.shutterstock.com/account/developers/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.

Getting tokens from your account page

As a shortcut, you can get a token directly from an application on your account page:

  1. Create an account at https://www.shutterstock.com if you don't already have one.
  2. Set up an application at https://www.shutterstock.com/account/developers/apps.
  3. On the application details page, under Token, click Generate token.
  4. On the Select scopes page, select the scopes for the token. The token automatically has scopes that allow it to run basic tasks. You can add scopes that allow it to access your licenses and collections.
  5. Click Continue.
  6. In the popup window, sign in to your shutterstock.com account.

The popup window shows the token. Copy it immediately, because it is shown only once. The token is valid until the user account that you logged in with changes its password or email address.

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

Now you can use the token to authenticate to the API. See Authenticating with OAuth tokens.

Getting tokens from application code

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"
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://www.shutterstock.com/developers 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://www.shutterstock.com/developers.
    • 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"
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"}

Authenticating with OAuth tokens

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);
  });
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images search-images --query kites --image-type photo --page 1 --per-page 5 --sort popular --view minimal

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. The CLI requires that you put the token in the SHUTTERSTOCK_API_TOKEN environment variable.

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);
  });
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" \

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 or email address.

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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images search-images --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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos search-videos --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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio search-tracks --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.searchTracks(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.

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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images search-images --query "dog AND cat"

shutterstock images search-images --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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos search-videos --query boats --sort popular

shutterstock audio search-tracks --instruments Piano --duration-from 300 --sort bpm --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.searchTracks(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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images search-images --query chien --language fr --region fr

shutterstock images search-images --query perro --language es --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 any ISO 3166-1 alpha-2 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.

You can also filter results by the country that the contributor lives in with the contributor_country parameter. For example, to show images from contributors in France, set the contributor_country parameter to FR. To hide images from contributors in Germany, set the contributor_country parameter to NOT DE. To filter multiple countries, send the parameter multiple times with each country code. You can use this parameter with NOT or without NOT, but not with both in the same search.

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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images search-images --query earthquake --sort newest --image-type photo

shutterstock images search-images --category Holidays --sort popular
$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 "instruments=Trumpet" \
--data-urlencode "instruments=Drums"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio search-tracks --instruments Piano --instruments Drums
$query = "instruments=Trumpet&instruments=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 = {
  "instruments": ["Trumpet", "Drums"]
};

audioApi.searchTracks(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 "genre=Blues > Chicago"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio search-tracks --genre "Blues > Chicago"
$query = "genre=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 = {
  "genre": ["Blues > Chicago"]
};

audioApi.searchTracks(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 | tr -d '\n'`\"}")

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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo "{\"base64_image\":\"`base64 myImage.jpg | tr -d '\n'`\"}" > data.json

RESPONSE=$(sstk cv upload-image data.json)

echo "The next step requires the jq program."

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

shutterstock cv get-similar-images --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_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 and base64-encoded. 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 | tr -d '\n'`\"}")

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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo "{\"base64_image\":\"`base64 myImage.jpg`\"}" > data.json

RESPONSE=$(sstk cv upload-image data.json)

echo "The next step requires the jq program."

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

shutterstock cv get-keywords --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 a base64-encoded image 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.

To get suggested search keywords from a block of plain text, use the POST /v2/images/search/suggestions endpoint. Then you can use those keywords to search for media items that are related to the text.

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. You can also filter fields out of the details with the fields parameter. 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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock user get-user-subscription-list
$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.getUserSubscriptionList()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

If you are using an API subscription from https://www.shutterstock.com/developers, 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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "images": [
    {
      "image_id": "59656357",
      "price": 12.50,
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
}' > data.json

shutterstock images license-images --subscription-id $SUBSCRIPTION_ID data.json
$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. use the GET /v2/user/subscriptions endpoint.

Licensing editorial media

The endpoint that you use to license editorial media depends on where you find the editorial media. Some editorial accounts license editorial media from the same endpoints as they use to access non-editorial media. Other accounts use separate editorial endpoints to find and license editorial media. Contact your account representative for information about how you should access editorial media.

Accessing editorial media from non-editorial endpoints

Example request body for licensing editorial media

(POST /v2/images/licenses)

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

If you access editorial media from non-editorial endpoints, you can find editorial media by searching with the GET /v2/images/search endpoint and setting the license parameter to editorial. Then use the POST /v2/images/licenses endpoint to license them as you would license non-editorial media.

Editorial images have the is_editorial field set to true. To license these images, you must acknowledge the editorial agreement as part of the licensing request. You must include "editorial_acknowledgement": true in the request, as in the example in the right-hand pane.

Accessing editorial media from editorial endpoints

Example request body for licensing editorial media

(POST /v2/editorial/images/licenses)

{
  "editorial": [
    {
      "editorial_id": "8594090h",
      "license": "premier_editorial_comp"
    }
  ],
  "country": "USA"
}

If you access editorial media from separate editorial endpoints, use the GET /v2/editorial/images/search or GET /v2/editorial/videos/search endpoints to find the media. Use the POST /v2/editorial/images/licenses or POST /v2/editorial/videos/licenses endpoints to license and download the media, as shown in the example in the right-hand pane.

Downloading custom sizes

Setting the size of an image

DATA='{
  "images": [
    {
      "image_id": "59656357",
      "size": "custom",
      "custom_dimensions": {
        "width": 500
      }
    }
  ]
}'

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"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "images": [
    {
      "image_id": "59656357",
      "size": "custom",
      "custom_dimensions": {
        "width": 500
      }
    }
  ]
}' > data.json

shutterstock images license-images --subscription-id $SUBSCRIPTION_ID data.json
$body = [
  "images" => [
    [
      "image_id" => "539753938",
      "size" => "custom",
      "custom_dimensions" => [
        "width" => 500
      ]
    ]
  ]
];
$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",
      "size": "custom",
      "custom_dimensions": {
        "width": 500
      }
    }
  ]
};

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

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

When you license and download an image, you can select one of the standard sizes that it is available in, or you can specify a custom height or width in pixels. The API resizes the image to match that height or width. You can set the height or the width but not both. The height or width must be at least 100 pixels and has a maximum of the original image size.

To resize images like this, your application must be enabled. Contact us for access.

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"

RESPONSE=$(curl -X GET "https://api-sandbox.shutterstock.com/v2/images/licenses" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
--data-urlencode "image_id=59656357")

echo "The next step requires the jq program."

LICENSE_ID=$(jq -r .data[0].id <<< $RESPONSE)

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

curl -X POST "https://api-sandbox.shutterstock.com/v2/images/licenses/$LICENSE_ID/downloads" \
-d "$REDOWNLOAD_DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"
export SHUTTERSTOCK_SANDBOX="true"

echo '{
  "images": [
    {
      "image_id": "59656357",
      "price": 12.50,
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
}' > data.json

shutterstock images license-images --subscription-id $SUBSCRIPTION_ID data.json
// Simulate licensing the image in the sandbox
$licenseBody = [
  "images" => [
    [
      "image_id" => "539753938",
      "price"=> 12.50,
      "metadata"=> [
        "customer_id"=> "12345"
      ]
    ]
  ]
];
$encodedLicenseBody = json_encode($licenseBody);

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

$licenseHandle = curl_init();
curl_setopt_array($licenseHandle, $licenseOptions);
$licenseResponse = curl_exec($licenseHandle);
curl_close($licenseHandle);

$decodedLicenseResponse = json_decode($licenseResponse);
print_r($decodedLicenseResponse);

// Get a list of sandbox licenses for that image ID
$licenseHistoryOptions = [
  CURLOPT_URL => "https://api-sandbox.shutterstock.com/v2/images/licenses?image_id=539753938",
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$licenseHistoryHandle = curl_init();
curl_setopt_array($licenseHistoryHandle, $licenseHistoryOptions);
$licenseHistoryResponse = curl_exec($licenseHistoryHandle);
curl_close($licenseHistoryHandle);

$decodedLicenseHistoryResponse = json_decode($licenseHistoryResponse);
print_r($decodedLicenseHistoryResponse);
$licenseId = $decodedLicenseHistoryResponse['data[0]->id'];

// Redownload image
$redownloadBody = [
  "size" => "huge"
];
$encodedRedownloadBody = json_encode($redownloadBody);

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

$redownloadHandle = curl_init();
curl_setopt_array($redownloadHandle, $redownloadOptions);
$redownloadResponse = curl_exec($redownloadHandle);
curl_close($redownloadHandle);

$decodedRedownloadResponse = json_decode($redownloadResponse);
print_r($decodedRedownloadResponse);
const sstk = require("shutterstock-api");

sstk.setSandbox(true);

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const imageToLicense = "419235589";

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

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

// Simulate licensing the image in the sandbox
imagesApi.licenseImages(body, queryParams)
  .then((data) => {
    // Get a list of sandbox licenses for that image ID
    console.log(data);
    return imagesApi.getImageLicenseList({ "image_id": imageToLicense });
  })
  .then((data) => {
    // Redownload image
    console.log(data);
    if (data.total_count < 1) {
      throw new Error("Image does not have a license in the sandbox.");
    }
    const licenseId = data.data[0].id;
    return imagesApi.downloadImage(licenseId, { "size": "huge" });
  })
  .then((data) => {
    // Get redownload URL
    console.log(data.url);
  })
  .catch((error) => {
    console.error(error);
  });

You can use the licensing sandbox API to test your application's licensing, downloading, and license history code for images, video, and audio and verify that your subscription is working. Editorial licensing is 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 sandbox API verifies that the subscription is valid for requests 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.

The licensing sandbox API is exactly like the main API except for these differences:

All other endpoints in the sandbox API work exactly the same way 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,

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"
shutterstock images get-image-license-list
$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 '{}'
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{}' > data.json

shutterstock images download-image i4152144892 data.json
$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.

Generating custom music

Timeline for a minimal custom music render

{
  "audio_renders": [
    {
      "preset": "MASTER_MP3",
      "filename": "my_custom_audio",
      "timeline": {
        "spans": [
          {
            "id": 111,
            "span_type": "metered",
            "time": 0,
            "tempo": 76,
            "regions": [
              {
                "id": 222,
                "region": "music",
                "descriptor": "cinematic_minimal_tense",
                "beat": 0
              }
            ]
          },
          {
            "span_type": "unmetered",
            "time": 30.0
          }
        ]
      }
    }
  ]
}

Timeline for a custom music render with instrument groups

{
  "audio_renders": [
    {
      "preset": "MASTER_MP3",
      "filename": "my_custom_audio",
      "timeline": {
        "spans": [
          {
            "id": 111,
            "span_type": "metered",
            "time": 0,
            "tempo": 76,
            "regions": [
              {
                "id": 222,
                "region": "music",
                "descriptor": "cinematic_minimal_tense",
                "beat": 0
              }
            ],
            "instrument_groups": [
              {
                "instrument_group": "pop_fuel_yamaha_upright_acoustic_piano",
                "statuses": [
                  {
                    "beat": 0,
                    "status": "active"
                  }
                ]
              },
              {
                "instrument_group": "direct_destiny_mid_pad",
                "statuses": [
                  {
                    "beat": 0,
                    "status": "active"
                  }
                ]
              }
            ]
          },
          {
            "span_type": "unmetered",
            "time": 30.0
          }
        ]
      }
    }
  ]
}

The API generates custom music output (also called an audio render) from an audio timeline, which specifies the length and style of the audio and when different instruments start and stop playing.

At minimum, a timeline must have these elements, as shown in the example in the right-hand pane:

Aside from those basic requirements, timelines can be as simple or as complex as you want to make them. For example, you can use different regions to change the descriptor of the audio at different points in time. Also, instead of letting the API choose instruments, you can select instruments from the current descriptor and use instrument groups to control which instruments are in the audio and when they play, as in the next example in the right-hand pane.

Applications without an API subscription can generate audio, but with these limitations:

If you are interested in a custom music subscription, contact us.

For information about advanced features of custom music, including tempo changes, endings, transitions, and musical keys, see Custom music.

Timelines

The timeline is the data from which the API generates rendered audio. A timeline consists of a series of sequential, non-overlapping spans. Each span contains one or more regions that determine the style of the audio and one or more instrument groups that specify the instruments and when they play during that span.

This diagram shows the elements of a timeline. The timeline contains spans, the spans contain regions and instrument groups, and the instrument groups contain statuses.

A diagram of the elements of an audio timeline

Spans

Spans indicate the beginning of a period of music or silence, but you can think of them as a period of time in the music.

There are two types of spans: metered and unmetered. Metered spans contain music. Unmetered spans do not contain music and are used to denote the end of the preceding metered span.

A span has a start time in seconds and a tempo in beats per minute. The events within the span are measured in beats, based on that number of beats per minute.

Spans never overlap each other. For this reason, if an element within a span have a start beat that is after the end of the span, that element is ignored.

Regions

Regions indicate the descriptor, or style, for a period of music within a span and the beat that it starts on, relative to the start of the span. The descriptor controls the instruments that are available and the genre or flavor for the music. A span can have multiple regions or use the same region for the entire span, but regions cannot overlap.

Descriptors

A descriptor is a style or genre for the music in a region. The descriptor that you choose has a huge impact on the sound of the music.

Descriptors limit the bands and instruments that are available. During a region of audio, you can use only instruments that are available in that descriptor. The API ignores instruments that are not in the active descriptor.

Instrument groups

Instrument groups include one instrument and a series of status objects that specify when that instrument plays and stops. Each status starts at a beat, relative to the start of the span.

Creating renders

Create a render

DATA='{
  "audio_renders": [
    {
      "preset": "MASTER_MP3",
      "filename": "my_custom_audio",
      "timeline": {
        "spans": [
          {
            "id": 111,
            "span_type": "metered",
            "time": 0,
            "tempo": 76,
            "regions": [
              {
                "id": 222,
                "region": "music",
                "descriptor": "cinematic_minimal_tense",
                "beat": 0
              }
            ],
            "instrument_groups": [
              {
                "instrument_group": "pop_fuel_yamaha_upright_acoustic_piano",
                "statuses": [
                  {
                    "beat": 0,
                    "status": "active"
                  }
                ]
              },
              {
                "instrument_group": "direct_destiny_mid_pad",
                "statuses": [
                  {
                    "beat": 0,
                    "status": "active"
                  }
                ]
              }
            ]
          },
          {
            "span_type": "unmetered",
            "time": 30.0
          }
        ]
      }
    }
  ]
}'

curl -X POST "https://api.shutterstock.com/v2/ai/audio/renders" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "$DATA"
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "audio_renders": [
    {
      "preset": "MASTER_MP3",
      "filename": "my_custom_audio",
      "timeline": {
        "spans": [
          {
            "id": 111,
            "span_type": "metered",
            "time": 0,
            "tempo": 76,
            "regions": [
              {
                "id": 222,
                "region": "music",
                "descriptor": "cinematic_minimal_tense",
                "beat": 0
              }
            ],
            "instrument_groups": [
              {
                "instrument_group": "pop_fuel_yamaha_upright_acoustic_piano",
                "statuses": [
                  {
                    "beat": 0,
                    "status": "active"
                  }
                ]
              },
              {
                "instrument_group": "direct_destiny_mid_pad",
                "statuses": [
                  {
                    "beat": 0,
                    "status": "active"
                  }
                ]
              }
            ]
          },
          {
            "span_type": "unmetered",
            "time": 30.0
          }
        ]
      }
    }
  ]
}' > data.json

shutterstock ai-audio create-audio-renders data.json
$body = [
  "audio_renders" => [
    [
      "preset" => "MASTER_MP3",
      "filename" => "my_custom_audio",
      "timeline" => [
        "spans" => [
          [
            "id" => 111,
            "span_type" => "metered",
            "time" => 0,
            "tempo" => 76,
            "regions" => [
              [
                "id" => 222,
                "region" => "music",
                "descriptor" => "cinematic_minimal_tense",
                "beat" => 0
              ]
            ],
            "instrument_groups" => [
              [
                "instrument_group" => "pop_fuel_yamaha_upright_acoustic_piano",
                "statuses" => [
                  [
                    "beat" => 0,
                    "status" => "active"
                  ]
                ]
              ],
              [
                "instrument_group" => "direct_destiny_mid_pad",
                "statuses" => [
                  [
                    "beat" => 0,
                    "status" => "active"
                  ]
                ]
              ]
            ]
          ],
          [
            "span_type" => "unmetered",
            "time" => 30.0
          ]
        ]
      ]
    ]
  ]
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/ai/audio/renders",
  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 customMusicApi = new sstk.CustomMusicApi();

const body = {
  "audio_renders": [
    {
      "preset": "MASTER_MP3",
      "filename": "my_custom_audio",
      "timeline": {
        "spans": [
          {
            "id": 111,
            "span_type": "metered",
            "time": 0,
            "tempo": 76,
            "regions": [
              {
                "id": 222,
                "region": "music",
                "descriptor": "cinematic_minimal_tense",
                "beat": 0
              }
            ],
            "instrument_groups": [
              {
                "instrument_group": "pop_fuel_yamaha_upright_acoustic_piano",
                "statuses": [
                  {
                    "beat": 0,
                    "status": "active"
                  }
                ]
              },
              {
                "instrument_group": "direct_destiny_mid_pad",
                "statuses": [
                  {
                    "beat": 0,
                    "status": "active"
                  }
                ]
              }
            ]
          },
          {
            "span_type": "unmetered",
            "time": 30.0
          }
        ]
      }
    }
  ]
};

customMusicApi.createAudioRenders(body)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Example response

{
  "audio_renders": [
    {
      "id": "njlpYoWWmb1AYs2nZyw7EcNWbAkZ",
      "timeline": {},
      "status": "WAITING_COMPOSE",
      "preset": "MASTER_MP3",
      "progress_percent": 0,
      "files": [],
      "created_date": "2021-01-26T12:10:22-05:00",
      "updated_date": "2021-01-26T13:10:22-05:00"
    }
  ]
}

To create a render, pass the timeline object and file format preset (MASTER_MP3 for an MP3 file, MASTER_WAV for a WAV file, or STEMS_WAV for individual WAV tracks for each instrument) to the POST /v2/ai/audio/renders endpoint. The response body includes the ID of the render, which you can use to download the output file.

Downloading renders

Check the status of a render

curl -X GET "https://api.shutterstock.com/v2/ai/audio/renders" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "id=njlpYoWWmb1AYs2nZyw7EcNWbAkZ" 
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock ai-audio fetch-renders --id OU1btkbFkKpw7lrHWya45TPaAbTc
$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/ai/audio/renders?id=njlpYoWWmb1AYs2nZyw7EcNWbAkZ",
  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 customMusicApi = new sstk.CustomMusicApi();

const renders = [
  "njlpYoWWmb1AYs2nZyw7EcNWbAkZ"
];

customMusicApi.fetchRenders(renders)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Example response: render in progress

{
  "audio_renders": [
    {
      "id": "njlpYoWWmb1AYs2nZyw7EcNWbAkZ",
      "timeline": {},
      "status": "WAITING_COMPOSE",
      "preset": "MASTER_MP3",
      "progress_percent": 0,
      "files": [],
      "created_date": "2021-01-26T12:10:22-05:00",
      "updated_date": "2021-01-26T13:10:22-05:00"
    }
  ]
}

Example response: completed render

{
  "audio_renders": [
    {
      "id": "azQhRPBD9nh6vL8TM767yfGrygv5",
      "status": "CREATED",
      "preset": "MASTER_MP3",
      "progress_percent": 100,
      "files": [
        {
          "bits_sample": 16,
          "content_type": "audio/mp3",
          "download_url": "https://s3-us-west-2.amazonaws.com/amper-ephemeral/renders/2021/02/10/amper-api-azQhRPBD9nh6vL8TM767yfGrygv5/0.mp3",
          "frequency_hz": 44100,
          "kbits_second": 192,
          "size_bytes": 3601830,
          "tracks": [
            "master"
          ],
          "filename": "my_custom_audio"
        }
      ]
    }
  ]
}

The time that the API takes to render the output depends on the length of the audio and the descriptors in the timeline. You can use the GET /v2/ai/audio/renders endpoint to track the status of the rendering process and download the audio when it is ready. You must call this endpoint once to trigger the rendering process and then call it again to see if the output file is ready. To avoid exceeding your application's rate limit, don't call this endpoint more than once in 10 seconds.

Renders that are not ready have a status such as WAITING_COMPOSE. Renders that are ready have a status of CREATED and include a link to the output file.

Embedding video editing

By embedding the video editor in your web application, you can let your customers edit Shutterstock videos directly on a web page. Users can license and load Shutterstock videos and images, upload their own vidoes and images, trim and crop them, add text, and export video to a variety of aspect ratios.

The following information covers using the API to register the video editor and authenticate users. For information on setting up the video editor, see Video editor integration.

To embed image editing, see Image editor integration.

Prerequisites

To use the video editor, you must have a Shutterstock reseller account. Contact us for more information.

The video editor runs in any JavaScript-based application, including plain JavaScript, and in all modern web browsers.

Before you can use the editor, you must configure an application with a webhook URL that receives information about rendered videos.

Setting up a webhook

When the editor renders a video, the video editor API sends information about the rendered video to a webhook URL that you specify. You must write an application or add an endpoint to an existing application to receive this message, download the video, and store it.

Important: Your application must save the video promptly. Your application should not store the URL because it is temporary; the rendered video is deleted after a few days. Your application must download the video and store it somewhere that it can provide it to users.

Example webhook body

{
  "videoContext": "My Project",
  "title": "My video",
  "wochitVideoId": "video123456789",
  "thumbnailUrl": "http://example.com/videos/thumbnails/video123456789_thumb.jpg",
  "videoUrl": "http://example.com/videos/video123456789.mp4"
}

The API sends these fields in the webhook request:

Example application that accepts the completed video webhook request

var express = require('express');
var app = express();

const port = 3009;

app.use(express.json());

app.post('/videoCompleteWebhook', function (req, res) {
  const {
    videoContext,
    wochitVideoId,
    thumbnailUrl,
    videoUrl,
    title,
  } = req.body;
  console.log(`videoContext: ${videoContext}`);
  console.log(`title: ${title}`);
  console.log(`wochitVideoId: ${wochitVideoId}`);
  console.log(`thumbnailUrl: ${thumbnailUrl}`);
  console.log(`videoUrl: ${videoUrl}`);
  res.send();
});

app.listen(port, () => {
  console.log(`Example app listening at http://localhost:${port}`);
});

You can use any application that can receive an HTTP POST request to implement the webhook. For example, the Node.JS application in the right-hand pane uses Express.JS to receive the request.

Test the webhook

curl -X POST "http://localhost:3009/videoCompleteWebhook" \
-H "Content-Type: application/json" \
--data-raw '{
  "videoContext": "user_123_project_967",
  "title": "My video",
  "wochitVideoId": "video123456789",
  "thumbnailUrl": "http://example.com/videos/thumbnails/video123456789_thumb.jpg",
  "videoUrl": "http://example.com/videos/video123456789.mp4"
}'

If you run this example application locally, the webhook URL is http://localhost:3009/videoCompleteWebhook. You can test the local application by sending an HTTP POST request to it, such as in the example in the right-hand pane.

The local application prints the values in the request. You must configure your code to download and save the video.

You must also configure your server to allow incoming connections from these IP addreses:

Registering the editor

Register an instance of the editor

curl -X POST "https://api.shutterstock.com/v2/editor/customers" \
-H "Authorization: Bearer v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a" \
-H "Content-Type: application/json" \
--data-raw '{
  "webhookUrl": "http://example.com:3009/videoCompleteWebhook",
  "imageSubscriptionId": "s1234567",
  "videoSubscriptionId": "s7654321"
}'
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videoEditorApi = new sstk.VideoEditorApi();

const body = {
  "webhookUrl": "http://example.com:3009/videoCompleteWebhook",
  "imageSubscriptionId": "s1234567",
  "videoSubscriptionId": "s7654321"
};

videoEditorApi.registerEditorInstance(body)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$body = body = [
  "webhookUrl" => "http://example.com:3009/videoCompleteWebhook",
  "imageSubscriptionId" => "s1234567",
  "videoSubscriptionId" => "s7654321"
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editor/customers",
  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);

To set up the video editor, you must register your instance of the editor with the Shutterstock API by providing your webhook URL and a token from your API application. You only need to do this once for each instance of the editor.

  1. Get an OAuth token for the Shutterstock API. See OAuth authentication.

  2. Get the subscription IDs for your image and video subscriptions. You can use the GET /v2/user/subscriptions endpoint.

  3. Send a one-time HTTPS request to register your instance of the editor:

    • Send the request to the POST /v2/editor/customers endpoint.
    • In the headers, include the header Authorization: Bearer $SHUTTERSTOCK_API_TOKEN, where $SHUTTERSTOCK_API_TOKEN is your token. This endpoint requires a non-expiring token that starts with v2/, not an expiring token that begins with v1/.
    • In the request body, include these fields:
      • webhook.clientApiUrl: Your webhook URL
      • imageSubscriptionId: The ID of the subscription to use for licensing images
      • videoSubscriptionId: The ID of the subscription to use for licensing videos

    The right-hand pane shows an example of this request.

    The API returns a 200 response to indicate that the video editor is registered.

You can update this information by sending a request to the PATCH /v2/editor/customers endpoint with the same authentication header and the same body. If you do not include a field in the body, that field is not changed.

Authenticating

Authenticate a user in the video editor

DATA='{
  "userId": "123"
}'

curl -X POST "https://api.shutterstock.com/v2/editor/auth" \
-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 videoEditorApi = new sstk.VideoEditorApi();

const body = {
  "userId": "123"
};

videoEditorApi.authVideoEditor(body)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$body = [
  "userId" => "123"
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editor/auth",
  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);

When the user loads the web application with the video editor, the app must request a video editor token for that user. Each user should have a separate token:

Request body

{
  "userId": "123"
}

The request body includes only a unique user ID that your app assigns to the user that is loading the video editor.

Example token response

{
  "token": {
    "value": "123456789.ABCDEFHIJ.A1B2C3D4",
    "expirationDate": 1624559827
  }
}

The response includes a video editor token, as in the example in the right-hand pane.

In the video editor options, use this token as the value of the userToken option.

Embedding the video editor in a page

For information about using the token and embedding the video editor on a page, see Video editor integration.

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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images search-images --query Vienna --orientation horizontal --sort popular

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_end

string

Show images added before 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

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

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

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 returns images that use similar colors

contributor

[string]

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

contributor_country

[string]

Show images from contributors in one or more specified countries, or start with NOT to exclude a country from the search

One of these formats:

  • A two-character (ISO 3166 Alpha-2) country code
    Example: US
  • A NOT followed by a two-character (ISO 3166 Alpha-2) country code
    Example: NOT 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

[string]

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

keyword_safe_search

boolean

Hide results with potentially unsafe keywords
Default: true

language

Language

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

license

[string]

Show only images with the specified license
Valid values: commercial, editorial, enhanced
Default: [commercial]

model

[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

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 ethnicities, or start with NOT to show images without those ethnicities
Valid values: african, african_american, black, brazilian, chinese, caucasian, east_asian, hispanic, japanese, middle_eastern, native_american, pacific_islander, south_asian, southeast_asian, other, NOT african, NOT african_american, NOT black, NOT brazilian, NOT chinese, NOT caucasian, NOT east_asian, NOT hispanic, NOT japanese, NOT middle_eastern, NOT native_american, NOT pacific_islander, NOT south_asian, NOT southeast_asian, NOT other

people_gender

string

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

people_model_released

boolean

Show images of people with a signed model release

people_number

integer

Show images with the specified number of people
Maximum: 4

per_page

integer

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

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

One of these formats:

  • A two-character (ISO 3166 Alpha-2) country code
    Example: US
  • A valid IPv4 address
    Example: 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",
      "has_model_release": false,
      "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

Get suggestions for a search term


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

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

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

imagesApi.getImageSuggestions(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "query" => "cats"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search/suggestions?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-image-suggestions --query cats

GET /v2/images/search/suggestions Try it out

This endpoint provides autocomplete suggestions for partial search terms.

Parameters

Parameter Type Description
query
(Required)

string

Search term for which you want keyword suggestions

limit

integer

Limit the number of suggestions
Minimum: 1, Maximum: 25, Default: 10

Accepted authentication

Example responses

OK

{
  "data": [
    "cats",
    "catwalk",
    "cat and dog",
    "cat dog",
    "cat silhouette"
  ]
}

Responses

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

Get keywords from text

DATA='{"text": "The beach is a wonderful place to visit. It has beautiful sand and ocean waves."}'

curl -X POST "https://api.shutterstock.com/v2/images/search/suggestions" \
-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 = {
  "text": "The beach is a wonderful place to visit. It has beautiful sand and ocean waves."
};

imagesApi.getImageKeywordSuggestions(body)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$body = [
  "text" => "The beach is a wonderful place to visit. It has beautiful sand and ocean waves."
];
$encodedBody = json_encode($body);

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search/suggestions",
  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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{"text": "The beach is a wonderful place to visit. It has beautiful sand and ocean waves."}' > data.json

shutterstock images get-image-keyword-suggestions data.json

POST /v2/images/search/suggestions Try it out

This endpoint returns up to 10 important keywords from a block of plain text.

Body

Schema: SearchEntitiesRequest
Plain text to extract keywords from

Fields:

Field Type Description
text
(Required)
string Plain text to extract keywords from

Accepted authentication

Example responses

OK

{
  "data": [
    "beach",
    "place",
    "sand",
    "ocean"
  ]
}

Responses

Status Meaning Description Schema
200 OK OK SearchEntitiesResponse
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" \
-G \
--data-urlencode "language=es"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

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

imagesApi.listImageCategories(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images list-image-categories --language es

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, el, en, es, fi, fr, hu, id, it, ja, ko, nb, nl, pl, pt, ro, ru, sv, th, tr, vi, 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" \
-G \
--data-urlencode "language=es"
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);
  });
$queryFields = [
  "language" => "es"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/465011609/similar?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-similar-images 465011609 --language es

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

language

Language

Language for the keywords and categories in the response
Valid values: cs, da, de, el, en, es, fi, fr, hu, id, it, ja, ko, nb, nl, pl, pt, ro, ru, sv, th, tr, vi, 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);
  });
$queryFields = [
  "id" => "465011609"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/recommendations?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-image-recommendations --id 465011609

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)

[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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-updated-images --interval "30 MINUTE"

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

start_date

string

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

type

[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

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" \
-G \
--data-urlencode "language=es"
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);
  });
$queryFields = [
  "language" => "es"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/465011609?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-image 465011609 --language es

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

language

Language

Language for the keywords and categories in the response
Valid values: cs, da, de, el, en, es, fi, fr, hu, id, it, ja, ko, nb, nl, pl, pt, ro, ru, sv, th, tr, vi, 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_editorial": false,
  "is_illustration": true,
  "has_model_release": false,
  "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" \
--data-urlencode "view=minimal"
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);
  });
$queryFields = [
  "id" => "1110335168",
  "id" => "465011609",
  "view" => "minimal"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-image-list --id 1110335168 --id 465011609 --view minimal

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)

[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",
      "is_adult": false,
      "is_editorial": false,
      "is_illustration": true,
      "has_model_release": false,
      "has_property_release": true,
      "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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "images": [
    {
      "image_id": "59656357",
      "price": 12.50,
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
}' > data.json

shutterstock images license-images --subscription-id $SUBSCRIPTION_ID data.json

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
format

string

Image format
Valid values: eps, jpg
Default: jpg

search_id

string

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

size

string

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

subscription_id

string

Subscription ID to use to license the image

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
(Required)
[LicenseImage] Images to create licenses for
Maximum length: 50
image_id
(Required)
string Image ID
auth_cookie Cookie Cookie object
name
(Required)
string The name of the cookie
value
(Required)
string The value of the cookie
custom_dimensions CustomSizeDimensions A custom height or a custom width to resize the image to, but not both (experimental)
height integer Custom height to resize the image to
width integer Custom width to resize the image to
editorial_acknowledgement boolean Set to true to acknowledge the editorial agreement
format string Image format to download
Valid values: jpg, eps
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 as a floating-point number in the transaction currency, such as 12.34
search_id string ID of the search that led to this licensing transaction
size string Image size to download
Valid values: small, medium, huge, vector, custom
subscription_id string ID of the subscription to use for the download.
show_modal boolean (Deprecated)
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"
-G \
--data-urlencode "start_date=2016-10-03T01:25:13.521Z" \
--data-urlencode "end_date=2016-10-04T13:25:13.521Z" \
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const imagesApi = new sstk.ImagesApi();

const queryParams = {
  "start_date": "2016-10-03T01:25:13.521Z",
  "end_date": "2016-10-04T13:25:13.521Z"
};

imagesApi.getImageLicenseList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "start_date" => "2016-10-03T01:25:13.521Z",
  "end_date" => "2016-10-04T13:25:13.521Z"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/licenses" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-image-license-list --start-date "2021-01-03T01:25:13.521Z" --end-date "2021-05-04T13:25:13.521Z"

GET /v2/images/licenses Try it out

This endpoint lists existing licenses.

Parameters

Parameter Type Description
end_date

string

Show licenses created before the specified date
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

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
Minimum: 1, Maximum: 200, Default: 20

sort

string

Sort order
Valid values: newest, oldest
Default: newest

start_date

string

Show licenses created on or after the specified date
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

username

string

Filter licenses by username of licensee

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "e121",
      "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": "e122",
      "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": "e123",
      "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/e123/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 = "e123"; // 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/e123/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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "size": "huge"
}' > data.json

shutterstock images download-image e123 data.json

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

Body

Schema: RedownloadImage
Information about the images to redownload

Fields:

Field Type Description
auth_cookie Cookie Cookie object
name
(Required)
string The name of the cookie
value
(Required)
string The value of the cookie
size string Size of the image
Valid values: small, medium, huge, supersize, vector
show_modal boolean (Deprecated)
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.createImageCollection(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "name": "My collection"
}' > data.json

shutterstock images create-image-collection data.json

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
(Required)
string The name of the collection

Accepted authentication

Example responses

Successfully created image collection

{
  "id": "101202664"
}

Responses

Status Meaning Description Schema
201 Created Successfully created image collection 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" \
-G \
--data-urlencode "embed=share_code" \
--data-urlencode "page=1" \
--data-urlencode "per_page=2"
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.getImageCollectionList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "embed" => "share_code",
  "page" => "1",
  "per_page" => "2"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-image-collection-list --embed share_code --page 1 --per-page 2

GET /v2/images/collections Try it out

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

Parameters

Parameter Type Description
embed

[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",
      "created_time": "2018-09-11T11:55:23-04:00",
      "updated_time": "2018-09-11T11:55:51-04:00",
      "cover_item": {
        "id": "1715788",
        "media_type": "image",
        "added_time": "2018-09-11T15:55:23.000Z"
      },
      "total_item_count": 1
    },
    {
      "id": "21663571",
      "name": "young couples",
      "created_time": "2021-06-09T17:13:17.000Z",
      "updated_time": "2018-08-02T07:33:22-04:00",
      "total_item_count": 0
    }
  ],
  "page": 1,
  "per_page": 100,
  "total_count": 2
}

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.getImageCollection("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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-image-collection 126351027

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

embed

[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",
  "updated_time": "2017-05-17T16:28:39-04:00",
  "cover_item": {
    "id": "954500",
    "media_type": "image",
    "added_time": "2018-09-11T15:55:23.000Z"
  },
  "total_item_count": 1
}

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 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.renameImageCollection(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "name": "My new collection name"
}' > data.json

shutterstock images rename-image-collection 48433107 data.json

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

Body

Schema: CollectionUpdateRequest
The new name for the collection

Fields:

Field Type Description
name
(Required)
string The new name of the collection

Accepted authentication

Responses

Status Meaning Description Schema
204 No Content Successfully updated collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found 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.deleteImageCollection(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images delete-image-collection 136351027

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

This endpoint deletes an image collection.

Parameters

Parameter Type Description
id
(Required)

string

Collection ID

Accepted authentication

Responses

Status Meaning Description Schema
204 No Content Successfully deleted collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found 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.addImageCollectionItems(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "items": [
    {
      "id": "49572945",
      "media_type": "image"
    }
  ]
}' > data.json

shutterstock images add-image-collection-items 126351027 data.json

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

Body

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

Fields:

Field Type Description
items
(Required)
[CollectionItem] List of items
id
(Required)
string ID of the item
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
media_type string The media type of the item, such as image, video, or audio

Accepted authentication

Responses

Status Meaning Description Schema
204 No Content Successfully added collection items None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found 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.getImageCollectionItems("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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-image-collection-items 126351027

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

page

integer

Page number
Minimum: 1, Default: 1

per_page

integer

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

share_code

string

Code to retrieve the contents of a shared collection

sort

string

Sort order
Valid values: newest, oldest
Default: oldest

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "38162050",
      "added_time": "2016-11-25T16:44:25-05:00",
      "media_type": "image"
    },
    {
      "id": "38139676",
      "added_time": "2016-11-25T16:44:22-05:00",
      "media_type": "image"
    },
    {
      "id": "787905",
      "added_time": "2016-11-25T16:44:19-05:00",
      "media_type": "image"
    },
    {
      "id": "826197",
      "added_time": "2016-11-25T16:44:16-05:00",
      "media_type": "image"
    },
    {
      "id": "38124508",
      "added_time": "2016-11-25T16:44:14-05:00",
      "media_type": "image"
    },
    {
      "id": "126445388",
      "added_time": "2016-11-25T16:44:02-05:00",
      "media_type": "image"
    }
  ],
  "page": 1,
  "per_page": 100,
  "total_count": 6
}

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 Collection not found 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.deleteImageCollectionItems(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images delete-image-collection-items 186726599 --item-id 495863218

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

item_id

[string]

One or more image IDs to remove from the collection

Accepted authentication

Responses

Status Meaning Description Schema
204 No Content Successfully removed collection items None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found None


curl -X GET "https://api.shutterstock.com/v2/images/collections/featured" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "embed=share_url" \
--data-urlencode "type=photo" \
--data-urlencode "asset_hint=1x"
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": "1x"
};

imagesApi.getFeaturedImageCollectionList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "embed" => "share_url",
  "type" => "photo",
  "asset_hint" => "1x"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/featured?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-featured-image-collection-list --embed share_url --type photo --asset-hint 1x

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
asset_hint

string

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

embed

string

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

type

[string]

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

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.getFeaturedImageCollection("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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-featured-image-collection 136351027

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

asset_hint

string

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

embed

string

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

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.getFeaturedImageCollectionItems("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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock images get-featured-image-collection-items 136351027

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

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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos search-videos --query "hot air balloon" --duration-from 30 --sort popular

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_end

string

Show videos added before 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

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

[string]

Show videos with the specified artist names or IDs

contributor_country

[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

keyword_safe_search

boolean

Hide results with potentially unsafe keywords
Default: true

language

Language

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

license

[string]

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

model

[string]

Show videos with each of the specified models

page

integer

Page number
Minimum: 1, Default: 1

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 ethnicities
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_model_released

boolean

Show only videos of people with a signed model release

people_number

integer

Show videos with the specified number of people
Maximum: 4

per_page

integer

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

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,
      "has_model_release": false,
      "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

Get suggestions for a search term


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

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

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

videosApi.getVideoSuggestions(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "query" => "cats"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/search/suggestions?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos get-video-suggestions --query cats

GET /v2/videos/search/suggestions Try it out

This endpoint provides autocomplete suggestions for partial search terms.

Parameters

Parameter Type Description
query
(Required)

string

Search term for which you want keyword suggestions

limit

integer

Limit the number of the suggestions
Minimum: 1, Maximum: 25, Default: 10

Accepted authentication

Example responses

OK

{
  "data": [
    "cat scan",
    "cats and dogs",
    "cats playing",
    "catsuit",
    "cat silhouette",
    "catskills",
    "cats eyes",
    "cat sitting",
    "cat sleeping",
    "cats eye"
  ]
}

Responses

Status Meaning Description Schema
200 OK OK Suggestions
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden 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" \
-G \
--data-urlencode "language=es"
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);
  });
$queryFields = [
  "language" => "es"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/2140697/similar?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos get-similar-videos 2140697 --language es

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

language

Language

Language for the keywords and categories in the response
Valid values: cs, da, de, el, en, es, fi, fr, hu, id, it, ja, ko, nb, nl, pl, pt, ro, ru, sv, th, tr, vi, 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos get-updated-videos --interval "30 MINUTE"

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

start_date

string

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

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);
  });
$queryFields = [
  "id" => "639703",
  "id" => "993721"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos get-video-list --id 639703 --id 993721

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)

[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,
      "has_model_release": false,
      "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/639703" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "language=es"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

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

videosApi.getVideo("639703", queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "language" => "es"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/639703?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos get-video 639703 --language es

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

language

Language

Language for the keywords and categories in the response
Valid values: cs, da, de, el, en, es, fi, fr, hu, id, it, ja, ko, nb, nl, pl, pt, ro, ru, sv, th, tr, vi, 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" \
-G \
--data-urlencode "language=es"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

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

videosApi.listVideoCategories(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "language" => "es"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos list-video-categories --language es

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, el, en, es, fi, fr, hu, id, it, ja, ko, nb, nl, pl, pt, ro, ru, sv, th, tr, vi, 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.licenseVideos(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "videos": [
    {
      "video_id": "2140697",
      "size": "hd"
    },
    {
      "video_id": "5613314",
      "size": "4k"
    }
  ]
}' > data.json

shutterstock videos license-videos --subscription-id $SUBSCRIPTION_ID data.json

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
search_id

string

The Search ID that led to this licensing event

size

string

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

subscription_id

string

The subscription ID to use for licensing

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
(Required)
[LicenseVideo] Videos to license
Maximum length: 50
video_id
(Required)
string ID of the video being licensed
auth_cookie Cookie Cookie object
name
(Required)
string The name of the cookie
value
(Required)
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 as a floating-point number in the transaction currency, such as 12.34; only for rev-share partners
search_id string ID of the search that led to this licensing event
size string Size of the video being licensed
Valid values: web, sd, hd, 4k
subscription_id string ID of the subscription used for this license
show_modal boolean (Deprecated)

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"
-G \
--data-urlencode "start_date=2016-10-03T01:25:13.521Z" \
--data-urlencode "end_date=2016-10-04T13:25:13.521Z" \
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const queryParams = {
  "start_date": "2016-10-03T01:25:13.521Z",
  "end_date": "2016-10-04T13:25:13.521Z"
};

videosApi.getVideoLicenseList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "start_date" => "2016-10-03T01:25:13.521Z",
  "end_date" => "2016-10-04T13:25:13.521Z"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/licenses" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos get-video-license-list --start-date "2021-01-03T01:25:13.521Z" --end-date "2021-05-04T13:25:13.521Z"

GET /v2/videos/licenses Try it out

This endpoint lists existing licenses.

Parameters

Parameter Type Description
end_date

string

Show licenses created before the specified date
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

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

start_date

string

Show licenses created on or after the specified date
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

username

string

Filter licenses by username of licensee

video_id

string

Show licenses for the specified video ID

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "e121",
      "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": "e122",
      "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": "e123",
      "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": "e124",
      "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": "e125",
      "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": "e126",
      "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": "e127",
      "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": "e128",
      "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": "e129",
      "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": "e130",
      "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/e123/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 = "e123";

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/e123/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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{}' > data.json

shutterstock videos download-videos e123 data.json

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

Body

Schema: RedownloadVideo
Information about the videos to redownload

Fields:

Field Type Description
auth_cookie Cookie Cookie object
name
(Required)
string The name of the cookie
value
(Required)
string The value of the cookie
size string Size of the video
Valid values: web, sd, hd, 4k
show_modal boolean (Deprecated)
verification_code string (Deprecated)

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.createVideoCollection(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "name": "New collection name"
}' > data.json

shutterstock videos create-video-collection data.json

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
(Required)
string The name of the collection

Accepted authentication

Example responses

Successfully created video collection

{
  "id": "10120264"
}

Responses

Status Meaning Description Schema
201 Created Successfully created video 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" \
-G \
--data-urlencode "embed=share_code"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const queryParams = {
  "embed": "share_code"
};

videosApi.getVideoCollectionList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "embed" => "share_code"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos get-video-collection-list --embed share_code

GET /v2/videos/collections Try it out

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

Parameters

Parameter Type Description
embed

[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": "17553374",
      "name": "kittens and puppies",
      "created_time": "2017-07-05T08:51:00-04:00",
      "updated_time": "2017-07-05T08:51:00-04:00",
      "total_item_count": 0
    },
    {
      "id": "17553375",
      "name": "wild life",
      "created_time": "2017-07-05T08:51:00-04:00",
      "updated_time": "2017-07-05T08:51:00-04:00",
      "total_item_count": 0
    },
    {
      "id": "17555175",
      "name": "young couples",
      "created_time": "2017-07-06T08:50:57-04:00",
      "updated_time": "2017-07-06T08:50:57-04:00",
      "total_item_count": 2
    },
    {
      "id": "17555176",
      "name": "sky timelapses",
      "created_time": "2017-07-06T08:50:58-04:00",
      "updated_time": "2017-07-06T08:50:58-04:00",
      "cover_item": {
        "id": "1715778",
        "media_type": "video",
        "added_time": "2018-09-11T15:55:23.000Z"
      },
      "total_item_count": 2
    }
  ],
  "page": 1,
  "per_page": 100,
  "total_count": 4
}

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.getVideoCollection("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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos get-video-collection 17555176

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

embed

[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": "17555176",
  "name": "cats and dogs",
  "created_time": "2018-09-11T15:55:23.000Z",
  "updated_time": "2018-09-11T15:55:51.000Z",
  "cover_item": {
    "id": "1713788",
    "media_type": "video",
    "added_time": "2018-09-11T15:55:23.000Z"
  },
  "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 Collection not found 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.renameVideoCollection(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "name": "Updated collection name"
}' > data.json

shutterstock videos rename-video-collection 17555176 data.json

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

Body

Schema: CollectionUpdateRequest
The new name for the collection

Fields:

Field Type Description
name
(Required)
string The new name of the collection

Accepted authentication

Responses

Status Meaning Description Schema
204 No Content Successfully updated collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found 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.deleteVideoCollection(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos delete-video-collection 17555176

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

Accepted authentication

Responses

Status Meaning Description Schema
204 No Content Successfully deleted collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found 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.addImageCollectionItems(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "items": [
    {
      "id": "10120264"
    },
    {
      "id": "24419024"
    }
  ]
}' > data.json

shutterstock videos add-video-collection-items 17555176 data.json

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

Body

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

Fields:

Field Type Description
items
(Required)
[CollectionItem] List of items
id
(Required)
string ID of the item
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
media_type string The media type of the item, such as image, video, or audio

Accepted authentication

Responses

Status Meaning Description Schema
204 No Content Successfully added collection items None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found 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.getVideoCollectionItems("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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos get-video-collection-items 17555176

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

Collection ID

page

integer

Page number
Minimum: 1, Default: 1

per_page

integer

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

share_code

string

Code to retrieve the contents of a shared collection

sort

string

Sort order
Valid values: newest, oldest
Default: oldest

Accepted authentication

Example responses

OK

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

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 Collection not found None

Remove videos from collections

curl -X DELETE "https://api.shutterstock.com/v2/videos/collections/17555176/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 videosApi = new sstk.VideosApi();

const collectionId = "17555176";

// Array of videos to remove
const videosToRemove = {
  "item_id": [
    "10120264"
  ]
};

videosApi.deleteVideoCollectionItems(collectionId, videosToRemove)
  .catch((error) => {
    console.error(error);
  });
$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176/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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos delete-video-collection-items 17555176 --item-id 495863218

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

item_id

[string]

One or more video IDs to remove from the collection

Accepted authentication

Responses

Status Meaning Description Schema
204 No Content Successfully removed collection items None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found None


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

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const videosApi = new sstk.VideosApi();

const queryParams = {
  "embed": "share_url"
};

videosApi.getFeaturedVideoCollectionList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "embed" => "share_url"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/featured?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos get-featured-video-collection-list --embed share_url

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

This endpoint lists featured video collections and a name and cover video for each collection.

Parameter Type Description
embed

string

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

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/videos/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 videosApi = new sstk.VideosApi();

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

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos get-featured-video-collection 136351027

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

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

Parameter Type Description
id
(Required)

string

Collection ID

embed

string

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

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/videos/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 videosApi = new sstk.VideosApi();

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

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/videos/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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock videos get-featured-video-collection-items 136351027

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

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

Parameter Type Description
id
(Required)

string

Collection ID

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 VideoCollectionItemDataList
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Featured collection not found 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.searchTracks(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio search-tracks --query bluegrass --duration-from 60 --moods uplifting

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

[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

fields

string

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

genre

[string]

Show tracks with each of the specified genres; to get the list of genres, use GET /v2/audio/genres

instruments

[string]

Show tracks with each of the specified instruments; to get the list of instruments, use GET /v2/audio/instruments

is_instrumental

boolean

Show instrumental music only

language

string

Which language to search in

library

string

Which library to search
Valid values: shutterstock, premier
Default: premier

moods

[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

view

string

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

vocal_description

string

Show tracks with the specified vocal description (male, female)

Accepted authentication

Example responses

OK

{
  "page": 1,
  "per_page": 5,
  "total_count": 25,
  "search_id": "c298887c-6f3e-45df-b6cd-41b246e4a104",
  "data": [
    {
      "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": ""
    }
  ]
}

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.listGenres()
  .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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio list-genres 

GET /v2/audio/genres Try it out

This endpoint returns a list of all audio genres.

Accepted authentication

Example responses

OK

{
  "data": [
    "Pop > Singer-Songwriter",
    "Pop > Synth Pop",
    "Production / Film Scores"
  ]
}

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.listInstruments()
  .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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio list-instruments 

GET /v2/audio/instruments Try it out

This endpoint returns a list of all audio instruments.

Accepted authentication

Example responses

OK

{
  "data": [
    "Orchestra",
    "Organ",
    "Oud",
    "Pads"
  ]
}

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.listMoods()
  .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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio list-moods 

GET /v2/audio/moods Try it out

This endpoint returns a list of all audio moods.

Accepted authentication

Example responses

OK

{
  "data": [
    "Action / Sports",
    "Adventure / Discovery",
    "Aerobics / Workout",
    "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" \
--data-urlencode "view=full"
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);
  });
$queryFields = [
  "id" => "442583",
  "id" => "434750",
  "view" => "full"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio get-track-list --id 442583 --id 434750 --view full

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)

[string]

One or more audio IDs
Minimum length: 1

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": ""
    }
  ]
}

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" \
-G \
--data-urlencode "view=full"
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);
  });
$queryFields = [
  "view" => "full"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/442583?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio get-track 442583 --view full

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)

integer

Audio track ID

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": ""
}

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_platform",
      "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": "audio_platform",
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
};

audioApi.licenseTrack(body)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$body = [
  "audio" => [
    [
      "audio_id" => "591623",
      "license" => "audio_platform",
      "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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "audio": [
    {
      "audio_id": "591623",
      "license": "audio_platform",
      "metadata": {
        "customer_id": "12345"
      }
    }
  ]
}' > data.json

shutterstock audio license-track data.json

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_platform, premier_music_basic, premier_music_extended, premier_music_pro, premier_music_comp

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
(Required)
[LicenseAudio] List of audio tracks to license
Maximum length: 50
audio_id
(Required)
string ID of the track being licensed
license string Type of license
Valid values: audio_platform, premier_music_basic, premier_music_extended, premier_music_pro, premier_music_comp
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"
-G \
--data-urlencode "start_date=2016-10-03T01:25:13.521Z" \
--data-urlencode "end_date=2016-10-04T13:25:13.521Z" \
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

const queryParams = {
  "start_date": "2016-10-03T01:25:13.521Z",
  "end_date": "2016-10-04T13:25:13.521Z"
};

audioApi.getTrackLicenseList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "start_date" => "2016-10-03T01:25:13.521Z",
  "end_date" => "2016-10-04T13:25:13.521Z"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/licenses" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio get-track-license-list --start-date "2016-10-03T01:25:13.521Z" --end-date "2016-10-04T13:25:13.521Z"

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

end_date

string

Show licenses created before the specified date
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

license

string

Restrict results by license. Prepending a - sign will exclude results by 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

start_date

string

Show licenses created on or after the specified date
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

username

string

Filter licenses by username of licensee

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "a10b7a7a5a02113a928f13e5ba196151d6",
      "user": {
        "username": "jsmith"
      },
      "license": "premier_music_extended",
      "download_time": "2020-11-11T16:15:20.000Z",
      "metadata": {
        "purchase_order": "123"
      },
      "is_downloadable": true,
      "audio": {
        "id": "420298",
        "format": {
          "size": "clean_audio"
        }
      }
    }
  ],
  "page": 1,
  "per_page": 20,
  "total_count": 1
}

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/e123/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 = "e123"; // 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/e123/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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio download-tracks e123

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

Accepted authentication

Example responses

OK

{
  "url": "http://download2.dev.shutterstock.com/gatekeeper/abc/original.wav"
}

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.createTrackCollection(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "name": "Best rock music"
}' > data.json

shutterstock images create-image-collection data.json

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
(Required)
string The name of the collection

Accepted authentication

Example responses

Successfully created audio collection

{
  "id": "48433105"
}

Responses

Status Meaning Description Schema
201 Created Successfully created audio collection CollectionCreateResponse
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

List audio collections


curl -X GET "https://api.shutterstock.com/v2/audio/collections" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "page=1" \
--data-urlencode "per_page=100" \
--data-urlencode "embed=share_code"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const audioApi = new sstk.AudioApi();

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

audioApi.getTrackCollectionList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "page" => "1",
  "per_page" => "100",
  "embed" => "share_code"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio get-track-collection-list --page 1 --per-page 100 --embed share_code

GET /v2/audio/collections Try it out

This endpoint lists your collections of audio tracks and their basic attributes.

Parameters

Parameter Type Description
embed

[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": "5747953",
      "name": "Test Collection cdad",
      "created_time": "2014-11-05T19:29:56-05:00",
      "updated_time": "2014-11-05T19:29:56-05:00",
      "total_item_count": 0
    },
    {
      "id": "5747955",
      "name": "Test Collection ff5f",
      "created_time": "2014-11-05T19:29:56-05:00",
      "updated_time": "2014-11-05T19:29:56-05:00",
      "total_item_count": 0
    },
    {
      "id": "5747957",
      "name": "Updated Collection ebc4",
      "created_time": "2014-11-05T19:29:58-05:00",
      "updated_time": "2014-11-05T19:29:58-05:00",
      "total_item_count": 0
    },
    {
      "id": "5747971",
      "name": "Test Collection 0072",
      "created_time": "2014-11-05T19:32:13-05:00",
      "updated_time": "2014-11-05T19:32:13-05:00",
      "cover_item": {
        "id": "4928041",
        "media_type": "audio",
        "added_time": "2021-07-21T16:55:17.000Z"
      },
      "total_item_count": 11
    },
    {
      "id": "5747973",
      "name": "Test Collection d332",
      "created_time": "2014-11-05T19:32:13-05:00",
      "updated_time": "2014-11-05T19:32:13-05:00",
      "total_item_count": 0
    }
  ],
  "page": 1,
  "per_page": 100,
  "total_count": 5
}

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.getTrackCollection("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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio get-track-collection 48433107

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

embed

[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": "48433107",
  "name": "Test Collection c28c",
  "created_time": "2016-06-09T17:13:17.000Z",
  "updated_time": "2016-08-18T18:52:56-04:00",
  "cover_item": {
    "id": "4928431",
    "media_type": "audio",
    "added_time": "2018-07-21T16:55:17.000Z"
  },
  "total_item_count": 10
}

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.renameTrackCollection(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "name": "Best rock music"
}' > data.json

shutterstock audio rename-collection 48433107 data.json

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

Body

Schema: CollectionUpdateRequest
Collection changes

Fields:

Field Type Description
name
(Required)
string The new name of the collection

Accepted authentication

Responses

Status Meaning Description Schema
204 No Content Successfully updated collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found 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.deleteTrackCollection(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio delete-track-collection 48433111

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

This endpoint deletes a collection.

Parameters

Parameter Type Description
id
(Required)

string

Collection ID

Accepted authentication

Responses

Status Meaning Description Schema
204 No Content Successfully deleted collection None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found 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.addTrackCollectionItems(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

echo '{
  "items": [
    {
      "id": "442583"
    },
    {
      "id": "7491192"
    }
  ]
}' > data.json

shutterstock audio add-collection-items 48433115 data.json

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

Body

Schema: CollectionItemRequest
List of items to add to collection

Fields:

Field Type Description
items
(Required)
[CollectionItem] List of items
id
(Required)
string ID of the item
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
media_type string The media type of the item, such as image, video, or audio

Accepted authentication

Responses

Status Meaning Description Schema
204 No Content Successfully added collection items None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found None

Get the contents of audio collections


curl -X GET "https://api.shutterstock.com/v2/audio/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 audioApi = new sstk.AudioApi();

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

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/audio/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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio get-track-collection-items 126351027

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

page

integer

Page number
Minimum: 1, Default: 1

per_page

integer

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

share_code

string

Code to retrieve the contents of a shared collection

sort

string

Sort order
Valid values: newest, oldest
Default: oldest

Accepted authentication

Example responses

OK

{
  "data": [
    {
      "id": "76688182",
      "media_type": "audio",
      "added_time": "2016-08-18T18:52:59-04:00"
    },
    {
      "id": "40005859",
      "media_type": "audio",
      "added_time": "2016-08-18T18:52:59-04:00"
    }
  ],
  "page": 1,
  "per_page": 100,
  "total_count": 2
}

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 Collection not found 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.deleteTrackCollectionItems(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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock audio delete-track-collection-items 48433119 --item-id 36345523

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

item_id

[string]

One or more item IDs to remove from the collection

Accepted authentication

Responses

Status Meaning Description Schema
204 No Content Successfully removed collection items None
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Collection not found None

Editorial Images

Search editorial images

curl -X GET "https://api.shutterstock.com/v2/editorial/images/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.editorialImagesSearch(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/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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock editorial search-editorial-images --country USA --sort newest --query football --date-start 2018-10-23

GET /v2/editorial/images/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
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

category

string

Show editorial content within a certain editorial category; specify by category name

cursor

string

The cursor of the page with which to start fetching results; this cursor is returned from previous requests

date_end

string

Show only editorial content generated on or before a specific date
Format: YYYY-MM-DD
Example: 2020-05-29

date_start

string

Show only editorial content generated on or after 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

query

string

One or more search terms separated by spaces

sort

string

Sort by
Valid values: relevant, newest, oldest
Default: relevant

supplier_code

[string]

Show only editorial content from certain suppliers

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,
      "special_instructions": "MINIMUM FEE $250 per image.",
      "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 updated content

curl -X GET "https://api.shutterstock.com/v2/editorial/images/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/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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock editorial get-updated-editorial-images --type edit --country USA --date-updated-start 2020-02-02T13:00:00Z --date-updated-end 2020-02-02T15:00:00Z

GET /v2/editorial/images/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
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

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

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

cursor

string

The cursor of the page with which to start fetching results; this cursor is returned from previous requests

date_taken_end

string

Show images that were taken before the specified date

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

per_page

integer

Number of results per page
Minimum: 100, Maximum: 500, Default: 500

sort

string

Sort by
Valid values: newest, oldest
Default: newest

supplier_code

[string]

Show only editorial content from certain suppliers

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,
      "special_instructions": "Minimum price 50 EUR",
      "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

Categories

List editorial categories


curl -X GET "https://api.shutterstock.com/v2/editorial/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 editorialImagesApi = new sstk.EditorialImagesApi();

editorialImagesApi.listEditorialImageCategories()
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock editorial list-editorial-image-categories 

GET /v2/editorial/images/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 EditorialImageCategoryResults
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None

Details

Get editorial content details


curl -X GET "https://api.shutterstock.com/v2/editorial/images/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 editorialImagesApi = new sstk.EditorialImagesApi();

const queryParams = {
  "country": "USA"
};

editorialImagesApi.getEditorialImage("9926131a", queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "country" => "USA"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/images/9926131a?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock editorial get-editorial-image 9926131a --country USA

GET /v2/editorial/images/{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
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

id
(Required)

string

Editorial ID

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,
  "special_instructions": "MINIMUM FEE $250 per image.",
  "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
404 Not Found Not Found None

Licenses and downloads

List editorial image licenses


curl -X GET "https://api.shutterstock.com/v2/editorial/images/licenses" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "image_id=12345678" \
--data-urlencode "license=premier_editorial_all_digital" \
--data-urlencode "username=aUniqueUsername" \
--data-urlencode "start_date=2021-03-29T13:25:13.521Z" \
--data-urlencode "end_date=2021-03-29T13:25:13.521Z"
const sstk = require("shutterstock-api");

sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const editorialImagesApi = new sstk.EditorialImagesApi();

const queryParams = {
  "image_id": "12345678",
  "license": "premier_editorial_all_digital",
  "username": "aUniqueUsername",
  "start_date": "2021-03-29T13:25:13.521Z",
  "end_date": "2021-03-29T13:25:13.521Z"
};

editorialImagesApi.getEditorialImageLicenseList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });
$queryFields = [
  "image_id" => "12345678",
  "license" => "premier_editorial_all_digital",
  "username" => "aUniqueUsername",
  "start_date" => "2021-03-29T13:25:13.521Z",
  "end_date" => "2021-03-29T13:25:13.521Z"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/images/licenses?" . 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);
export SHUTTERSTOCK_API_TOKEN="v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a"

shutterstock editorial get-editorial-image-license-list --image-id 12345678 --license premier_editorial_all_digital --username aUniqueUsername --start-date 2021-03-29T13:25:13.521Z --end-date 2021-03-29T13:25:13.521Z

GET /v2/editorial/images/licenses Try it out

This endpoint lists existing editorial image licenses.

Parameters

Parameter Type Description
end_date

string

Show licenses created before the specified date
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

image_id

string

Show licenses for the specified editorial image ID

license

string

Show editorial images that are available with the specified license name

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

start_date

string

Show licenses created on or after the specified date
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2020-05-29T12:10:22-05:00

username

string

Filter licenses by username of licensee

Accepted authentication