
Overview
The Shutterstock API provides access to Shutterstock's library of media, as well as information about customers' accounts and the contributors that provide the media. It allows customer platforms to search for media, view information and previews for the media, and license and download media.
This documentation provides information about each endpoint in the API. The right-hand pane of this page shows example requests and responses for each endpoint in cURL, Node.js/JavaScript, and PHP. The PHP examples requires PHP 5.4 or greater, plus the curl and json modules.
You can also load a collection of the endpoints into the REST API client Postman by clicking this button:
For FAQs about the API, see Frequently asked questions.
Getting started
Follow these steps to start licensing media:
- Create an application. To license media, you also need a paid subscription, but the API provides a free option for you to try out the API without licensing media. For information about applications and subscriptions, see Subscriptions.
- 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.
- Use the
GET /v2/user/subscriptions
endpoint to get your subscription ID. - Use the licensing endpoint for the media type to license media, such as the
POST /v2/images/licenses
endpoint for images.
Examples
This API reference includes examples in several programming languages.
Most of the examples assume that your OAuth token is in the SHUTTERSTOCK_API_TOKEN
environment variable.
Examples for cURL
The cURL examples work on the command line of many operating systems, including Windows, MacOS, and Linux, though you may need to install the cURL program.
Examples for JavaScript and Node.JS
The examples for JavaScript and Node.JS use the Shutterstock JavaScript SDK.
To install the SDK, run yarn add shutterstock-api
or npm install shutterstock-api --save
from the command line.
As an alternative to using the SDK, you can make requests with any JavaScript HTTPS request library.
Regardless of which library you use, you must ensure that your request includes the user-agent
header.
Some libraries include this header automatically and others do not.
Examples for PHP
The PHP examples require the curl
and json
PHP modules.
Basic requests
Basic request: searching for images
curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=hiking" \
--data-urlencode "image_type=photo" \
--data-urlencode "orientation=vertical" \
--data-urlencode "people_number=3"
$queryFields = [
"query" => "hiking",
"image_type" => "photo",
"orientation" => "vertical",
"people_number" => 3
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"query": "hiking",
"image_type": "photo",
"orientation": "vertical",
"people_number": 3
};
imagesApi.searchImages(queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
After you have authenticated to the API, you can send requests to the API using any programming language or program that can send HTTP requests.
The base URL for all endpoints is https://api.shutterstock.com
.
For examples, see the right-hand pane.
Languages
Get the list of image categories in Spanish
curl -X GET "https://api.shutterstock.com/v2/images/categories" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "language=es"
$queryFields = [
"language" => "es"
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/categories?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"language": "es"
};
imagesApi.getImageCategories(queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
Example response
[
{"id":"26","name":"Abstractos"},
{"id":"1","name":"Animales/ Naturaleza"},
{"id":"11","name":"Las Artes"},
{"id":"3","name":"Fondos/Texturas"},
{"id":"27","name":"Belleza/Moda"},
{"id":"2","name":"Edificios/Lugares Famosos"},
{"id":"4","name":"Negocios/Finanzas"},
{"id":"5","name":"Educación"}
]
Some endpoints can accept or return data in multiple languages.
For example, the GET /v2/images/search
and GET /v2/videos/search
endpoints can accept search terms in languages other then English, and they return metadata properties such as categories and keywords in the specified language.
Other endpoints such as the GET /v2/images/{id}
and GET /v2/videos/{id}
endpoints can return metadata properties such as categories and keywords in languages other than English.
Not all response data is translated, and not all endpoints support languages other than English.
To search or return data in a language other than English, pass the language code (such as fr
or zh-Hant
) in the language
query parameter or the Accept-Language
header, as in the example in the right-hand pane.
For examples of searching in different languages, see Localizing searches.
For the list of languages that the API accepts, see the Language schema.
Responses
Example search response
{
"page": 1,
"per_page": 1,
"total_count": 1070,
"search_id": "rTBCE8T2weANh6pK85Fdvw",
"data": [
{
"id": "1105302317",
"aspect": 0.6667,
"assets": {
"preview": {
"height": 450,
"url": "https://image.shutterstock.com/display_pic_with_logo/3265442/1105302317/stock-photo-a-woman-with-children-goes-hiking-the-woman-took-her-sons-by-the-arms-the-family-goes-on-a-dirt-1105302317.jpg",
"width": 300
},
"small_thumb": {
"height": 100,
"url": "https://thumb7.shutterstock.com/thumb_small/3265442/1105302317/stock-photo-a-woman-with-children-goes-hiking-the-woman-took-her-sons-by-the-arms-the-family-goes-on-a-dirt-1105302317.jpg",
"width": 67
},
"large_thumb": {
"height": 150,
"url": "https://thumb7.shutterstock.com/thumb_large/3265442/1105302317/stock-photo-a-woman-with-children-goes-hiking-the-woman-took-her-sons-by-the-arms-the-family-goes-on-a-dirt-1105302317.jpg",
"width": 100
},
"huge_thumb": {
"height": 260,
"url": "https://image.shutterstock.com/image-photo/woman-children-goes-hiking-took-260nw-1105302317.jpg",
"width": 173
},
"preview_1000": {
"url": "https://ak.picdn.net/shutterstock/photos/1105302317/watermark_1000/af3ff3de71d94d7739337e0c35debfb3/preview_1000-1105302317.jpg",
"width": 667,
"height": 1000
},
"preview_1500": {
"url": "https://image.shutterstock.com/z/stock-photo-a-woman-with-children-goes-hiking-the-woman-took-her-sons-by-the-arms-the-family-goes-on-a-dirt-1105302317.jpg",
"width": 1000,
"height": 1500
}
},
"contributor": {
"id": "3265442"
},
"description": "A woman with children goes hiking. The woman took her sons by the arms. The family goes on a dirt road. The boy walks with his brother and mother in the forest. Hike with backpacks. Fisheye lens",
"image_type": "photo",
"media_type": "image"
}
],
"spellcheck_info": {}
}
Successful requests return a 200, 201, or 204 response code. For error responses, see Errors.
Some endpoints return information in JSON format.
In most cases, the metadata is in the root fields of the JSON data, and the data about the media is in a data
field.
Most programming languages have libraries that can accept and manipulate JSON data.
Some API subscriptions return a limited set of results. See Subscriptions.
Paging responses
Paging search results
curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=giraffes" \
--data-urlencode "page=2" \
--data-urlencode "per_page=5"
$queryFields = [
"query" => "giraffes",
"page" => 2,
"per_page" => 5
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"query": "giraffes",
"page": 2,
"per_page": 5
};
imagesApi.searchImages(queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
Many endpoints, including search endpoints, split long response data into multiple pages with the page
and per_page
parameters.
For example, if a search result has 20 pieces of media, you can retrieve items 6-10 by using page=2
and per_page=5
in the request, as shown in the examples in the right-hand pane.
You can show up to 500 results per page for most requests.
Some endpoints have different limits; see the description of the per_page
parameter for the individual endpoints.
Sorting results
Sorting search results
curl -X GET "https://api.shutterstock.com/v2/videos/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=boats" \
--data-urlencode "sort=popular"
curl -X GET "https://api.shutterstock.com/v2/audio/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "instruments=Piano" \
--data-urlencode "duration_from=300"
--data-urlencode "sort=bpm" \
--data-urlencode "sort_order=desc"
$videoQueryFields = [
"query" => "boats",
"sort" => "popular"
];
$videoOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/search?" . http_build_query($videoQueryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$videoHandle = curl_init();
curl_setopt_array($videoHandle, $videoOptions);
$videoResponse = curl_exec($videoHandle);
curl_close($videoHandle);
$videoDecodedResponse = json_decode($videoResponse);
print_r($videoDecodedResponse);
$audioQueryFields = [
"query" => "Piano",
"duration_from" => 300,
"sort" => "bpm",
"sort_order" => "desc"
];
$audioOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/search?" . http_build_query($audioQueryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$audioHandle = curl_init();
curl_setopt_array($audioHandle, $audioOptions);
$audioResponse = curl_exec($audioHandle);
curl_close($audioHandle);
$audioDecodedResponse = json_decode($audioResponse);
print_r($audioDecodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const videoQueryParams = {
"query": "boats",
"sort": "popular"
};
videosApi.searchVideos(videoQueryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
const audioApi = new sstk.AudioApi();
const audioQueryParams = {
"query": "Piano",
"duration_from": 300,
"sort": "bpm",
"sort_order": "desc"
};
audioApi.searchAudio(audioQueryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
The sort
parameter controls how results are ordered.
By default, image and video searches return the most popular media first.
Audio searches without the sort
parameter return tracks based on the popularity of that track in the location of the request.
The image and video search endpoints can order results in the following ways:
- "newest": Sort by when the image or video was added.
- "popular": Sort by the popularity of the image or video, returning images or videos that are often downloaded as a result of searches with similar keywords.
- "random": Return the search results in random order. Random searches are limited to 20 results per page.
- "relevance": Sort by how well the result matches the keywords. Relevance also takes into account the age of the media and the popularity of the media.
The audio search endpoint can sort results in the following ways:
- "artist": Sort by the artist name.
- "bpm": Sort by beats per minute.
- "duration": Sort by the length of the track.
- "freshness": Sort by when the track was added.
- "ranking_all": Sort by aggregated factors including popularity, keywords, and views.
- "score": Sort by the relevancy score based on the search query.
- "title": Sort alphabetically by title.
For audio only, you can use the sort_order
parameter to return results in ascending ("asc") or descending ("desc", the default) order.
Full view and minimal view
Showing full detail in the results
curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=airplane" \
--data-urlencode "view=full"
$queryFields = [
"query" => "airplane",
"view" => "full"
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"query": "airplane",
"view": "full"
};
imagesApi.searchImages(queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
The view
parameter on some search and informational endpoints controls how much detail is shown in the response.
By default (view=minimal
), the response includes a moderate amount of detail about each search result, but if you set the view
parameter to full
, the response includes complete information about each result.
For example, full image results include the full list of keywords and categories that apply to each image.
For examples of the results, see Results.
Showing only specific fields
Image search with
fields
parameter
curl -X GET "https://api.shutterstock.com/v2/images/search" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=dolphins" \
--data-urlencode "fields=data(id,assets/preview/url)"
$queryFields = [
"query" => "kites",
"fields" => "data(id,assets/preview/url)"
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const axios = require("axios");
axios.get("https://api.shutterstock.com/v2/images/search", {
"params": {
"query": "kites",
"fields": "data(id,assets/preview/url)"
},
"headers": {
"Authorization": `Bearer ${process.env.SHUTTERSTOCK_API_TOKEN}`,
"User-Agent": "request"
}
})
.then(({ data }) => {
console.log(JSON.stringify(data.data, null, 2));
})
.catch((error) => {
console.error(error);
});
Example response
{
"data": [
{
"id": "547308685",
"assets": {
"preview": {
"url": "https://image.shutterstock.com/display_pic_with_logo/567127/547308685/stock-photo-dolphin-547308685.jpg"
}
}
},
{
"id": "794200186",
"assets": {
"preview": {
"url": "https://image.shutterstock.com/display_pic_with_logo/1758188/794200186/stock-vector-silhouettes-of-dolphins-set-vector-illustration-794200186.jpg"
}
}
},
{
"id": "388057081",
"assets": {
"preview": {
"url": "https://image.shutterstock.com/display_pic_with_logo/324673/388057081/stock-photo-three-beautiful-dolphins-jumping-over-breaking-waves-hawaii-pacific-ocean-wildlife-scenery-marine-388057081.jpg"
}
}
}
]
}
You can limit the information shown further with the fields
parameter.
You pass one or more fields and the API returns only those fields.
The examples in the right pane perform an image search and return only the ID of the image and a link to a preview image.
The value of the fields
parameter specifies fields in the same way that Google supports it across many of their APIs.
For more information, see Partial responses in the Google API documentation.
To specify the fields to return, use slashes to indicate the position of the field in the hierarchy of the normal JSON response.
For example, the value data(id,assets/preview/url)
returns the data.id
field and the data.assets.preview.url
field.
The JavaScript SDK does not support the fields
parameter, so you must use an HTTP request library as in the example in the right-hand column.
Errors
The API returns error codes such as 400, 403, 404, and 500 along with information about the error. Here are some common error responses:
{
"message": "Validation failed",
"errors": [
{
"code": "VALIDATION_OBJECT_REQUIRED",
"message": "Missing required property: name",
"path": "$.body.name"
}
]
}
A 400 Bad Request
response often means that the request body is improperly formatted or missing required fields.
In the case of missing fields, the response includes the name of the field that is missing, as in the example in the right-hand column.
A 401 Unauthorized
response often means that the request did not include a valid OAuth token or basic authentication credentials.
See Authentication.
A 403 Forbidden
response can mean that the token in the request does not contain the scopes that the endpoint requires.
A 404 Not Found
response can mean that the media, license, or collection you are trying to access does not exist.
A 500 Internal Server Error
response means that an error happened on the server.
This can mean that the request is not valid, such as if you try to delete or edit a collection that does not exist, or if the API otherwise can't do what you requested.
It can also mean a temporary problem with the API.
Check your request and try again or contact us.
Licensing errors
Licensing error response
{
"data": [
{
"image_id": "14204581221111111",
"error": "Media unavailable"
}
],
"errors": [
{
"message": "Failed to license 1 image",
"items": [
{
"image_id": "14204581221111111",
"index": 0
}
]
}
]
}
The licensing endpoints return the same errors as other endpoints for authentication problems, such as if the token is not valid.
For other problems, such as if the requested media is not found, the licensing endpoints return a 200 OK
response and an error message in the response body.
For example, if you try to license an image but provide an invalid image ID, the response body includes the message "Media unavailable," as in the example in the right-hand column.
Rate limits
Depending on the subscription type, some applications are limited to a certain number of API requests per minute. If your application exceeds its limit, the API returns an error response with a status code of 429. To request a higher rate limit, contact us.
Subscriptions
To access the API, you need an API application and an API subscription or free account. To get started, see the API subscription page.
These API subscriptions are separate from the subscriptions that are available on the Shutterstock web site, so be sure to get an API subscription if you want to work with the API. See https://www.shutterstock.com/api/pricing.
You can use an API subscription to license and download media only with the API; API subscriptions don't work on the Shutterstock web site. If you have a subscription that does not include API access and want to use it with the API, contact us.
To test your subscription, see Licensing sandbox.
This table summarizes what you can do with each type of API subscription. For specifics about your subscription, refer to your account.
Capability | No API subscription | Standard API subscription | Business API subscription |
---|---|---|---|
Image library | Limited library | Expanded library | Complete Shutterstock library |
Maximum API requests per minute | Limited | Limited | Custom |
Number of search results | Limited | Limited | Unlimited |
License and download images | No | One at a time | Many at a time |
View image, video, and track details | Yes | Yes | Yes |
Create collections | Yes | Yes | Yes |
Access unwatermarked images | No | Yes | Yes |
Use reverse image search and similar image search | No | No | Yes |
Embed Shutterstock Editor | No | No | Yes |
If your subscription provides access to the limited media library, all requests that you make to the API provide results only from that limited library, including search, details, and licensing requests. For this reason, you might see different media by searching on the API versus searching on shutterstock.com. Before trying to license media, make sure that you can access it through the API with your API subscription.
To get your subscription ID, use the GET /v2/user/subscriptions
endpoint.
If you have issues with API access, Contact us.
Applications
To access the REST API you need an application, which represents the application, program, or computer commands that are accessing the API. To use the API, you need the application's consumer key and consumer secret, which are shown on the https://www.shutterstock.com/account/developers/apps page.
When you have the application's consumer key and consumer secret, you can use them to access the API directly or to request a token that you can use to access the API. For more information on these methods of authentication, see Authentication.
To create an application:
- Log in at shutterstock.com, go to your account page, and and click Developers.
- On the Developers page, click Create new app.
- 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.
-
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.
-
- Click Save.
The new application appears on the My apps page. Each application has a consumer key and a consumer secret. You use this consumer key and consumer secret either to use the API directly with basic authentication or to request a token for OAuth authentication; see Authentication. Do not share your key and secret, because they can be used to access your account through the API.
Products
Each application has access to one or more API products. These products control the level of access that the application has to the API and the Shutterstock media library. These products are separate from the subscriptions that control how many assets you can license and download.
If you create an application without buying an API subscription first, the application uses the free API product, which is labeled as the "Self Serve" product. Applications that use this free API product can search and view media but not license or download media. If you have a paid API subscription, your applications use an API product with additional access to license and download media, within the limitations of the subscription. Other products include access to computer vision and editorial endpoints.
To tell which API products your application is using, open your applications, expand your application, and go to its Details tab.
Authentication
All endpoints in the Shutterstock API require authentication. The API accepts HTTP basic authentication for some endpoints and OAuth authentication for all endpoints.
All requests must also specify a User-Agent
header.
The value of this header should either be the type of client, such as "NodeJS" or "Python," or the name of the customer's application.
Before you authenticate to the API, you need an API subscription and an API application. See Subscriptions.
Basic authentication
The API accepts HTTP basic authentication (also known as basic authentication) for some endpoints that do not access specific customer information. Follow these steps to use basic authentication:
curl -X GET --user 123abc456def:1a2b3c4d \
https://api.shutterstock.com/v2/images/search \
-G \
--data-urlencode "query=sunrise"
$queryFields = [
"query" => "sunrise"
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
CURLOPT_USERPWD => "123abc456def:1a2b3c4d",
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
const applicationClientId = "123abc456def";
const applicationClientSecret = "1a2b3c4d";
sstk.setBasicAuth(applicationClientId, applicationClientSecret);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"query": "kites",
"image_type": "photo",
"page": 1,
"per_page": 5,
"sort": "popular",
"view": "minimal"
};
imagesApi.searchImages(queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
- Create an account at https://www.shutterstock.com if you don't already have one.
- Set up an application at https://developers.shutterstock.com/user/me/apps and get the consumer key and consumer secret from the application.
- 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:
- Create an account at https://www.shutterstock.com if you don't already have one.
- Set up an application at https://www.shutterstock.com/account/developers/apps.
- On the application details page, under Token, click Generate token.
- 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.
- Click Continue.
- 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"
$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);
});
-
Create an account at https://www.shutterstock.com if you don't already have one.
-
Set up an application at https://developers.shutterstock.com and get the consumer key and consumer secret from the application.
-
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. -
Pass your consumer key to the
GET /v2/oauth/authorize
endpoint to get a temporary authentication code. See the right-hand pane for an example.Use these parameters:
client_id
: The consumer key from your application on https://developers.shutterstock.com.redirect_uri
: The callback URI for your application. This callback URI must use a host name that you set up in your application. (Again, for testing purposes, you can use "localhost," as inhttp://localhost:3000/callback
.)response_type
: Specifycode
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
-
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:
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. -
Finally, authenticate to the API and get an access token. To request a token that does not expire, specify
expires=false
or omit theexpires
parameter. To request a token that expires after one hour and then can be refreshed, specifyexpires=true
.
Use the authentication code to get a token
curl -X POST "https://api.shutterstock.com/v2/oauth/access_token" \
--data-urlencode "client_id=$CLIENT_ID" \
--data-urlencode "client_secret=$CLIENT_SECRET" \
--data-urlencode "grant_type=authorization_code" \
--data-urlencode "expires=false" \
--data-urlencode "code=$CODE"
$body = [
"client_id" => $clientId,
"client_secret" => $clientSecret,
"grant_type" => "authorization_code",
"expires" => false,
"code" => $code
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/oauth/access_token",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const axios = require("axios");
const body = {
"client_id": clientId,
"client_secret": clientSecret,
"grant_type": "authorization_code",
"expires": false,
"code": code
};
axios.post("https://api.shutterstock.com/v2/oauth/access_token", body)
.then((res) => {
console.log(res);
});
Use the POST /v2/oauth/access_token
endpoint, as in the example in the right-hand pane.
The parameters for this endpoint include the application's consumer key, consumer secret, and the code you got from the URL in the previous step.
This endpoint returns the access token in a JSON response.
If you requested a token that does not expire, the API returns an access token that starts with v2/
, as in this example:
{"access_token":"v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a","token_type":"Bearer"}
If you requested a token that expires, the API returns an access token that starts with 1/
and a refresh token, as in this example.
You will need the refresh token to refresh the access token later.
{"access_token":"1/eyJjbGllbnRfaWQiOiJjNDc4Yi0yNjYzMC1","expires_in":3600,"token_type":"Bearer","user_token":"eyJhbGciOiTtcXy71dhyfjBVU","refresh_token":"3/d_0F6_AmGRO5a7NNhjdCwobDudbdvDNdPQTWV1IovpWPgWy"}
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);
});
Now you can use the token to access the API by passing it as an authorization header, as in the example of searching for images to the right.
Further examples in this documentation assume that you put the token in the SHUTTERSTOCK_API_TOKEN
environment variable, but you can also store the token in a variable in your code. Specifically, the cURL and Node.js examples are designed to use the environment variable and PHP assumes that the token is in the code.
Keep this token private, because other people could use it to access the account's subscriptions and media.
You can use the same application to get tokens for any number of users.
Just repeat the request to the GET /v2/oauth/authorize
endpoint with the application information and then sign in as a different user.
Each token is tied to the user's account.
For more information about these endpoints, see OAuth.
Refreshing tokens
Refreshing a token
curl -X POST "https://api.shutterstock.com/v2/oauth/access_token" \
--data-urlencode "client_id=$CLIENT_ID" \
--data-urlencode "client_secret=$CLIENT_SECRET"
--data-urlencode "grant_type=refresh_token" \
--data-urlencode "refresh_token=$REFRESH_TOKEN" \
$body = [
"client_id" => $clientId,
"client_secret" => $clientSecret,
"grant_type" => "refresh_token",
"refresh_token" => $refreshToken
];
$encodedBody = http_build_query($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/oauth/access_token",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const axios = require("axios");
const body = {
"client_id": clientId,
"client_secret": clientSecret,
"grant_type": "refresh_token",
"refresh_token": refreshToken,
};
axios.post("https://api.shutterstock.com/v2/oauth/access_token", body)
.then((res) => {
console.log(res);
})
.catch((err) => {
console.error(err);
});
If you requested a token with the parameter expires=true
, the token begins with "1/", and it expires in one hour.
You can refresh the token to continue using it.
If you requested a token that does not expire, the token does not need to be refreshed. This type of token is valid until the user account that is associated with the token changes its password 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:
refresh_token
: The refresh token from the initial request to thePOST /v2/oauth/access_token
endpoint.grant_type
: Specify "refresh_token" to refresh the token.client_id
: The consumer key from your application on https://developers.shutterstock.com.client_secret
: The consumer secret from your application. You must pass either this field or theuser_id
field.user_id
: The ID uf the user account that is associated with the token. You must pass either this field or theclient_secret
field. As long as the current token is active, you can retrieve the user ID from theGET /v2/user
endpoint.
The response includes the existing refresh token and a new token that is valid for one hour.
OAuth scopes
Most endpoints require an access token with one or more scopes, or permissions. You can see the scopes that an individual endpoint requires in the endpoint reference.
The following table shows the available scopes.
Scope | Description |
---|---|
No scope | Grants the user.view scope by default |
collections.edit |
Grants the ability to create collections, edit collections, and modify the contents of collections |
collections.view |
Grants read-only access to collections and their contents |
licenses.create |
Grants the ability to download and license media on behalf of the user |
licenses.view |
Grants read-only access to a user's licenses |
purchases.view |
Grants read-only access to a user's purchase history |
user.view |
Grants read-only access to a user's basic account information (including the user name, id, and first and last name) |
Searching for media
Simple image keyword search
curl -X GET "https://api.shutterstock.com/v2/images/search" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=kites"
$queryFields = [
"query" => "kites"
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"query": "kites"
};
imagesApi.searchImages(queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
Simple video keyword search
curl -X GET "https://api.shutterstock.com/v2/videos/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=hot air balloon"
$queryFields = [
"query" => "hot air balloon"
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/search?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const queryParams = {
"query": "hot air balloon"
};
videosApi.searchVideos(queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
Simple audio keyword search
curl -X GET "https://api.shutterstock.com/v2/audio/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=bluegrass"
$queryFields = [
"query" => "bluegrass"
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/search?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const queryParams = {
"query": "bluegrass"
};
audioApi.searchAudio(queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
To search with a keyword, pass the search keywords to the appropriate endpoint:
- Images:
GET https://api.shutterstock.com/v2/images/search
- Video:
GET https://api.shutterstock.com/v2/videos/search
- Audio:
GET https://api.shutterstock.com/v2/audio/search
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"
$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.
- AND is added implicitly between each search keyword.
Therefore, searching for
dog AND cat
is equivalent to searching fordog cat
. - OR searches for results that include any of the specified keywords, such as
dog OR cat OR mouse
. - NOT searches exclude keywords from search results, such as
dog NOT hot dog
. You can also use NOT in thecontributor
search field.
You can group conditional search terms with parentheses.
For example, to search for images with either dogs or cats, but not both, use (dog NOT cat) OR (cat NOT dog)
.
Sorting results
Sorting search results
curl -X GET "https://api.shutterstock.com/v2/videos/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=boats" \
--data-urlencode "sort=popular"
curl -X GET "https://api.shutterstock.com/v2/audio/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "instruments=Piano" \
--data-urlencode "duration_from=300"
--data-urlencode "sort=bpm" \
--data-urlencode "sort_order=desc"
$videoQueryFields = [
"query" => "boats",
"sort" => "popular"
];
$videoOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/vidoes/search?" . http_build_query($videoQueryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$videoHandle = curl_init();
curl_setopt_array($videoHandle, $videoOptions);
$videoResponse = curl_exec($videoHandle);
curl_close($videoHandle);
$videoDecodedResponse = json_decode($videoResponse);
print_r($videoDecodedResponse);
$audioQueryFields = [
"query" => "Piano",
"duration_from" => 300,
"sort" => "bpm",
"sort_order" => "desc"
];
$audioOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/search?" . http_build_query($audioQueryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$audioHandle = curl_init();
curl_setopt_array($audioHandle, $audioOptions);
$audioResponse = curl_exec($audioHandle);
curl_close($audioHandle);
$audioDecodedResponse = json_decode($audioResponse);
print_r($audioDecodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videoApi = new sstk.VideosApi();
const videoQueryParams = {
"query": "boats",
"sort": "popular"
};
videoApi.searchVideos(videoQueryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
const audioApi = new sstk.AudioApi();
const audioQueryParams = {
"query": "Piano",
"duration_from": 300,
"sort": "bpm",
"sort_order": "desc"
};
audioApi.searchAudio(audioQueryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
The sort
parameter controls how results are ordered.
By default, image and video searches return the most popular media first.
Audio searches without the sort
parameter return tracks based on the popularity of that track in the location of the request.
The image and video search endpoints can order results in the following ways:
- "newest": Sort by when the image was added.
- "popular": Sort by the popularity of the image or video, returning images or videos that are often downloaded as a result of searches with similar keywords.
- "random": Return the search results in random order.
- "relevance": Sort by how well the result matches the keywords. Relevance also takes into account the age of the media and the popularity of the media.
The audio search endpoint can sort results in the following ways:
- "artist": Sort by the artist name.
- "bpm": Sort by beats per minute.
- "duration": Sort by the length of the track.
- "freshness": Sort by when the track was added.
- "ranking_all": Sort by aggregated factors including popularity, keywords, and views.
- "score": Sort by the relevancy score based on the search query.
- "title": Sort alphabetically by title.
For audio only, you can use the sort_order
parameter return results in ascending ("asc") or descending ("desc," the default) order.
Localizing searches
You can localize searches and their results by setting the language or region for the search.
Search languages
Searching in other languages
curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=chien" \
--data-urlencode "language=fr" \
--data-urlencode "region=fr"
curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=perro" \
--data-urlencode "language=es" \
--data-urlencode "region=es"
$frenchQueryFields = [
"query" => "chien",
"language" => "fr",
"region" => "fr"
];
$frenchOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($frenchQueryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$frenchHandle = curl_init();
curl_setopt_array($frenchHandle, $frenchOptions);
$frenchResponse = curl_exec($frenchHandle);
curl_close($frenchHandle);
$frenchDecodedResponse = json_decode($frenchResponse);
print_r($frenchDecodedResponse);
$spanishQueryFields = [
"query" => "perro",
"language" => "es",
"region" => "es"
];
$spanishOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($spanishQueryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$spanishHandle = curl_init();
curl_setopt_array($spanishHandle, $spanishOptions);
$spanishResponse = curl_exec($spanishHandle);
curl_close($spanishHandle);
$spanishDecodedResponse = json_decode($spanishResponse);
print_r($spanishDecodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParamsFR = {
"query": "chien",
"language": "fr",
"region": "fr"
};
imagesApi.searchImages(queryParamsFR)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
const queryParamsES = {
"query": "perro",
"language": "es",
"region": "es"
};
imagesApi.searchImages(queryParamsES)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
You can provide search keywords in languages other than English by specifying the language code (such as fr
or zh-Hant
) in the language
query parameter or the Accept-Language
header.
If you set this parameter or header, you can also pass category names in that language.
The response includes categories and keywords in that language.
For the list of languages that the API accepts, see the Language schema.
Geo-ranking results
You can customize image search results based on location with the region
parameter.
This parameter accepts 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.
Search parameters
Searching with parameters
curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=earthquake" \
--data-urlencode "sort=newest" \
--data-urlencode "image_type=photo"
curl -X GET "https://api.shutterstock.com/v2/images/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "sort=popular" \
--data-urlencode "category=Holidays"
$newestQueryFields = [
"query" => "earthquake",
"sort" => "newest",
"image_type" => "photo"
];
$newestOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($newestQueryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$newestHandle = curl_init();
curl_setopt_array($newestHandle, $newestOptions);
$newestResponse = curl_exec($newestHandle);
curl_close($newestHandle);
$newestDecodedResponse = json_decode($newestResponse);
print_r($newestDecodedResponse);
$popularQueryFields = [
"sort" => "popular",
"category" => "Holidays"
];
$popularOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($popularQueryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$popularHandle = curl_init();
curl_setopt_array($popularHandle, $popularOptions);
$popularResponse = curl_exec($popularHandle);
curl_close($popularHandle);
$popularDecodedResponse = json_decode($popularResponse);
print_r($popularDecodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams1 = {
"query": "earthquake",
"sort": "newest",
"image_type": "photo"
};
api.searchImages(queryParams1)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
const queryParams2 = {
"sort": "popular",
"category": "Holidays"
};
imagesApi.searchImages(queryParams2)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
Using parameters multiple times
curl -X GET "https://api.shutterstock.com/v2/audio/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "instrument=Trumpet" \
--data-urlencode "instrument=Drums"
$query = "instrument=Trumpet&instrument=Drums";
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/search?$query",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const queryParams = {
"instrument": ["Trumpet", "Drums"]
};
audioApi.searchAudio(queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
Aside from the keywords in the query
field, search requests can include many other search fields.
Some parameters can accept more than one value. In this case, you can specify the same parameter more than one time, as in the examples in the right-hand pane.
For a complete list of these search parameters, see the API documentation for the search endpoints:
Aspect ratios
To search for images by aspect ratio, specify the ratio as a positive decimal of the width divided by the height.
For example, to search for images with a 4:3 aspect ratio, set the aspect_ratio
parameter to 1.3333.
The search endpoints calculate aspect ratio to four decimal places and return only images that exactly match this decimal aspect ratio.
Images with a higher aspect ratio are wider and images with a lower aspect ratio are narrower. Images with a landscape orientation have aspect ratios greater than 1 and images with a portrait orientation have aspect ratios less than or equal to 1, such as 0.75 for an image with a 3:4 aspect ratio.
Images do not always exactly match a standard ratio.
Because of a difference of a few pixels, images that have a ratio of approximately 3:2 can have decimal aspect ratios of 1.4998, 1.5, or 1.5001.
To search for images that have an aspect ratio of approximately 1.5, set the aspect_ratio_max
parameter to 1.5005 and the aspect_ratio_min
parameter to 1.4995.
To search for videos by aspect ratio, set the aspect_ratio
parameter to a preset value such as 4_3
or 16_9
.
The search returns videos that have approximately that aspect ratio.
Sub-parameters
Searching with sub-parameters
curl -X GET "https://api.shutterstock.com/v2/audio/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "genres=Blues > Chicago"
$query = "genres=Blues > Chicago";
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/search?$query",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const queryParams = {
"genres": ["Blues > Chicago"]
};
audioApi.searchAudio(queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
The audio search parameters genre
and moods
have main genres and moods and sub-genres and sub-moods.
For example, you can use the search parameter genre=Blues
for all blues tracks, or you can use the parameter genre=Blues > Chicago
for Chicago-style blues tracks.
Similarly, you can use the parameter moods=Wedding
for all wedding tracks, or you can specify the parameters moods=Wedding > Classical
or moods=Wedding > Modern
for classical or modern wedding tracks.
Computer vision search
Upload base 64-encoded reference image and get similar images
RESPONSE=$(curl -X POST 'https://api.shutterstock.com/v2/cv/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}")
echo "The next step requires the jq program."
UPLOAD_ID=$(jq -r .upload_id <<< $RESPONSE)
curl -X GET https://api.shutterstock.com/v2/cv/similar/images \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "asset_type=images" \
--data-urlencode "asset_id=$UPLOAD_ID"
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);
$uploadBody = [
"base64_image" => $encodedImageData
];
$uploadEncodedBody = json_encode($uploadBody);
$uploadOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/cv/images",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $uploadEncodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $uploadOptions);
$uploadResponse = curl_exec($handle);
curl_close($handle);
$uploadDecodedResponse = json_decode($uploadResponse);
print_r($uploadDecodedResponse->upload_id);
$similarQuery = [
"asset_type" => "images",
"asset_id" => $uploadDecodedResponse->upload_id,
];
$similarOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/cv/similar/images?" . http_build_query($similarQuery),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $similarOptions);
$similarResponse = curl_exec($handle);
curl_close($handle);
print_r($similarResponse);
const sstk = require("shutterstock-api");
const fs = require("fs");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const computerVisionApi = new sstk.ComputerVisionApi();
const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");
const body = new sstk.ImageCreateRequest(base64File);
computerVisionApi.uploadImage(body)
.then((data) => {
console.log(data.upload_id);
return computerVisionApi.getSimilarImages(data.upload_id);
})
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
Computer vision provides images and videos that are similar to a reference image that you supply.
To upload an image for reverse image and video search or keyword suggestions with computer vision, use the POST /v2/cv/images
endpoint.
Then, use the upload ID that this endpoint returns to get similar images or videos from the GET /v2/cv/similar/images
or GET /v2/cv/similar/videos
endpoints.
The API returns up to 200 images or videos that appear visually similar to your image.
Images must be in JPG or PNG format.
They can be no larger than 10mb and can be no larger than 10,000 pixels in width or height.
Some operating systems have a limit on the size of the parameters that you can send in a command-line request, such as with the curl
program. If you see an error such as "Argument list too long," send a smaller image or make the request with a programming language such as PHP or Node.JS.
To use the computer vision endpoints, your application must be enabled for computer vision. Contact us for access.
Computer vision keyword suggestions
Upload base 64-encoded reference image and get suggested keywords
RESPONSE=$(curl -X POST 'https://api.shutterstock.com/v2/cv/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}")
echo "The next step requires the jq program."
UPLOAD_ID=$(jq -r .upload_id <<< $RESPONSE)
curl -X GET https://api.shutterstock.com/v2/cv/keywords \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "asset_id=$UPLOAD_ID"
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);
$uploadBody = [
"base64_image" => $encodedImageData
];
$uploadEncodedBody = json_encode($uploadBody);
$uploadOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/cv/images",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $uploadEncodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $uploadOptions);
$uploadResponse = curl_exec($handle);
curl_close($handle);
$uploadDecodedResponse = json_decode($uploadResponse);
print_r($uploadDecodedResponse->upload_id);
$keywordsQuery = [
"asset_id" => $uploadDecodedResponse->upload_id,
];
$keywordsOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/cv/keywords?" . http_build_query($keywordsQuery),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $keywordsOptions);
$keywordsResponse = curl_exec($handle);
curl_close($handle);
print_r($keywordsResponse);
const sstk = require("shutterstock-api");
const fs = require("fs");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const computerVisionApi = new sstk.ComputerVisionApi();
const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");
const body = new sstk.ImageCreateRequest(base64File);
computerVisionApi.uploadImage(body)
.then((data) => {
console.log(data.upload_id);
return computerVisionApi.getKeywords(data.upload_id);
})
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
Computer vision can also provide suggested keywords for an image.
To get suggested keywords for an image, upload it to the POST /v2/cv/images
endpoint as with reverse image search.
Then, use the upload ID that this endpoint returns to get suggested keywords from the GET /v2/cv/keywords
endpoint.
You can also use the ID of an existing image in the Shutterstock collection.
In this case, the suggested keywords may not be the same as the keywords in the image metadata.
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.
- small_thumb: Scaled until the larger dimension is 100px, no watermark.
- large_thumb: Scaled until the larger dimension is 150px, no watermark.
- huge_thumb: Scaled to 260px in height, no watermark. This size is available only to paying API customers.
- preview: Scaled until the larger dimension is 450px, watermarked.
- preview_1000: Scaled until the larger dimension is 1000px, watermarked. This size is available only to paying API customers.
- preview_1500: Scaled until the larger dimension is 1500px, watermarked. This size is available only to paying API customers.
The thumbnails and previews come with image IDs (also known as the "whitestrip") embedded on the images. The API response provides the dimensions of the image without the whitestrip. To show the image without the whitestrip, limit the display to the dimensions in the API response. For more information, see Removing the ID from preview versions of images.
Video thumbnail and preview dimensions
Thumbnails of videos with aspect ratios less than or equal to 16:9 are 180 pixels in height with an appropriate width for the aspect ratio. For example, 16:9 videos (such as 720p, 1080p, and 4K videos) have thumbnails that are 320x180 pixels, and 4:3 videos have thumbnails that are 238x180 pixels. Thumbnails of videos with aspect ratios greater than 16:9 have a height equal to 320 divided by the aspect ratio. For example, 1.9:1 videos have thumbnails that are 320x168. Video thumbnails are watermarked.
Previews of videos with aspect ratios less than or equal to 16:9 are 336 pixels in height with an appropriate width. For example, 16:9 videos have previews that are 596x336. Previews of videos with aspect ratios greater than 16:9 have a height equal to 600 divided by the aspect ratio. For example, 1.9:1 videos have previews that are 600x316. Preview videos are watermarked.
Licensing and downloading
Downloading media with the Shutterstock API has two main steps: First, you use a subscription to license one or more pieces of media. Then, you can use links in the response to download the media. Some subscriptions allow you to redownload the media later.
When you request a license with the API, it provides platform licenses for media. These platform licenses allow different uses of assets than the standard and enhanced licenses. For example, platform licenses can be used to resell media licenses or to use media in places such as applications, web sites, mobile apps, and social media. For details about what you can do with platform licenses, see Shutterstock API Terms of Service.
For information on licensing errors, see Errors.
Prerequisites
Look up your subscription IDs
curl -X GET 'https://api.shutterstock.com/v2/user/subscriptions' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/user/subscriptions",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const usersApi = new sstk.UsersApi();
usersApi.getUserSubsciptionList()
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
- An access token with the licenses.create, licenses.view, and purchases.view scopes. See Authentication.
- An active subscription that is valid for the type and size of media that you want to download.
If you are using an API subscription from developers.shutterstock.com, you can leave out the subscription ID field in your licensing request. In this case, the API uses the subscription that is linked to the account in the token. If that account has more than one API subscription, it uses the subscription that is closest to its expiration date.
To get your subscription ID, use the GET /v2/user/subscriptions
endpoint, as in the example in the right-hand pane.
The examples assume that your subscription ID is in the SUBSCRIPTION_ID
environment variable.
Licensing media
License images
DATA='{
"images": [
{
"image_id": "59656357",
"price": 12.50,
"metadata": {
"customer_id": "12345"
}
}
]
}'
curl -X POST "https://api.shutterstock.com/v2/images/licenses?subscription_id=$SUBSCRIPTION_ID" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "$DATA"
$body = [
"images" => [
[
"image_id" => "539753938",
"price"=> 12.50,
"metadata"=> {
"customer_id"=> "12345"
}
]
]
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/licenses?subscription_id=$SUBSCRIPTION_ID",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const body = {
"images": [
{
"image_id": "170076830",
"price": 12.50,
"metadata": {
"customer_id": "12345"
}
}
]
};
const queryParams = {
"size": "huge",
"subscription_id": process.env.SUBSCRIPTION_ID
};
imagesApi.licenseImages(body, queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
Example response
{
"data": [
{
"image_id": "59656357",
"download": {
"url": "https://download.shutterstock.com/gatekeeper/[random-characters]/shutterstock_59656357.jpg"
},
"allotment_charge": 1
}
]
}
To request a license and download media, pass the media ID and the subscription ID to the appropriate endpoint.
For example, to license images, use the POST /v2/images/licenses
endpoint, as in the example in the right-hand column.
You can use the defaults for the size and format or specify values; the example specifies JPG images.
The request body must include the correct metadata for your subscription type. See Request metadata.
The response includes a download link for each media item. 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"
$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"
$body = [
"images" => [
[
"image_id" => "539753938",
"price"=> 12.50,
"metadata"=> {
"customer_id"=> "12345"
}
]
]
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api-sandbox.shutterstock.com/v2/images/licenses?subscription_id=$SUBSCRIPTION_ID",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setSandbox(true);
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const body = {
"images": [
{
"image_id": "419235589",
"price": 12.50,
"metadata": {
"customer_id": "12345"
}
}
]
};
const queryParams = {
"format": "jpg",
"size": "huge",
"subscription_id": process.env.SUBSCRIPTION_ID
};
imagesApi.licenseImages(body, queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
You can use the licensing sandbox API to test your application's licensing code for images, 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 licensing sandbox API is exactly like the main API, except that requests to POST /v2/images/licenses
, POST /v2/videos/licenses
, or POST /v2/audio/licenses
don't deduct credits from your subscription or provide licenses.
Requests to POST /v2/editorial/images/licenses
in the sandbox fail.
Instead of providing a license and unwatermarked image, video, or audio, these two endpoints provide a preset sample file.
The response includes an allotment_charge
field as usual, but that allotment charge is not deducted from your subscription.
All other endpoints in the sandbox API work exactly the same way as the main API.
The sandbox API verifies that the subscription is valid for the licensing request just like the main API. It also returns the same HTTP status codes, so the licensing endpoints return a 200 OK code if the request was valid. The sandbox API uses the same applications and it requires the same authentication and subscriptions as the main API.
Request metadata
The licensing request body must include metadata that includes details about the licensing request. The specific metadata fields depend on your subscription type and on the type of media that you are licensing. Some customers use this metadata to track details about how they use the media, such as the project that they licensed the media for. Resellers use this metadata to track the customer that they licensed the media to and the price that they charged.
API subscriptions
Example request body for API subscriptions
{
"images": [
{
"image_id": "59656357",
"price": 22.50,
"metadata": {
"customer_id": "12345"
}
}
]
}
If you are using an API subscription from the API subscription page, you must include the price
and metadata.customer_id
fields in the request body, as in the example in the right-hand column.
These fields are for resellers to record their customer's ID and the floating-point price that they charged to the customer, within the restrictions of their revenue-sharing agreement.
If you are using an API subscription and are not reselling the media, you can pass any string in the customer_id
field and 0 in the price
field.
For more information about API subscriptions, see Subscriptions.
Enterprise subscriptions
Example request body for Premier subscriptions
{
"images": [
{
"image_id": "59656357",
"metadata": {
"customer_id": "12345",
"geo_location": "US",
"number_viewed": "15",
"search_term": "dog"
}
}
]
}
Enterprise partners who are using Premier subscriptions must provide a metadata object on each media item to license. These partners customize their integration to have up to 4 metadata fields for tracking, grouping, or correlating licensing transactions on their invoices. Each integration requires a different set of metadata fields.
In this case, you must pass an empty or non-empty value for each field that your integration requires, as in the example in the right-hand column. To find the metadata fields that are required or optional for your subscription,
Revenue-sharing subscriptions
Example request body for revenue-sharing subscriptions
{
"images": [
{
"image_id": "59656357",
"price": 22.50,
"metadata": {
"customer_id": "12345",
"geo_location": "US",
"number_viewed": "15",
"search_term": "dog"
}
}
]
}
Downloads under revenue-sharing programs must include the floating-point number final cost to the end customer in the price
field.
The revenue sharer keeps a percentage of this cost based on its agreement with Shutterstock.
This price can not be lower than the price floor for the media asset; if it is, the API changes it to the price floor for the asset.
Subscriptions with comp licenses
Complimentary (comp) licenses are used for testing purposes, unlimited plans, and other special cases. The request for a comp license is the same as for any other type of license, but the resulting license is not always the same. If the subscription is configured for testing purposes and similar cases, the API provides a dummy license. This dummy license does not provide any rights to the customer; it permits customers to view the media without a full license. In this case, the customers have no rights to use the media in any way.
When the API processes a comp license transaction, it does not validate the metadata. Therefore, if you are using comp licenses for testing purposes and your transactions require metadata, you must make sure that the metadata is accurate.
Retrieving metadata
Response that includes licensing request metadata
{
"data": [
{
"id": "i101534558",
"user": {
"username": "userone"
},
"license": "media",
"subscription_id": "s49632241",
"download_time": "2019-11-01T12:10:22-05:00",
"metadata": {
"client": "Company A",
"other": "Important media",
"purchase_order": "457234",
"job": "Important project"
},
"is_downloadable": false,
"image": {
"id": "499124106",
"format": {
"size": "huge"
}
}
}
]
}
To retrieve licensing request metadata, use the GET /v2/images/licenses
endpoint.
The response includes the metadata that was sent with each license request.
Redownloading media
Get a list of existing licenses
curl -X GET 'https://api.shutterstock.com/v2/images/licenses' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/licenses",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
imagesApi.getImageLicenseList()
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
Example response
{
"data": [
{
"id": "i4117504982",
"user": {
"username": "jsmith"
},
"license": "standard",
"subscription_id": "s14565368",
"download_time": "2018-08-31T14:27:10-04:00",
"image": {
"id": "1079756147",
"format": {
"size": "huge"
}
}
},
{
"id": "i4117504971",
"user": {
"username": "jsmith"
},
"license": "standard",
"subscription_id": "s31565368",
"download_time": "2018-08-31T14:27:10-04:00",
"image": {
"id": "59656357",
"format": {
"size": "huge"
}
}
}
]
}
Get a redownload link
curl -X POST 'https://api.shutterstock.com/v2/images/licenses/i4152144892/downloads' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
$body = [];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/licenses/i4152144892/downloads",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const body = {
"size": "huge"
};
imagesApi.downloadImage("i4152144892", body)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
Example response
{
"url":"https://download.shutterstock.com/gatekeeper/[random-characters]/shutterstock_1079756147.jpg"
}
Most of the time, you download media as soon as you license it, but some subscription types allow you to redownload media later. Platform licenses that you request through the API do not allow redownloads. Shutterstock considers each license to be a unique transaction for a single use of the media, so licensing a media item once does not necessarily mean that you can retrieve it later.
You can use the appropriate endpoint, such as GET /v2/images/licenses
, to see your licenses.
Then, if your subscription permits redownloads, you can use the license ID to request a new download URL from the POST v2/images/licenses/{license_id}/downloads
endpoint, as in the example in the right-hand column.
Images
Search
Search for images
curl -X GET https://api.shutterstock.com/v2/images/search \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=Vienna" \
--data-urlencode "orientation=horizontal" \
--data-urlencode "sort=popular"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"query": "New York",
"sort": "popular",
"orientation": "horizontal"
};
imagesApi.searchImages(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$queryFields = [
"query" => "New York",
"sort" => "popular",
"orientation" => "horizontal"
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/search
Try it out
This endpoint searches for images. If you specify more than one search parameter, the API uses an AND condition. Array parameters can be specified multiple times; in this case, the API uses an AND or an OR condition with those values, depending on the parameter. You can also filter search terms out in the query
parameter by prefixing the term with NOT. Free API accounts show results only from a limited library of media, not the full Shutterstock media library. Also, the number of search fields they can use in a request is limited.
Parameters
Parameter | Type | Description |
---|---|---|
added_date | string |
Show images added on the specified date |
added_date_start | string |
Show images added on or after the specified date |
aspect_ratio_min | number |
Show images with the specified aspect ratio or higher, using a positive decimal of the width divided by the height, such as 1.7778 for a 16:9 image |
aspect_ratio_max | number |
Show images with the specified aspect ratio or lower, using a positive decimal of the width divided by the height, such as 1.7778 for a 16:9 image |
aspect_ratio | number |
Show images with the specified aspect ratio, using a positive decimal of the width divided by the height, such as 1.7778 for a 16:9 image |
added_date_end | string |
Show images added before the specified date |
category | string |
Show images with the specified Shutterstock-defined category; specify a category name or ID |
color | string |
Specify either a hexadecimal color in the format '4F21EA' or 'grayscale'; the API groups it into one of 15 color categories and returns images that primarily use that color category |
contributor | array[string] |
Show images with the specified contributor names or IDs, allows multiple |
contributor_country | any |
Show images from contributors in one or more specified countries, or start with NOT to exclude a country from the search |
fields | string |
Fields to display in the response; see the documentation for the fields parameter in the overview section |
height | integer |
(Deprecated; use height_from and height_to instead) Show images with the specified height |
height_from | integer |
Show images with the specified height or larger, in pixels |
height_to | integer |
Show images with the specified height or smaller, in pixels |
image_type | array[string] |
Show images of the specified type |
keyword_safe_search | boolean |
Hide results with potentially unsafe keywords |
language | Language |
Set query and result language (uses Accept-Language header if not set) |
license | array[string] |
Show only images with the specified license |
model | array[string] |
Show image results with the specified model IDs |
orientation | string |
Show image results with horizontal or vertical orientation |
page | integer |
Page number |
per_page | integer |
Number of results per page |
people_model_released | boolean |
Show images of people with a signed model release |
people_age | string |
Show images that feature people of the specified age category |
people_ethnicity | array[string] |
Show images with people of the specified ethnicities |
people_gender | string |
Show images with people of the specified gender |
people_number | integer |
Show images with the specified number of people |
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 |
safe | boolean |
Enable or disable safe search |
sort | string |
Sort by |
spellcheck_query | boolean |
Spellcheck the search query and return results on suggested spellings |
view | string |
Amount of detail to render in the response |
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
-
Customer OAuth (No scope required.)
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);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/search/suggestions?query=cats",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/search/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 |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
200 Response
{
"description": "List of search suggestions",
"properties": {
"data": {
"description": "Search suggestions",
"type": "array",
"items": {
"type": "string"
}
}
},
"type": "object"
}
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.postImageEntities(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);
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 | string | Plain text to extract keywords from | ||
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
200 Response
{
"keywords": [
"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"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"language": "es"
};
imagesApi.getImageCategories(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/categories",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/categories
Try it out
This endpoint lists the categories (Shutterstock-assigned genres) that images can belong to.
Parameters
Parameter | Type | Description |
---|---|---|
language | Language |
Language for the keywords and categories in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
{
"id": "15",
"name": "Science"
},
{
"id": "17",
"name": "Signs/Symbols"
},
{
"id": "18",
"name": "Sports/Recreation"
},
{
"id": "16",
"name": "Technology"
},
{
"id": "0",
"name": "Transportation"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CategoryDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
List similar images
curl -X GET https://api.shutterstock.com/v2/images/465011609/similar \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"language": "es"
};
imagesApi.getSimilarImages("465011609", queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/465011609/similar",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/{id}/similar
Try it out
This endpoint returns images that are visually similar to an image that you specify.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Image ID |
language | Language |
Language for the keywords and categories in the response |
page | integer |
Page number |
per_page | integer |
Number of results per page |
view | string |
Amount of detail to render in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"page": 1,
"per_page": 1,
"total_count": 200,
"search_id": "",
"data": [
{
"id": "224429596",
"aspect": 1,
"assets": {
"preview": {
"height": 450,
"url": "https://image.shutterstock.com/display_pic_with_logo/302287/224429596/stock-vector-happy-halloween-vector-224429596.jpg",
"width": 450
},
"small_thumb": {
"height": 100,
"url": "https://thumb1.shutterstock.com/thumb_small/302287/224429596/stock-vector-happy-halloween-vector-224429596.jpg",
"width": 100
},
"large_thumb": {
"height": 150,
"url": "https://thumb1.shutterstock.com/thumb_large/302287/224429596/stock-vector-happy-halloween-vector-224429596.jpg",
"width": 150
},
"huge_thumb": {
"height": 260,
"url": "https://image.shutterstock.com/image-vector/happy-halloween-vector-260nw-224429596.jpg",
"width": 260
},
"preview_1000": {
"url": "https://ak.picdn.net/shutterstock/photos/224429596/watermark_1000/9b5c88b67f10298f7b5340f21dffc953/preview_1000-224429596.jpg",
"width": 1000,
"height": 1000
},
"preview_1500": {
"url": "https://image.shutterstock.com/z/stock-vector-happy-halloween-vector-224429596.jpg",
"width": 1500,
"height": 1500
}
},
"contributor": {
"id": "302287"
},
"description": "Happy Halloween - vector",
"image_type": "vector",
"media_type": "image"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ImageSearchResults |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
List recommended images
curl -X GET https://api.shutterstock.com/v2/images/recommendations \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "id=465011609"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"id": [
465011609
]
};
imagesApi.getImageRecommendations(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/recommendations?id=465011609",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/recommendations
Try it out
This endpoint returns images that customers put in the same collection as the specified image IDs.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
array[string] |
Image IDs |
max_items | integer |
Maximum number of results returned in the response |
safe | boolean |
Restrict results to safe images |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
{
"id": "106363526"
},
{
"id": "113284498"
},
{
"id": "107390756"
},
{
"id": "99379946"
},
{
"id": "133918412"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | RecommendationDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
List updated images
curl -X GET https://api.shutterstock.com/v2/images/updated \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "interval=30 MINUTE"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"interval": "30 MINUTE"
};
imagesApi.getUpdatedImages(queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$queryFields = [
"interval" => "30 MINUTE"
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/updated?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/updated
Try it out
This endpoint lists images that have been updated in the specified time period to update content management systems (CMS) or digital asset management (DAM) systems. In most cases, use the interval
parameter to show images that were updated recently, but you can also use the start_date
and end_date
parameters to specify a range of no more than three days. Do not use the interval
parameter with either start_date
or end_date
.
Parameters
Parameter | Type | Description |
---|---|---|
type | array[string] |
Show images that were added, deleted, or edited; by default, the endpoint returns images that were updated in any of these ways |
start_date | string |
Show images updated on or after the specified date |
end_date | string |
Show images updated before the specified date |
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 |
page | integer |
Page number |
per_page | integer |
Number of results per page |
sort | string |
Sort order |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
{
"id": "1398917399",
"updated_time": "2019-06-04T15:56:44-04:00",
"updates": [
"edit"
]
},
{
"id": "1398978491",
"updated_time": "2019-06-04T15:56:44-04:00",
"updates": [
"edit"
]
},
{
"id": "1414537214",
"updated_time": "2019-06-04T15:56:44-04:00",
"updates": [
"edit"
]
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | UpdatedMediaDataList |
Details
Get details about images
curl -X GET https://api.shutterstock.com/v2/images/465011609 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"language": "es"
};
imagesApi.getImage("465011609", queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/465011609",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/{id}
Try it out
This endpoint shows information about an image, including a URL to a preview image and the sizes that it is available in.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Image ID |
language | Language |
Language for the keywords and categories in the response |
view | string |
Amount of detail to render in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
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"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"id": [
"1110335168",
"465011609"
],
"view": "minimal"
};
imagesApi.getImageList(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images?id=1110335168&id=465011609",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images
Try it out
This endpoint lists information about one or more images, including the available sizes.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
array[string] |
One or more image IDs |
view | string |
Amount of detail to render in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
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);
POST
/v2/images/licenses
Try it out
This endpoint gets licenses for one or more images. You must specify the image IDs in the body parameter and other details like the format, size, and subscription ID either in the query parameter or with each image ID in the body parameter. Values in the body parameter override values in the query parameters.
Parameters
Parameter | Type | Description |
---|---|---|
subscription_id | string |
Subscription ID to use to license the image |
format | string |
Image format |
size | string |
Image size |
search_id | string |
Search ID that was provided in the results of an image search |
Body
Schema: LicenseImageRequest
List of images to request licenses for and information about each license transaction; these values override the defaults in the query parameters
Fields:
Field | Type | Description | ||
---|---|---|---|---|
images | [LicenseImage] | Images to create licenses for | ||
auth_cookie | Cookie | Cookie object | ||
name | string | The name of the cookie | ||
value | string | The value of the cookie | ||
editorial_acknowledgement | boolean | Set to true to acknowledge the editorial agreement | ||
format | string | Image format to download | ||
image_id | string | Image ID | ||
metadata | LicenseRequestMetadata | Additional information for license requests for enterprise accounts and API subscriptions, 4 fields maximum; which fields are required is set by the account holder | ||
price | number | For revenue-sharing transactions, the final cost to the end customer | ||
search_id | string | ID of the search that led to this licensing transaction | ||
show_modal | boolean | (Deprecated) | ||
size | string | Image size to download | ||
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 | ||
subscription_id | string | ID of the subscription to use for the download. | ||
verification_code | string | (Deprecated) | ||
Accepted authentication
-
Customer OAuth Required scopes:
- licenses.create
- purchases.view
Example responses
OK
{
"data": [
{
"image_id": "547233985",
"download": {
"url": "https://download.shutterstock.com/gatekeeper/[random-characters]/shutterstock_547233985.jpg"
},
"allotment_charge": 1
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | LicenseImageResultDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
List image licenses
curl -X GET https://api.shutterstock.com/v2/images/licenses \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"start_date": "2020-02-02T13:00-05:00",
"end_date": "2020-02-02T13:00-05:00"
};
imagesApi.getImageLicenseList(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/licenses",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/licenses
Try it out
This endpoint lists existing licenses.
Parameters
Parameter | Type | Description |
---|---|---|
image_id | string |
Show licenses for the specified image ID |
license | string |
Show images that are available with the specified license, such as |
page | integer |
Page number |
per_page | integer |
Number of results per page |
sort | string |
Sort order |
username | string |
Filter licenses by username of licensee |
start_date | string |
Show licenses created on or after the specified date |
end_date | string |
Show licenses created before the specified date |
Accepted authentication
-
Customer OAuth Required scope: licenses.view
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);
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 | string | The name of the cookie | ||
value | string | The value of the cookie | ||
show_modal | boolean | (Deprecated) | ||
size | string | Size of the image | ||
verification_code | string | (Deprecated) | ||
Accepted authentication
-
Customer OAuth Required scope: licenses.view
Example responses
OK
{
"url": "https://download.qa.shutterstock.com/gatekeeper/LzEyMy9odWdlLmpwZyIsIm0iOjEsvdjNsbFNWbVNEQ2FhcHV1VlhhSU9VeUpVIl0/shutterstock_60447496.jpg'"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Url |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Collections
Create image collections
DATA='{
"name": "My collection"
}'
curl -X POST https://api.shutterstock.com/v2/images/collections \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const body = {
"name": "My collection"
};
imagesApi.createLightbox(body)
.catch((error) => {
console.error(error);
});
$body = [
"name" => "My collection"
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/images/collections
Try it out
This endpoint creates one or more image collections (lightboxes). To add images to the collections, use POST /v2/images/collections/{id}/items
.
Body
Schema: CollectionCreateRequest
The names of the new collections
Fields:
Field | Type | Description | ||
---|---|---|---|---|
name | string | The name of the collection | ||
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Example responses
Creation successful
{
"id": "101202664"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
201 | Created | Creation successful | CollectionCreateResponse |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
List image collections
curl -X GET https://api.shutterstock.com/v2/images/collections \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"embed": "share_code",
"page": 1,
"per_page": 2
};
imagesApi.getLightboxList(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/collections
Try it out
This endpoint lists your collections of images and their basic attributes.
Parameters
Parameter | Type | Description |
---|---|---|
embed | array[string] |
Which sharing information to include in the response, such as a URL to the collection |
page | integer |
Page number |
per_page | integer |
Number of results per page |
Accepted authentication
-
Customer OAuth Required scope: collections.view
Example responses
OK
{
"data": [
{
"id": "21663574",
"name": "Kittens and puppies",
"total_item_count": 0,
"items_updated_time": "2018-08-02T07:33:24-04:00"
},
{
"id": "21663571",
"name": "young couples",
"total_item_count": 0,
"items_updated_time": "2018-08-02T07:33:22-04:00"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CollectionDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Get the details of image collections
curl -X GET https://api.shutterstock.com/v2/images/collections/126351027 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
imagesApi.getLightbox("126351027")
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/126351027",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/collections/{id}
Try it out
This endpoint gets more detailed information about a collection, including its cover image and timestamps for its creation and most recent update. To get the images in collections, use GET /v2/images/collections/{id}/items
.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
embed | array[string] |
Which sharing information to include in the response, such as a URL to the collection |
share_code | string |
Code to retrieve a shared collection |
Accepted authentication
-
Customer OAuth Required scope: collections.view
Example responses
OK
{
"id": "336351027",
"name": "My collection",
"total_item_count": 1,
"items_updated_time": "2017-05-17T16:28:39-04:00",
"cover_item": {
"id": "954500"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Collection |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Rename image collections
DATA='{
"name": "My new collection name"
}'
curl -X POST https://api.shutterstock.com/v2/images/collections/126351027 \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const collectionId = "126351027"; // Collection ID
const body = {
"name": "My new collection name"
};
imagesApi.renameLightbox(collectionId, body)
.catch((error) => {
console.error(error);
});
$body = [
"name" => "My new collection name"
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/126351027",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/images/collections/{id}
Try it out
This endpoint sets a new name for an image collection.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
Body
Schema: CollectionUpdateRequest
The new name for the collection
Fields:
Field | Type | Description | ||
---|---|---|---|---|
name | string | The new name of the collection | ||
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
204 | No Content | Successfully updated collection | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Delete image collections
curl -X DELETE https://api.shutterstock.com/v2/images/collections/136351027 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const collectionId = "136351027"; // Collection ID
imagesApi.deleteLightbox(collectionId)
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/136351027",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
DELETE
/v2/images/collections/{id}
Try it out
This endpoint deletes an image collection.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
204 | No Content | Successfully deleted collection | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Add images to collections
DATA='{
"items": [
{
"id": "49572945",
"media_type": "image"
}
]
}'
curl -X POST https://api.shutterstock.com/v2/images/collections/126351027/items \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const collectionId = "126351027"; // Collection ID
const body = {
"items": [
{
"id": "495863218",
"media_type": "image"
}
]
};
imagesApi.addLightboxItems(collectionId, body)
.catch((error) => {
console.error(error);
});
$body = [
"items" => [
[
"id" => "49572945",
"media_type" => "image"
]
]
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/126351027/items",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/images/collections/{id}/items
Try it out
This endpoint adds one or more images to a collection by image IDs.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
Body
Schema: CollectionItemRequest
Array of image IDs to add to the collection
Fields:
Field | Type | Description | ||
---|---|---|---|---|
items | [CollectionItem] | List of items | ||
added_time | string | The date the item was added to the collection Format: YYYY-MM-DDTHH:mm:ssZ Example: 2020-05-29T12:10:22-05:00 |
||
id | string | ID of the item | ||
media_type | string | The media type of the item, such as image, video, or audio | ||
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
204 | No Content | Successfully added collection items | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Get the contents of image collections
curl -X GET https://api.shutterstock.com/v2/images/collections/126351027/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
imagesApi.getLightboxItems("126351027")
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/126351027/items",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/collections/{id}/items
Try it out
This endpoint lists the IDs of images in a collection and the date that each was added.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
share_code | string |
Code to retrieve the contents of a shared collection |
page | integer |
Page number |
per_page | integer |
Number of results per page |
Accepted authentication
-
Customer OAuth Required scope: collections.view
Example responses
OK
{
"data": [
{
"id": "38162050",
"added_time": "2016-11-25T16:44:25-05:00"
},
{
"id": "38139676",
"added_time": "2016-11-25T16:44:22-05:00"
},
{
"id": "787905",
"added_time": "2016-11-25T16:44:19-05:00"
},
{
"id": "826197",
"added_time": "2016-11-25T16:44:16-05:00"
},
{
"id": "38124508",
"added_time": "2016-11-25T16:44:14-05:00"
},
{
"id": "126445388",
"added_time": "2016-11-25T16:44:02-05:00"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CollectionItemDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Remove images from collections
curl -X DELETE https://api.shutterstock.com/v2/images/collections/186726599/items?item_id=495863218 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const collectionId = "126351027"; // Collection ID
// Array of images to remove
const imagesToRemove = {
"item_id": [
"495863218"
]
};
imagesApi.deleteLightboxItems(collectionId, imagesToRemove)
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/126351027/items?item_id=495863218",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
DELETE
/v2/images/collections/{id}/items
Try it out
This endpoint removes one or more images from a collection.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
item_id | array[string] |
One or more image IDs to remove from the collection |
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
204 | No Content | Successfully removed collection items | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Featured collections
List featured image collections
curl -X GET https://api.shutterstock.com/v2/images/collections/featured \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const queryParams = {
"embed": "share_url",
"type": "photo",
"asset_hint": "share_url"
};
imagesApi.getFeaturedLightboxList(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/featured",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/collections/featured
Try it out
This endpoint lists featured collections of specific types and a name and cover image for each collection.
Parameters
Parameter | Type | Description |
---|---|---|
embed | string |
Which sharing information to include in the response, such as a URL to the collection |
type | array[string] |
The types of collections to return |
asset_hint | string |
Cover image size |
Accepted authentication
-
Customer OAuth (No scope required.)
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"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | FeaturedCollectionDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Get the details of featured image collections
curl -X GET https://api.shutterstock.com/v2/images/collections/featured/136351027 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
imagesApi.getFeaturedLightbox("136351027")
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/featured/136351027",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/collections/featured/{id}
Try it out
This endpoint gets more detailed information about a featured collection, including its cover image and timestamps for its creation and most recent update. To get the images, use GET /v2/images/collections/featured/{id}/items
.
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 |
asset_hint | string |
Cover image size |
Accepted authentication
-
Customer OAuth (No scope required.)
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"
}
}
Responses
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 |
Get the contents of featured image collections
curl -X GET https://api.shutterstock.com/v2/images/collections/featured/136351027/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
imagesApi.getFeaturedLightboxItems("136351027")
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images/collections/featured/136351027/items",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/images/collections/featured/{id}/items
Try it out
This endpoint lists the IDs of images in a featured collection and the date that each was added.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
page | integer |
Page number |
per_page | integer |
Number of results per page |
Accepted authentication
-
Customer OAuth (No scope required.)
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"
}
]
}
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 | Featured collection not found | None |
Videos
Search
Search for videos
curl -X GET "https://api.shutterstock.com/v2/videos/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=hot air balloon" \
--data-urlencode "duration_from=30" \
--data-urlencode "sort=popular"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const queryParams = {
"query": "hot air balloon",
"duration_from": 30,
"sort": "popular"
};
videosApi.searchVideos(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$queryFields = [
"query" => "hot air balloon",
"duration_from" => 30,
"sort" => "popular"
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/search?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/videos/search
Try it out
This endpoint searches for videos. If you specify more than one search parameter, the API uses an AND condition. Array parameters can be specified multiple times; in this case, the API uses an AND or an OR condition with those values, depending on the parameter. You can also filter search terms out in the query
parameter by prefixing the term with NOT.
Parameters
Parameter | Type | Description |
---|---|---|
added_date | string |
Show videos added on the specified date |
added_date_start | string |
Show videos added on or after the specified date |
added_date_end | string |
Show videos added before the specified date |
aspect_ratio | string |
Show videos with the specified aspect ratio |
category | string |
Show videos with the specified Shutterstock-defined category; specify a category name or ID |
contributor | array[string] |
Show videos with the specified artist names or IDs |
contributor_country | array[string] |
Show videos from contributors in one or more specified countries |
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 |
language | Language |
Set query and result language (uses Accept-Language header if not set) |
license | array[string] |
Show only videos with the specified license or licenses |
model | array[string] |
Show videos with each of the specified models |
page | integer |
Page number |
per_page | integer |
Number of results per page |
people_age | string |
Show videos that feature people of the specified age range |
people_ethnicity | array[string] |
Show videos with people of the specified ethnicities |
people_gender | string |
Show videos with people with the specified gender |
people_number | integer |
Show videos with the specified number of people |
people_model_released | boolean |
Show only videos of people with a signed model release |
query | string |
One or more search terms separated by spaces; you can use NOT to filter out videos that match a term |
resolution | string |
Show videos with the specified resolution |
safe | boolean |
Enable or disable safe search |
sort | string |
Sort by one of these categories |
view | string |
Amount of detail to render in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
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);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/search/suggestions?query=cats",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/videos/search/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 |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
200 Response
{
"description": "List of search suggestions",
"properties": {
"data": {
"description": "Search suggestions",
"type": "array",
"items": {
"type": "string"
}
}
},
"type": "object"
}
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"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const queryParams = {
"language": "es"
};
videosApi.getSimilarVideos("2140697", queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/2140697/similar",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/videos/{id}/similar
Try it out
This endpoint searches for videos that are similar to a video that you specify.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
The ID of a video for which similar videos should be returned |
language | Language |
Language for the keywords and categories in the response |
page | integer |
Page number |
per_page | integer |
Number of results per page |
view | string |
Amount of detail to render in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"page": 1,
"per_page": 1,
"total_count": 200,
"search_id": "",
"data": [
{
"media_type": "video",
"id": "6658088",
"description": "Caucasian parents wearing casual clothes standing watching ocean waves summer daughters carrying bodyboards surfboards slow motion",
"aspect": 1.778,
"duration": 23,
"contributor": {
"id": "87721"
},
"aspect_ratio": "16:9",
"assets": {
"thumb_webm": {
"url": "https://ak8.picdn.net/shutterstock/videos/6658088/thumb/stock-footage-caucasian-parents-wearing-casual-clothes-standing-watching-ocean-waves-summer-daughters-carrying.webm"
},
"thumb_mp4": {
"url": "https://ak8.picdn.net/shutterstock/videos/6658088/thumb/stock-footage-caucasian-parents-wearing-casual-clothes-standing-watching-ocean-waves-summer-daughters-carrying.mp4"
},
"preview_webm": {
"url": "https://ak8.picdn.net/shutterstock/videos/6658088/preview/stock-footage-caucasian-parents-wearing-casual-clothes-standing-watching-ocean-waves-summer-daughters-carrying.webm"
},
"preview_mp4": {
"url": "https://ak8.picdn.net/shutterstock/videos/6658088/preview/stock-footage-caucasian-parents-wearing-casual-clothes-standing-watching-ocean-waves-summer-daughters-carrying.mp4"
},
"thumb_jpg": {
"url": "https://ak8.picdn.net/shutterstock/videos/6658088/thumb/1.jpg"
},
"preview_jpg": {
"url": "https://ak8.picdn.net/shutterstock/videos/6658088/thumb/1.jpg"
}
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | VideoSearchResults |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
List updated videos
curl -X GET https://api.shutterstock.com/v2/videos/updated \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "interval=30 MINUTE"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const queryParams = {
"interval": "30 MINUTE"
};
videosApi.getUpdatedVideos(queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$queryFields = [
"interval" => "30 MINUTE"
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/updated?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/videos/updated
Try it out
This endpoint lists videos that have been updated in the specified time period to update content management systems (CMS) or digital asset management (DAM) systems. In most cases, use the interval
parameter to show videos that were updated recently, but you can also use the start_date
and end_date
parameters to specify a range of no more than three days. Do not use the interval
parameter with either start_date
or end_date
.
Parameters
Parameter | Type | Description |
---|---|---|
start_date | string |
Show videos updated on or after the specified date |
end_date | string |
Show videos updated before the specified date |
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 |
page | integer |
Page number |
per_page | integer |
Number of results per page |
sort | string |
Sort by oldest or newest videos first |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
{
"id": "1030611710",
"updated_time": "2019-06-04T15:57:31-04:00",
"updates": [
"addition",
"edit"
]
},
{
"id": "1030611713",
"updated_time": "2019-06-04T15:57:31-04:00",
"updates": [
"addition",
"edit"
]
},
{
"id": "1030611719",
"updated_time": "2019-06-04T15:57:31-04:00",
"updates": [
"addition",
"edit"
]
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | UpdatedMediaDataList |
Details
List videos
curl -X GET https://api.shutterstock.com/v2/videos \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "id=639703" \
--data-urlencode "id=993721"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const queryParams = {
"id": [
"639703",
"993721"
]
};
videosApi.getVideoList(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos?id=639703&id=993721",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/videos
Try it out
This endpoint lists information about one or more videos, including the aspect ratio and URLs to previews.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
array[string] |
One or more video IDs |
view | string |
Amount of detail to render in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
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/30867073 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const queryParams = {
"language": "es"
};
videosApi.getVideo("30867073", queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/30867073",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/videos/{id}
Try it out
This endpoint shows information about a video, including URLs to previews and the sizes that it is available in.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Video ID |
language | Language |
Language for the keywords and categories in the response |
view | string |
Amount of detail to render in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"media_type": "video",
"id": "30867073",
"description": "Fans cheering for sports team on the bleachers of a professional stadium",
"aspect": 1.896,
"duration": 19,
"categories": [
{
"name": "People",
"id": "13"
},
{
"name": "Sports/Recreation",
"id": "18"
}
],
"keywords": [
"4k resolution",
"adult",
"adults only",
"american football - sport",
"applauding",
"arms raised"
],
"has_model_release": true,
"has_property_release": true,
"models": [
{
"id": "22793203"
}
],
"contributor": {
"id": "907171"
},
"is_adult": false,
"aspect_ratio": "1.90:1",
"added_date": "2017-09-18",
"assets": {
"thumb_webm": {
"url": "https://ak3.picdn.net/shutterstock/videos/30867073/thumb/stock-footage-fans-cheering-for-sports-team-on-the-bleachers-of-a-professional-stadium.webm"
},
"thumb_mp4": {
"url": "https://ak3.picdn.net/shutterstock/videos/30867073/thumb/stock-footage-fans-cheering-for-sports-team-on-the-bleachers-of-a-professional-stadium.mp4"
},
"preview_webm": {
"url": "https://ak3.picdn.net/shutterstock/videos/30867073/preview/stock-footage-fans-cheering-for-sports-team-on-the-bleachers-of-a-professional-stadium.webm"
},
"preview_mp4": {
"url": "https://ak3.picdn.net/shutterstock/videos/30867073/preview/stock-footage-fans-cheering-for-sports-team-on-the-bleachers-of-a-professional-stadium.mp4"
},
"thumb_jpgs": {
"urls": [
"https://ak3.picdn.net/shutterstock/videos/30867073/thumb/1.jpg",
"https://ak3.picdn.net/shutterstock/videos/30867073/thumb/2.jpg",
"https://ak3.picdn.net/shutterstock/videos/30867073/thumb/3.jpg",
"https://ak3.picdn.net/shutterstock/videos/30867073/thumb/12.jpg"
]
},
"thumb_jpg": {
"url": "https://ak3.picdn.net/shutterstock/videos/30867073/thumb/1.jpg"
},
"preview_jpg": {
"url": "https://ak3.picdn.net/shutterstock/videos/30867073/thumb/1.jpg"
},
"sd": {
"height": 480,
"width": 910,
"fps": 25,
"format": "mov",
"file_size": 18221056,
"display_name": "Standard Definition MPEG",
"is_licensable": true
},
"hd": {
"height": 1080,
"width": 2046,
"fps": 25,
"format": "mov",
"file_size": 92101632,
"display_name": "HD MPEG",
"is_licensable": true
},
"web": {
"height": 240,
"width": 454,
"fps": 25,
"format": "mov",
"file_size": 6441984,
"display_name": "Low Resolution MPEG",
"is_licensable": true
},
"4k": {
"height": 2160,
"width": 4096,
"fps": 25,
"format": "apch",
"file_size": 1859655680,
"display_name": "Original UltraHD 4K",
"is_licensable": true
}
},
"url": "https://www.shutterstock.com/video/clip-30867073"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Video |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not found | None |
List video categories
curl -X GET https://api.shutterstock.com/v2/videos/categories \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const queryParams = {
"language": "es"
};
videosApi.getVideoCategories(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/categories",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/videos/categories
Try it out
This endpoint lists the categories (Shutterstock-assigned genres) that videos can belong to.
Parameters
Parameter | Type | Description |
---|---|---|
language | Language |
Language for the keywords and categories in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
{
"id": "1",
"name": "Animals/Wildlife"
},
{
"id": "2",
"name": "Buildings/Landmarks"
},
{
"id": "3",
"name": "Backgrounds/Textures"
},
{
"id": "4",
"name": "Business/Finance"
},
{
"id": "5",
"name": "Education"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CategoryDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Licenses and downloads
License videos
DATA='{
"videos": [
{
"video_id": "2140697",
"size": "hd"
},
{
"video_id": "5613314",
"size": "4k"
}
]
}'
curl -X POST 'https://api.shutterstock.com/v2/videos/licenses?subscription_id='$SUBSCRIPTION_ID \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const body = {
"videos": [
{
"video_id": "419235589"
},
{
"video_id": "1079756147"
}
]
};
const queryParams = {
"subscription_id": SHUTTERSTOCK_SUBSCRIPTION_ID,
"size": "web"
};
videosApi.searchVideos(body, queryParams)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$body = [
"videos" => [
[
"video_id" => "2140697",
"size" => "hd"
],
[
"video_id" => "5613314",
"size" => "4k"
]
]
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/licenses?subscription_id=$SUBSCRIPTION_ID",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/videos/licenses
Try it out
This endpoint gets licenses for one or more videos. You must specify the video IDs in the body parameter and the size and subscription ID either in the query parameter or with each video ID in the body parameter. Values in the body parameter override values in the query parameters.
Parameters
Parameter | Type | Description |
---|---|---|
subscription_id | string |
The subscription ID to use for licensing |
size | string |
The size of the video to license |
search_id | string |
The Search ID that led to this licensing event |
Body
Schema: LicenseVideoRequest
List of videos to request licenses for and information about each license transaction; these values override the defaults in the query parameters
Fields:
Field | Type | Description | ||
---|---|---|---|---|
videos | [LicenseVideo] | Videos to license | ||
auth_cookie | Cookie | Cookie object | ||
name | string | The name of the cookie | ||
value | string | The value of the cookie | ||
editorial_acknowledgement | boolean | Whether or not this item is editorial content | ||
metadata | LicenseRequestMetadata | Additional information for license requests for enterprise accounts and API subscriptions, 4 fields maximum; which fields are required is set by the account holder | ||
price | number | Retail price amount; only for rev-share partners | ||
search_id | string | ID of the search that led to this licensing event | ||
show_modal | boolean | (Deprecated) | ||
size | string | Size of the video being licensed | ||
subscription_id | string | ID of the subscription used for this license | ||
video_id | string | ID of the video being licensed | ||
Accepted authentication
-
Customer OAuth Required scopes:
- licenses.create
- purchases.view
Example responses
OK
{
"data": [
{
"video_id": "2140697",
"download": {
"url": "https://download.shutterstock.com/gatekeeper/W3siZSI6MTQ5NzAyNjU1MiwiayI6InZpZGVvLzIxNDA2OTcvc2QubW92IiwibSI6IjEiLCJkIjoic2h1dHRlcnN0b2NrLW1lZGlhIn0sInVsOFY1dElzb3lWZHNxb3JyWlJjS1dyb016TSJd/shutterstock_v2140697.mov"
},
"allotment_charge": 1
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | LicenseVideoResultDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
List video licenses
curl -X GET https://api.shutterstock.com/v2/videos/licenses \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const queryParams = {
"start_date": "2020-02-02T13:00-05:00",
"end_date": "2020-02-02T13:00-05:00"
};
videosApi.getVideoLicenseList(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/licenses",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/videos/licenses
Try it out
This endpoint lists existing licenses.
Parameters
Parameter | Type | Description |
---|---|---|
video_id | string |
Show licenses for the specified video ID |
license | string |
Show videos that are available with the specified license, such as |
page | integer |
Page number |
per_page | integer |
Number of results per page |
sort | string |
Sort by oldest or newest videos first |
username | string |
Filter licenses by username of licensee |
start_date | string |
Show licenses created on or after the specified date |
end_date | string |
Show licenses created before the specified date |
Accepted authentication
-
Customer OAuth Required scope: licenses.view
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);
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 | string | The name of the cookie | ||
value | string | The value of the cookie | ||
show_modal | boolean | (Deprecated) | ||
size | string | Size of the video | ||
verification_code | string | (Deprecated) | ||
Accepted authentication
-
Customer OAuth Required scope: licenses.view
Example responses
OK
{
"url": "https://download1.shutterstock.com/gatekeeper/W3siZSI6MTUzMzMzMzUzMCwiayI6InZpZGVvLzM5NjU4ODEvaGQubW92IiwibSI6MSwiZCI6InNodXR0ZXJzdG9jay1tZWRpYSJ9LCJjZ2lvRU14T09hNWZGTHZsN21iTWVPRVQ3MFEiXQ/shutterstock_v3965881.mov"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Url |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Collections
Create video collections
DATA='{
"name": "New collection name"
}'
curl -X POST https://api.shutterstock.com/v2/videos/collections \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const body = {
"name": "New collection name"
};
videosApi.createClipbox(body)
.catch((error) => {
console.error(error);
});
$body = [
"name" => "New collection name"
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/videos/collections
Try it out
This endpoint creates one or more collections (clipboxes). To add videos to collections, use POST /v2/videos/collections/{id}/items
.
Body
Schema: CollectionCreateRequest
Collection metadata
Fields:
Field | Type | Description | ||
---|---|---|---|---|
name | string | The name of the collection | ||
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Example responses
200 Response
{
"id": "48433105"
}
Successfully created collection
{
"id": "10120264"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | CollectionCreateResponse |
201 | Created | Successfully created collection | CollectionCreateResponse |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
List video collections
curl -X GET https://api.shutterstock.com/v2/videos/collections \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
videosApi.getClipboxList()
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/videos/collections
Try it out
This endpoint lists your collections of videos and their basic attributes.
Parameters
Parameter | Type | Description |
---|---|---|
page | integer |
Page number |
per_page | integer |
Number of results per page |
Accepted authentication
-
Customer OAuth Required scope: collections.view
Example responses
OK
{
"data": [
{
"name": "kittens and puppies",
"updated_time": "2017-07-05T08:51:00-04:00",
"id": "17553374",
"total_item_count": 0,
"created_time": "2017-07-05T08:51:00-04:00"
},
{
"name": "wild life",
"updated_time": "2017-07-05T08:51:00-04:00",
"id": "17553375",
"total_item_count": 0,
"created_time": "2017-07-05T08:51:00-04:00"
},
{
"name": "young couples",
"updated_time": "2017-07-06T08:50:57-04:00",
"id": "17555175",
"total_item_count": 2,
"created_time": "2017-07-06T08:50:57-04:00"
},
{
"name": "sky timelapses",
"updated_time": "2017-07-06T08:50:58-04:00",
"id": "17555176",
"total_item_count": 2,
"created_time": "2017-07-06T08:50:58-04:00"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CollectionDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Get the details of video collections
curl -X GET https://api.shutterstock.com/v2/videos/collections/17555176 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
videosApi.getClipbox("17555176")
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/videos/collections/{id}
Try it out
This endpoint gets more detailed information about a collection, including the timestamp for its creation and the number of videos in it. To get the videos in collections, use GET /v2/videos/collections/{id}/items.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
The ID of the collection to return |
Accepted authentication
-
Customer OAuth Required scope: collections.view
Example responses
OK
{
"name": "cats and dogs",
"updated_time": "2017-07-05T08:51:00-04:00",
"id": "17555176",
"total_item_count": "0"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Collection |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Rename video collections
DATA='{
"name": "Updated collection name"
}'
curl -X POST https://api.shutterstock.com/v2/videos/collections/17555176 \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const collectionId = "186765119";
const body = {
"name": "My new collection name"
};
videosApi.renameClipbox(collectionId, body)
.catch((error) => {
console.error(error);
});
$body = [
"name" => "Updated collection name"
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/videos/collections/{id}
Try it out
This endpoint sets a new name for a collection.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
The ID of the collection to rename |
Body
Schema: CollectionUpdateRequest
The new name for the collection
Fields:
Field | Type | Description | ||
---|---|---|---|---|
name | string | The new name of the collection | ||
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
204 | No Content | Successfully updated collection | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Delete video collections
curl -X DELETE https://api.shutterstock.com/v2/videos/collections/17555176 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const collectionId = "17555176";
videosApi.deleteClipbox(collectionId)
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
DELETE
/v2/videos/collections/{id}
Try it out
This endpoint deletes a collection.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
The ID of the collection to delete |
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
204 | No Content | Successfully deleted collection | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Add videos to collections
DATA='{
"items": [
{
"id": "10120264"
},
{
"id": "24419024"
}
]
}'
curl -X POST https://api.shutterstock.com/v2/videos/collections/17555176/items \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const collectionId = "17555176"; // Collection ID
// Array of videos to add
const body = {
"items": [
{
"id": "10120264",
"media_type": "video"
}
]
};
videosApi.addLightboxItems(collectionId, body)
.catch((error) => {
console.error(error);
});
$body = [
"items" => [
[
"id" => "10120264"
],
[
"id" => "24419024"
]
]
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176/items",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/videos/collections/{id}/items
Try it out
This endpoint adds one or more videos to a collection by video IDs.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
The ID of the collection to which items should be added |
Body
Schema: CollectionItemRequest
Array of video IDs to add to the collection
Fields:
Field | Type | Description | ||
---|---|---|---|---|
items | [CollectionItem] | List of items | ||
added_time | string | The date the item was added to the collection Format: YYYY-MM-DDTHH:mm:ssZ Example: 2020-05-29T12:10:22-05:00 |
||
id | string | ID of the item | ||
media_type | string | The media type of the item, such as image, video, or audio | ||
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
204 | No Content | Successfully added collection items | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Get the contents of video collections
curl -X GET https://api.shutterstock.com/v2/videos/collections/17555176/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
videosApi.getClipboxItems("17555176")
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176/items",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/videos/collections/{id}/items
Try it out
This endpoint lists the IDs of videos in a collection and the date that each was added.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
The ID of the Collection whose items are to be returned |
page | integer |
Page number |
per_page | integer |
Number of results per page |
sort | string |
Sort order |
Accepted authentication
-
Customer OAuth Required scope: collections.view
Example responses
OK
{
"data": [
{
"added_time": "2017-07-06T14:33:42-04:00",
"id": "123123",
"media_type": "video"
},
{
"added_time": "2017-07-06T14:33:42-04:00",
"id": "654654",
"media_type": "video"
}
],
"page": 1,
"per_page": 100
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CollectionItemDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Remove videos from collections
curl -X DELETE https://api.shutterstock.com/v2/videos/collections/17555176/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const videosApi = new sstk.VideosApi();
const collectionId = "17555176";
// Array of videos to remove
const videosToRemove = {
"item_id": [
"10120264"
]
};
videosApi.deleteClipboxItems(collectionId, videosToRemove)
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/videos/collections/17555176/items",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
DELETE
/v2/videos/collections/{id}/items
Try it out
This endpoint removes one or more videos from a collection.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
The ID of the Collection from which items will be deleted |
item_id | array[string] |
One or more video IDs to remove from the collection |
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
204 | No Content | Successfully removed collection items | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Audio
Search
Search for tracks
curl -X GET "https://api.shutterstock.com/v2/audio/search" \
--header "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "query=bluegrass" \
--data-urlencode "duration_from=60" \
--data-urlencode "moods=uplifting"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const queryParams = {
"query": "bluegrass",
"duration_from": 60,
"moods": ["uplifting"]
};
audioApi.searchAudio(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$queryFields = [
"query" => "bluegrass",
"duration_from" => 60,
"moods" => "uplifting"
];
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/search?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/audio/search
Try it out
This endpoint searches for tracks. If you specify more than one search parameter, the API uses an AND condition. Array parameters can be specified multiple times; in this case, the API uses an AND or an OR condition with those values, depending on the parameter.
Parameters
Parameter | Type | Description |
---|---|---|
artists | array[string] |
Show tracks with one of the specified artist names or IDs |
bpm | integer |
(Deprecated; use bpm_from and bpm_to instead) Show tracks with the specified beats per minute |
bpm_from | integer |
Show tracks with the specified beats per minute or faster |
bpm_to | integer |
Show tracks with the specified beats per minute or slower |
duration | integer |
Show tracks with the specified duration in seconds |
duration_from | integer |
Show tracks with the specified duration or longer in seconds |
duration_to | integer |
Show tracks with the specified duration or shorter in seconds |
genre | array[string] |
Show tracks with each of the specified genres; to get the list of genres, use |
is_instrumental | boolean |
Show instrumental music only |
instruments | array[string] |
Show tracks with each of the specified instruments; to get the list of instruments, use |
moods | array[string] |
Show tracks with each of the specified moods; to get the list of moods, use |
page | integer |
Page number |
per_page | integer |
Number of results per page |
query | string |
One or more search terms separated by spaces |
sort | string |
Sort by |
sort_order | string |
Sort order |
vocal_description | string |
Show tracks with the specified vocal description (male, female) |
view | string |
Amount of detail to render in the response |
fields | string |
Fields to display in the response; see the documentation for the fields parameter in the overview section |
library | string |
Which library to search |
language | string |
Which language to search in |
Accepted authentication
-
Customer OAuth (No scope required.)
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.getGenres()
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/genres",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/audio/genres
Try it out
This endpoint returns a list of all audio genres.
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
"Rock"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | GenreList |
List audio instruments
curl -X GET https://api.shutterstock.com/v2/audio/instruments \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
audioApi.getInstruments()
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/instruments",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/audio/instruments
Try it out
This endpoint returns a list of all audio instruments.
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
"Electric Guitar"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | InstrumentList |
List audio moods
curl -X GET https://api.shutterstock.com/v2/audio/moods \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
audioApi.getMoods()
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/moods",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/audio/moods
Try it out
This endpoint returns a list of all audio moods.
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
"Aggressive"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | MoodList |
Details
List audio tracks
curl -X GET https://api.shutterstock.com/v2/audio \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "id=442583" \
--data-urlencode "id=434750"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const queryParams = {
"id": [
"442583",
"434750"
],
"view": "full"
};
audioApi.getTrackList(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio?id=442583&id=434750",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/audio
Try it out
This endpoint lists information about one or more audio tracks, including the description and publication date.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
array[string] |
One or more audio IDs |
view | string |
Amount of detail to render in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
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"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const queryParams = {
"view": "full"
};
audioApi.getTrack("442583", queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/442583",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/audio/{id}
Try it out
This endpoint shows information about a track, including its genres, instruments, and other attributes.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
integer |
Audio track ID |
view | string |
Amount of detail to render in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
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);
POST
/v2/audio/licenses
Try it out
This endpoint gets licenses for one or more tracks.
Parameters
Parameter | Type | Description |
---|---|---|
license | string |
License type |
search_id | string |
The ID of the search that led to licensing this track |
Body
Schema: LicenseAudioRequest
Tracks to license
Fields:
Field | Type | Description | ||
---|---|---|---|---|
audio | [LicenseAudio] | List of audio tracks to license | ||
audio_id | string | ID of the track being licensed | ||
license | string | Type of license | ||
search_id | string | ID of the search that led to this licensing event | ||
Accepted authentication
-
Customer OAuth Required scope: licenses.create
Example responses
OK
{
"data": [
{
"audio_id": "1",
"download": {
"url": "http://download2.dev.shutterstock.com/gatekeeper/abc/original.wav"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | LicenseAudioResultDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
List audio licenses
curl -X GET https://api.shutterstock.com/v2/audio/licenses \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const queryParams = {
"audio_id": "1"
};
audioApi.getAudioLicenseList(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/licenses",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/audio/licenses
Try it out
This endpoint lists existing licenses. You can filter the results according to the track ID to see if you have an existing license for a specific track.
Parameters
Parameter | Type | Description |
---|---|---|
audio_id | string |
Show licenses for the specified track ID |
Accepted authentication
-
Customer OAuth Required scope: licenses.view
Example responses
200 Response
{
"description": "List of download events",
"properties": {
"data": {
"description": "Download events",
"items": {
"description": "Information about a downloaded media item. Applicable for all media types, only one of 'audio', 'image' or 'video' will be in a single DownloadHistory object",
"properties": {
"audio": {
"description": "Information about the downloaded media",
"properties": {
"format": {
"description": "Information about the format of a download",
"properties": {
"format": {
"description": "The format of the downloaded media",
"type": "string"
},
"size": {
"description": "The size of the downloaded media",
"type": "string"
}
},
"type": "object"
},
"id": {
"description": "ID of the download history media details",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"download_time": {
"description": "Date the media was downloaded the first time",
"format": "date-time",
"type": "string"
},
"id": {
"description": "ID of the download",
"type": "string"
},
"image": {
"description": "Information about the downloaded media",
"properties": {
"format": {
"description": "Information about the format of a download",
"properties": {
"format": {
"description": "The format of the downloaded media",
"type": "string"
},
"size": {
"description": "The size of the downloaded media",
"type": "string"
}
},
"type": "object"
},
"id": {
"description": "ID of the download history media details",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"is_downloadable": {
"description": "Specifies if the media is downloadable via its respective downloads endpoint",
"type": "boolean"
},
"license": {
"description": "The name of the license of this download",
"type": "string"
},
"metadata": {
"description": "The metadata that was passed in the original licensing request",
"type": "object"
},
"subscription_id": {
"description": "ID of the subscription used to perform this download",
"type": "string"
},
"user": {
"description": "Information about a user",
"properties": {
"username": {
"description": "The name of the user who downloaded the item",
"type": "string"
}
},
"required": [
"username"
],
"type": "object"
},
"video": {
"description": "Information about the downloaded media",
"properties": {
"format": {
"description": "Information about the format of a download",
"properties": {
"format": {
"description": "The format of the downloaded media",
"type": "string"
},
"size": {
"description": "The size of the downloaded media",
"type": "string"
}
},
"type": "object"
},
"id": {
"description": "ID of the download history media details",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}
},
"required": [
"id",
"download_time",
"license"
],
"type": "object"
},
"type": "array"
},
"errors": {
"description": "Error list; appears only if there was an error",
"items": {
"description": "Error object",
"properties": {
"code": {
"description": "The error code of this error",
"type": "string"
},
"data": {
"description": "Debugging information about the error",
"type": "string"
},
"items": {
"description": "A list of items that produced the error",
"items": {
"type": "object"
},
"type": "array"
},
"message": {
"description": "Specific details about this error",
"type": "string"
},
"path": {
"description": "Internal code reference to the source of the error",
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"type": "array"
},
"message": {
"description": "Server-generated message, if any",
"type": "string"
},
"page": {
"description": "The current page of results",
"type": "integer"
},
"per_page": {
"description": "The number of results per page",
"type": "integer"
},
"total_count": {
"description": "The total number of results across all pages",
"type": "integer"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | DownloadHistoryDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Download audio tracks
curl -X POST https://api.shutterstock.com/v2/audio/licenses/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);
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
-
Customer OAuth Required scope: licenses.view
Example responses
200 Response
{
"description": "URL object",
"properties": {
"url": {
"description": "URL that can be used to download the unwatermarked, licensed asset",
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Url |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Collections
Create audio collections
DATA='{
"name": "Best rock music"
}'
curl -X POST https://api.shutterstock.com/v2/audio/collections \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const body = {
"name": "Best rock music"
};
audioApi.createSoundbox(body)
.catch((error) => {
console.error(error);
});
$body = [
"name" => "Best rock music"
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/audio/collections
Try it out
This endpoint creates one or more collections (soundboxes). To add tracks, use POST /v2/audio/collections/{id}/items
.
Body
Schema: CollectionCreateRequest
Collection metadata
Fields:
Field | Type | Description | ||
---|---|---|---|---|
name | string | The name of the collection | ||
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Example responses
200 Response
{
"id": "48433105"
}
Successfully created collection
{
"id": "48433105"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | CollectionCreateResponse |
201 | Created | Successfully created collection | integer |
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"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const queryParams = {
"page": "1",
"per_page": "100"
};
audioApi.getSoundboxList(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/audio/collections
Try it out
This endpoint lists your collections of audio tracks and their basic attributes.
Parameters
Parameter | Type | Description |
---|---|---|
page | integer |
Page number |
per_page | integer |
Number of results per page |
Accepted authentication
-
Customer OAuth Required scope: collections.view
Example responses
OK
{
"data": [
{
"name": "Test Collection cdad",
"updated_time": "2014-11-05T19:29:56-05:00",
"id": "5747953",
"total_item_count": 0,
"created_time": "2014-11-05T19:29:56-05:00"
},
{
"name": "Test Collection ff5f",
"updated_time": "2014-11-05T19:29:56-05:00",
"id": "5747955",
"total_item_count": 0,
"created_time": "2014-11-05T19:29:56-05:00"
},
{
"name": "Updated Collection ebc4",
"updated_time": "2014-11-05T19:29:58-05:00",
"id": "5747957",
"total_item_count": 0,
"created_time": "2014-11-05T19:29:58-05:00"
},
{
"name": "Test Collection 0072",
"updated_time": "2014-11-05T19:32:13-05:00",
"id": "5747971",
"total_item_count": 0,
"created_time": "2014-11-05T19:32:13-05:00"
},
{
"name": "Test Collection d332",
"updated_time": "2014-11-05T19:32:13-05:00",
"id": "5747973",
"total_item_count": 0,
"created_time": "2014-11-05T19:32:13-05:00"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CollectionDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Get the details of audio collections
curl -X GET https://api.shutterstock.com/v2/audio/collections/48433107 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
audioApi.getSoundbox("48433107")
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections/48433107",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/audio/collections/{id}
Try it out
This endpoint gets more detailed information about a collection, including the number of items in it and when it was last updated. To get the tracks in collections, use GET /v2/audio/collections/{id}/items
.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
Accepted authentication
-
Customer OAuth Required scope: collections.view
Example responses
OK
{
"name": "Test Collection c28c",
"updated_time": "2016-08-18T18:52:56-04:00",
"id": "48433107",
"total_item_count": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Collection |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Collection not found | None |
Rename audio collections
DATA='{
"name": "Best rock music"
}'
curl -X POST https://api.shutterstock.com/v2/audio/collections/48433107 \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const collectionId = "48433107";
const body = {
"name": "Best rock music"
};
audioApi.renameSoundbox(collectionId, body)
.catch((error) => {
console.error(error);
});
$body = [
"name" => "Best rock music"
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections/48433107",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/audio/collections/{id}
Try it out
This endpoint sets a new name for a collection.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
Body
Schema: CollectionUpdateRequest
Collection changes
Fields:
Field | Type | Description | ||
---|---|---|---|---|
name | string | The new name of the collection | ||
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
204 | No Content | Successfully updated collection | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Delete audio collections
curl -X DELETE https://api.shutterstock.com/v2/audio/collections/48433111 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const collectionId = "48433107";
audioApi.deleteSoundbox(collectionId)
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections/48433111",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
DELETE
/v2/audio/collections/{id}
Try it out
This endpoint deletes a collection.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
204 | No Content | Successfully deleted collection | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Add audio tracks to collections
DATA='{
"items": [
{
"id": "442583"
},
{
"id": "7491192"
}
]
}'
curl -X POST https://api.shutterstock.com/v2/audio/collections/48433115/items \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const collectionId = "48433115";
const body = {
"items": [
{
"id": "442583"
},
{
"id": "7491192"
}
]
};
audioApi.addSoundboxItems(collectionId, body)
.catch((error) => {
console.error(error);
});
$body = [
"items" => [
[
"id" => "442583"
],
[
"id" => "7491192"
]
]
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections/48433115/items",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/audio/collections/{id}/items
Try it out
This endpoint adds one or more tracks to a collection by track IDs.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
Body
Schema: CollectionItemRequest
List of items to add to collection
Fields:
Field | Type | Description | ||
---|---|---|---|---|
items | [CollectionItem] | List of items | ||
added_time | string | The date the item was added to the collection Format: YYYY-MM-DDTHH:mm:ssZ Example: 2020-05-29T12:10:22-05:00 |
||
id | string | ID of the item | ||
media_type | string | The media type of the item, such as image, video, or audio | ||
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
204 | No Content | Successfully added collection items | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Get the contents of audio collections
curl -X GET https://api.shutterstock.com/v2/audio/collections/48433113/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
audioApi.getSoundboxItems("48433113")
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections/48433113/items",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/audio/collections/{id}/items
Try it out
This endpoint lists the IDs of tracks in a collection and the date that each was added.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
page | integer |
Page number |
per_page | integer |
Number of results per page |
sort | string |
Sort order |
Accepted authentication
-
Customer OAuth Required scope: collections.view
Example responses
OK
{
"data": [
{
"added_time": "2016-08-18T18:52:59-04:00",
"id": "76688182",
"media_type": "audio"
},
{
"added_time": "2016-08-18T18:52:59-04:00",
"id": "40005859",
"media_type": "audio"
}
],
"page": 1,
"per_page": 100
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CollectionItemDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Remove audio tracks from collections
curl -X DELETE https://api.shutterstock.com/v2/audio/collections/48433119/items?item_id=36345523 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const audioApi = new sstk.AudioApi();
const collectionId = "48433119";
// Array of tracks to remove
const tracksToRemove = {
"item_id": [
"76688182",
"40005859"
]
};
audioApi.deleteSoundboxItems(collectionId, tracksToRemove)
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/audio/collections/48433119/items?item_id=495863218",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
DELETE
/v2/audio/collections/{id}/items
Try it out
This endpoint removes one or more tracks from a collection.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Collection ID |
item_id | array[string] |
One or more item IDs to remove from the collection |
Accepted authentication
-
Customer OAuth Required scope: collections.edit
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | No response was specified | None |
204 | No Content | Successfully removed collection items | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Editorial Images
Search
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);
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 |
---|---|---|
query | string |
One or more search terms separated by spaces |
sort | string |
Sort by |
category | string |
Show editorial content within a certain editorial category; specify by category name |
country
(Required) |
string |
Show only editorial content that is available for distribution in a certain country |
supplier_code | array[string] |
Show only editorial content from certain suppliers |
date_start | string |
Show only editorial content generated on or after a specific date |
date_end | string |
Show only editorial content generated on or before a specific date |
per_page | integer |
Number of results per page |
cursor | string |
The cursor of the page with which to start fetching results; this cursor is returned from previous requests |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"per_page": 1,
"total_count": 1556949,
"search_id": "q8igACM5gqQY75owjLoVvw",
"next": "eyJ2IjoxLCJzIjoxfQ==",
"prev": "",
"data": [
{
"id": "9804979n",
"title": "Hong Kong kicks off international e-Sports competition, China - 24 Aug 2018",
"caption": "",
"description": "Members of the TyLoo e-Sports team from China prepare to face off against the Kinguin e-Sports team from Poland at the ICBC (Asia) e-Sports and Music Festival Hong Kong 2018, Hong Kong, China, 24 August 2018. The festival runs from 24 to 26 August with professional gamers from around the world competing in international e-sports tournaments.",
"byline": "ALEX HOFFORD/EPA-EFE/Shutterstock",
"keywords": [],
"date_taken": "2018-08-24",
"categories": [],
"aspect": 1.481,
"assets": {
"thumb_170": {
"height": 115,
"width": 170,
"url": "https://editorial01.shutterstock.com/thumb/9804979n/c4377a53/Shutterstock_9804979n.jpg"
},
"thumb_220": {
"height": 149,
"width": 220,
"url": "https://editorial01.shutterstock.com/thumb-220/9804979n/c57a68c7/Shutterstock_9804979n.jpg"
},
"watermark_450": {
"height": 304,
"width": 450,
"url": "https://editorial01.shutterstock.com/wm-preview-450/9804979n/37d19dce/Shutterstock_9804979n.jpg"
},
"watermark_1500": {
"height": 1500,
"width": 1040,
"url": "https://editorial01.shutterstock.com/wm-preview-1500/9933285a/ab82fea4/Shutterstock_9933285a.jpg"
},
"original": {
"display_name": "Original",
"height": 3263,
"width": 4831,
"is_licensable": true
},
"small_jpg": {
"display_name": "Small",
"height": 337,
"width": 500,
"is_licensable": true
},
"medium_jpg": {
"display_name": "Med",
"height": 675,
"width": 1000,
"is_licensable": true
}
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | EditorialSearchResults |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
406 | Not Acceptable | Not Acceptable | None |
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.getEditorialImageCategories()
.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);
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
-
Customer OAuth (No scope required.)
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.getEditorialImageDetails("9926131a", queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/images/9926131a?country=USA",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/editorial/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 |
---|---|---|
id
(Required) |
string |
Editorial ID |
country
(Required) |
string |
Returns only if the content is available for distribution in a certain country |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"id": "9767412v",
"title": "Tokyo 2020 Olympics mascot Miraitowa and Paralympics mascot Someity debut, Japan - 22 Jul 2018",
"caption": "",
"description": "Tokyo 2020 Olympics mascot Miraitowa greets with former Japanese prime minister Yoshiko Mori, President of Tokyo 2020 Olympics Committee, as mascots of Tokyo 2020 Olympics and Paralympics debut in Tokyo, Japan, 22 July 2018. Tokyo 2020 Olympics will start on 24 July 2020 and run until 09 August 2020.",
"byline": "KIMIMASA MAYAMA/EPA-EFE/Shutterstock",
"keywords": [],
"date_taken": "2018-07-22",
"categories": [],
"aspect": 1.33,
"assets": {
"thumb_170": {
"height": 128,
"width": 170,
"url": "https://editorial01.shutterstock.com/thumb/9767412v/36aeb953/Shutterstock_9767412v.jpg"
},
"thumb_220": {
"height": 165,
"width": 220,
"url": "https://editorial01.shutterstock.com/thumb-220/9767412v/b786b189/Shutterstock_9767412v.jpg"
},
"watermark_450": {
"height": 338,
"width": 450,
"url": "https://editorial01.shutterstock.com/wm-preview-450/9767412v/f75b6680/Shutterstock_9767412v.jpg"
},
"watermark_1500": {
"height": 1500,
"width": 1040,
"url": "https://editorial01.shutterstock.com/wm-preview-1500/9933285a/ab82fea4/Shutterstock_9933285a.jpg"
},
"original": {
"display_name": "Original",
"height": 3447,
"width": 4586,
"is_licensable": true
},
"small_jpg": {
"display_name": "Small",
"height": 375,
"width": 500,
"is_licensable": true
},
"medium_jpg": {
"display_name": "Med",
"height": 751,
"width": 1000,
"is_licensable": true
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | EditorialContent |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
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"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const editorialImagesApi = new sstk.EditorialImagesApi();
const queryParams = {
"start_date": "2020-02-02T13:00-05:00",
"end_date": "2020-02-02T13:00-05:00"
};
editorialImagesApi.getEditorialImageLicenseList(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/images/licenses",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/editorial/images/licenses
Try it out
This endpoint lists existing editorial image licenses.
Parameters
Parameter | Type | Description |
---|---|---|
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 |
per_page | integer |
Number of results per page |
sort | string |
Sort order |
username | string |
Filter licenses by username of licensee |
start_date | string |
Show licenses created on or after the specified date |
end_date | string |
Show licenses created before the specified date |
Accepted authentication
-
Customer OAuth Required scope: licenses.view
Example responses
OK
{
"data": [
{
"id": "e1dbb15d5384725d292cf64f793ac45062",
"user": {
"username": "username1"
},
"license": "premier_editorial_all_digital",
"download_time": "2020-12-18T02:22:56.000Z",
"is_downloadable": false,
"image": {
"id": "11231389im",
"format": {
"size": "original"
}
},
"subscription_id": "1221a491741j1k41yd91dh37al324",
"metadata": {
"client": "Company A",
"other": "Important media",
"purchase_order": "457234",
"job": "Important project"
}
},
{
"id": "e1dbb15d5384725d292cf64f793ac45114",
"user": {
"username": "username2"
},
"license": "premier_editorial_all_digital",
"download_time": "2020-12-11T01:24:22.000Z",
"is_downloadable": false,
"image": {
"id": "11231442aa",
"format": {
"size": "original"
}
},
"subscription_id": "1221a491741j1k41yd91dh37al324",
"metadata": {
"client": "Company B",
"other": "Important image",
"purchase_order": "5583831",
"job": "Important project"
}
}
],
"page": 1,
"per_page": 2
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | DownloadHistoryDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
License editorial content
DATA='{
"editorial": [
{
"editorial_id": "8594090h",
"license": "premier_editorial_comp"
}
],
"country": "USA"
}'
curl -X POST https://api.shutterstock.com/v2/editorial/images/licenses \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const editorialApi = new sstk.EditorialApi();
const body = {
"editorial": [
{
"editorial_id": "8594090h",
"license": "premier_editorial_comp"
}
],
"country": "USA"
};
editorialApi.licenseEditorialImage(body)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$body = [
"editorial" => [
[
"editorial_id" => "8594090h",
"license" => "premier_editorial_comp"
]
],
"country" => "USA"
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/images/licenses",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/editorial/images/licenses
Try it out
This endpoint gets licenses for one or more editorial images. You must specify the country and one or more editorial images to license.
Body
Schema: LicenseEditorialContentRequest
License editorial content
Fields:
Field | Type | Description | ||
---|---|---|---|---|
country | string | Mandatory country code for where the editorial content will be distributed; this value is used for rights checks Format: A three-character (ISO 3166 Alpha-3) country code or A two-character (ISO 3166 Alpha-2) country code Example: USA or US |
||
editorial | [LicenseEditorialContent] | Editorial content to license | ||
editorial_id | string | Editorial ID | ||
license | string | License agreement to use for licensing | ||
metadata | LicenseRequestMetadata | Additional information for license requests for enterprise accounts and API subscriptions, 4 fields maximum; which fields are required is set by the account holder | ||
size | string | Asset size to download | ||
Accepted authentication
-
Customer OAuth Required scopes:
- licenses.create
- purchases.view
Example responses
OK
{
"data": [
{
"editorial_id": "69656358",
"download": {
"url": "https://s3-eu-west-1.amazonaws.com/api-downloads.rexfeatures.com/[random-characters].jpg?Expires=1524717323"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | LicenseEditorialContentResults |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
406 | Not Acceptable | Not Acceptable | None |
Livefeeds
Get editorial livefeed list
curl -X GET https://api.shutterstock.com/v2/editorial/images/livefeeds \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "country=USA"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const editorialImagesApi = new sstk.EditorialImagesApi();
const queryParams = {
"country": "USA"
};
editorialImagesApi.getEditorialLivefeedImagesList(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/images/livefeeds?country=USA",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/editorial/images/livefeeds
Try it out
Parameters
Parameter | Type | Description |
---|---|---|
country
(Required) |
string |
Returns only livefeeds that are available for distribution in a certain country |
page | integer |
Page number |
per_page | integer |
Number of results per page |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"page": 1,
"per_page": 1,
"total_count": 6011,
"data": [
{
"id": "2018%2F10%2F19%2F'Butterfly'%20photocall%2C%20Rome%20Film%20Festival",
"name": "'Butterfly' photocall, Rome Film Festival",
"total_item_count": 24,
"created_time": "2018-10-19T20:27:26+00:00",
"cover_item": {
"height": 170,
"width": 113,
"url": "https://editorial01.shutterstock.com/thumb/9938080a/532b2be1/Shutterstock_9938080a.jpg",
"id": "9938080a"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | EditorialImageLivefeedList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Get editorial livefeed
curl -X GET https://api.shutterstock.com/v2/editorial/images/livefeeds/2018%2F10%2F15%2FWomen%20of%20the%20Year%20Lunch%20%26%20Awards%2C%20London \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "country=USA"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const editorialImagesApi = new sstk.EditorialImagesApi();
const queryParams = {
"country": "USA"
};
editorialImagesApi.getEditorialImageLivefeed("2018%2F10%2F15%2FWomen%20of%20the%20Year%20Lunch%20%26%20Awards%2C%20London", queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/images/livefeeds/2018%2F10%2F15%2FWomen%20of%20the%20Year%20Lunch%20%26%20Awards%2C%20London?country=USA",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/editorial/images/livefeeds/{id}
Try it out
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Editorial livefeed ID; must be an URI encoded string |
country
(Required) |
string |
Returns only if the livefeed is available for distribution in a certain country |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"id": "2018%2F10%2F19%2F'The%20House%20with%20a%20Clock%20in%20Its%20Walls'%20premiere%2C%20Rome%20Film%20Festival",
"name": "'The House with a Clock in Its Walls' premiere, Rome Film Festival",
"total_item_count": 100,
"cover_item": {
"height": 170,
"width": 114,
"url": "https://editorial01.shutterstock.com/thumb/9938511p/7d1f17d9/Shutterstock_9938511p.jpg",
"id": "9938511p"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | EditorialImageLivefeed |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Get editorial livefeed items
curl -X GET https://api.shutterstock.com/v2/editorial/images/livefeeds/2018%2F10%2F15%2FWomen%20of%20the%20Year%20Lunch%20%26%20Awards%2C%20London/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "country=USA"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const editorialImagesApi = new sstk.EditorialImagesApi();
const queryParams = {
"country": "USA"
};
editorialImagesApi.getEditorialLivefeedImageItems("2018%2F10%2F15%2FWomen%20of%20the%20Year%20Lunch%20%26%20Awards%2C%20London", queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/images/livefeeds/2018%2F10%2F15%2FWomen%20of%20the%20Year%20Lunch%20%26%20Awards%2C%20London/items?country=USA",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/editorial/images/livefeeds/{id}/items
Try it out
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Editorial livefeed ID; must be an URI encoded string |
country
(Required) |
string |
Returns only if the livefeed items are available for distribution in a certain country |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
{
"id": "9938573m",
"title": "'The House with a Clock in Its Walls' premiere, Rome Film Festival, Italy - 19 Oct 2018",
"caption": "",
"description": "Christian Marazziti and Ariadna Romero",
"byline": "Maurizio D'Avanzo/IPA/Shutterstock",
"keywords": [],
"date_taken": "2018-10-19",
"categories": [
{
"name": "Actor"
},
{
"name": "Female"
},
{
"name": "Personality"
}
],
"aspect": 0.666,
"assets": {
"thumb_170": {
"height": 170,
"width": 113,
"url": "https://editorial01.shutterstock.com/thumb/9938573m/4d5708ce/Shutterstock_9938573m.jpg"
},
"thumb_220": {
"height": 220,
"width": 146,
"url": "https://editorial01.shutterstock.com/thumb-220/9938573m/b78aabde/Shutterstock_9938573m.jpg"
},
"watermark_450": {
"height": 450,
"width": 300,
"url": "https://editorial01.shutterstock.com/wm-preview-450/9938573m/4a9a4add/Shutterstock_9938573m.jpg"
},
"watermark_1500": {
"height": 1500,
"width": 1040,
"url": "https://editorial01.shutterstock.com/wm-preview-1500/9933285a/ab82fea4/Shutterstock_9933285a.jpg"
},
"original": {
"display_name": "Original",
"height": 4928,
"width": 3280,
"is_licensable": true
},
"small_jpg": {
"display_name": "Small",
"height": 500,
"width": 332,
"is_licensable": true
},
"medium_jpg": {
"display_name": "Med",
"height": 1000,
"width": 660,
"is_licensable": true
}
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | EditorialImageContentDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Editorial Video
Search
Search editorial video content
curl -X GET https://api.shutterstock.com/v2/editorial/videos/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.EditorialVideoApi();
const queryParams = {
"query": "football",
"country": "USA",
"sort": "newest",
"date_start": "2018-10-23"
};
const country = "USA";
editorialApi.editorialVideosSearch(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/videos/search?" . http_build_query($queryFields),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/editorial/videos/search
Try it out
This endpoint searches for editorial 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 |
---|---|---|
query | string |
One or more search terms separated by spaces |
sort | string |
Sort by |
category | string |
Show editorial video content within a certain editorial category; specify by category name |
country
(Required) |
string |
Show only editorial video content that is available for distribution in a certain country |
supplier_code | array[string] |
Show only editorial video content from certain suppliers |
date_start | string |
Show only editorial video content generated on or after a specific date |
date_end | string |
Show only editorial video content generated on or before a specific date |
resolution | string |
Show only editorial video content with specific resolution |
fps | number |
Show only editorial video content generated with specific frames per second |
per_page | integer |
Number of results per page |
cursor | string |
The cursor of the page with which to start fetching results; this cursor is returned from previous requests |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"per_page": 1,
"total_count": 1556949,
"search_id": "q8igACM5gqQY75owjLoVvw",
"next": "eyJ2IjoxLCJzIjoxfQ==",
"prev": "",
"data": [
{
"id": "10679336a",
"title": "Proud Papa Playing with His Puppies, New Oxford, Pennsylvania, USA - 28 Oct 2020",
"caption": "",
"description": "Info from Licensor: \"In June, we rescued this 2 year old male boxer from spending most of his days in a crate. Our 2 adult female boxers helped him adjust to living a good boxer life with our family. He \"thanked\" us with this surprise litter of 8 puppies! He has really done amazingly well with playing with all the puppies, and I think he will miss them when they go to their \"fur-ever\" homes. It was a perfect day of playing in the backyard at the end of October 2020.\"",
"byline": "ViralHog/Shutterstock",
"keywords": [
"adorable",
"cute",
"doggo",
"doggy",
"dogs",
"domesticated animals",
"entertainment",
"feel good",
"grass",
"new oxford",
"pennsylvania",
"pets",
"played",
"playing",
"plays",
"pup",
"puppies",
"puppy",
"sweet",
"usa",
"viralhog",
"virals",
"yard"
],
"date_taken": "2020-10-28",
"categories": [],
"aspect": 1.778,
"assets": {
"preview_mp4": {
"url": "https://qa.editorial-cdn.shuttercorp.net/wm-preview-mp4/10679336a/M8TbAb3aNaj2g5w4ODgwMzg=/Shutterstock_10679336a.mp4"
},
"preview_webm": {
"url": "https://qa.editorial-cdn.shuttercorp.net/wm-preview-webm/10679336a/M5T3Ab36N4jbgcwbODgwMzg=/Shutterstock_10679336a.webm"
},
"thumb_jpg": {
"url": "https://qa.editorial-cdn.shuttercorp.net/thumb-1/10679336a/M5T6Ad37Ncj5g3w1ODgwMzg=/Shutterstock_10679336a.jpg"
},
"original": {
"height": 1080,
"width": 1920,
"fps": 29.937,
"format": "avc1",
"file_size": 124452018,
"display_name": "HD",
"is_licensable": true
}
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | EditorialVideoSearchResults |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
406 | Not Acceptable | Not Acceptable | None |
Categories
List editorial video categories
curl -X GET https://api.shutterstock.com/v2/editorial/videos/categories \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const editorialVideoApi = new sstk.EditorialVideoApi();
editorialVideoApi.getEditorialCategories()
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/videos/categories",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/editorial/videos/categories
Try it out
This endpoint lists the categories that editorial videos can belong to, which are separate from the categories that other types of assets can belong to.
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
{
"name": "Animal"
},
{
"name": "Awards"
},
{
"name": "Art"
},
{
"name": "Film Stills"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | EditorialVideoCategoryResults |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Details
Get editorial video content details
curl -X GET https://api.shutterstock.com/v2/editorial/videos/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 editorialVideoApi = new sstk.EditorialVideoApi();
const queryParams = {
"country": "USA"
};
editorialVideoApi.editorialVideosDetails("9926131a", queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/videos/9926131a?country=USA",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/editorial/videos/{id}
Try it out
This endpoint shows information about an editorial image, including a URL to a preview image and the sizes that it is available in.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
string |
Editorial ID |
country
(Required) |
string |
Returns only if the content is available for distribution in a certain country |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"id": "10679336a",
"title": "Proud Papa Playing with His Puppies, New Oxford, Pennsylvania, USA - 28 Oct 2020",
"caption": "",
"description": "Info from Licensor: \"In June, we rescued this 2 year old male boxer from spending most of his days in a crate. Our 2 adult female boxers helped him adjust to living a good boxer life with our family. He \"thanked\" us with this surprise litter of 8 puppies! He has really done amazingly well with playing with all the puppies, and I think he will miss them when they go to their \"fur-ever\" homes. It was a perfect day of playing in the backyard at the end of October 2020.\"",
"byline": "ViralHog/Shutterstock",
"keywords": [
"adorable",
"cute",
"doggo",
"doggy",
"dogs",
"domesticated animals",
"entertainment",
"feel good",
"grass",
"new oxford",
"pennsylvania",
"pets",
"played",
"playing",
"plays",
"pup",
"puppies",
"puppy",
"sweet",
"usa",
"viralhog",
"virals",
"yard"
],
"date_taken": "2020-10-28",
"categories": [],
"aspect": 1.778,
"assets": {
"preview_mp4": {
"url": "https://qa.editorial-cdn.shuttercorp.net/wm-preview-mp4/10679336a/M8TbAb3aNaj2g5w4ODgwMzg=/Shutterstock_10679336a.mp4"
},
"preview_webm": {
"url": "https://qa.editorial-cdn.shuttercorp.net/wm-preview-webm/10679336a/M5T3Ab36N4jbgcwbODgwMzg=/Shutterstock_10679336a.webm"
},
"thumb_jpg": {
"url": "https://qa.editorial-cdn.shuttercorp.net/thumb-1/10679336a/M5T6Ad37Ncj5g3w1ODgwMzg=/Shutterstock_10679336a.jpg"
},
"original": {
"height": 1080,
"width": 1920,
"fps": 29.937,
"format": "avc1",
"file_size": 124452018,
"display_name": "HD",
"is_licensable": true
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | EditorialVideoContent |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
406 | Not Acceptable | Not Acceptable | None |
Licenses and downloads
License editorial video content
DATA='{
"editorial": [
{
"editorial_id": "8594090h",
"license": "premier_editorial_video_comp"
}
],
"country": "USA"
}'
curl -X POST https://api.shutterstock.com/v2/editorial/videos/licenses \
-d "$DATA" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const editorialApi = new sstk.EditorialApi();
const body = {
"editorial": [
{
"editorial_id": "10687492a",
"license": "premier_editorial_video_comp"
}
],
"country": "USA"
};
editorialApi.licenseEditorialVideo(body)
.then(({ data }) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$body = [
"editorial" => [
[
"editorial_id" => "10687492a",
"license" => "premier_editorial_video_comp"
]
],
"country" => "USA"
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/editorial/videos/licenses",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/editorial/videos/licenses
Try it out
This endpoint gets licenses for one or more editorial videos. You must specify the country and one or more editorial videos to license.
Body
Schema: LicenseEditorialVideoContentRequest
License editorial video content
Fields:
Field | Type | Description | ||
---|---|---|---|---|
country | string | Mandatory country code for where the editorial content will be distributed; this value is used for rights checks Format: A three-character (ISO 3166 Alpha-3) country code or A two-character (ISO 3166 Alpha-2) country code Example: USA or US |
||
editorial | [LicenseEditorialVideoContent] | Editorial content to license | ||
editorial_id | string | Editorial ID | ||
license | string | License agreement to use for licensing | ||
metadata | LicenseRequestMetadata | Additional information for license requests for enterprise accounts and API subscriptions, 4 fields maximum; which fields are required is set by the account holder | ||
size | string | Asset size to download | ||
Accepted authentication
-
Customer OAuth Required scopes:
- licenses.create
- purchases.view
Example responses
OK
{
"data": [
{
"editorial_id": "69656358",
"download": {
"url": "https://s3-eu-west-1.amazonaws.com/api-downloads.rexfeatures.com/[random-characters].mov?Expires=1524717323"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | LicenseEditorialContentResults |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Computer Vision
Upload
Upload images
curl -X POST 'https://api.shutterstock.com/v2/cv/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const computerVisionApi = new sstk.ComputerVisionApi();
const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");
const body = new sstk.ImageCreateRequest(base64File);
computerVisionApi.uploadImage(body)
.then((data) => {
console.log(data.upload_id);
});
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);
$uploadBody = [
"base64_image" => $encodedImageData
];
$uploadEncodedBody = json_encode($uploadBody);
$uploadOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/cv/images",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $uploadEncodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $uploadOptions);
$uploadResponse = curl_exec($handle);
curl_close($handle);
$uploadDecodedResponse = json_decode($uploadResponse);
print_r($uploadDecodedResponse->upload_id);
POST
/v2/cv/images
Try it out
This endpoint uploads an image for reverse image or video search. Images must be in JPEG or PNG format. To get the search results, pass the upload ID that this endpoint returns to the GET /v2/cv/similar/images or GET /v2/cv/similar/videos endpoints. Contact us for access to this endpoint.
Body
Schema: ImageCreateRequest
A Base 64 encoded jpeg or png; images can be no larger than 10mb and can be no larger than 10,000 pixels in width or height
Fields:
Field | Type | Description | ||
---|---|---|---|---|
base64_image | string | A Base 64 encoded jpeg or png; images can be no larger than 10mb and can be no larger than 10,000 pixels in width or height | ||
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
Created
{
"upload_id": "Udb14e1c3540bdbf82b4b3fe12d3a44f2"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | ComputerVisionImageCreateResponse |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
413 | Payload Too Large | Payload Too Large | None |
415 | Unsupported Media Type | Unsupported Media Type | None |
Similar
List similar images
RESPONSE=$(curl -X POST 'https://api.shutterstock.com/v2/cv/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}")
echo "The next step requires the jq program."
UPLOAD_ID=$(jq -r .upload_id <<< $RESPONSE)
curl -X GET https://api.shutterstock.com/v2/cv/similar/images \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "asset_id=$UPLOAD_ID"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const computerVisionApi = new sstk.ComputerVisionApi();
const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");
const body = new sstk.ImageCreateRequest(base64File);
computerVisionApi.uploadImage(body)
.then((data) => {
console.log(data.upload_id);
return computerVisionApi.getSimilarImages(data.upload_id);
})
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);
$uploadBody = [
"base64_image" => $encodedImageData
];
$uploadEncodedBody = json_encode($uploadBody);
$uploadOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/cv/images",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $uploadEncodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $uploadOptions);
$uploadResponse = curl_exec($handle);
curl_close($handle);
$uploadDecodedResponse = json_decode($uploadResponse);
print_r($uploadDecodedResponse->upload_id);
$similarQuery = [
"asset_type" => "images",
"asset_id" => $uploadDecodedResponse->upload_id,
];
$similarOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/cv/similar/images?" . http_build_query($similarQuery),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $similarOptions);
$similarResponse = curl_exec($handle);
curl_close($handle);
print_r($similarResponse);
GET
/v2/cv/similar/images
Try it out
This endpoint returns images that are visually similar to an image that you specify or upload.
Parameters
Parameter | Type | Description |
---|---|---|
asset_id
(Required) |
string |
The asset ID or upload ID to find similar images for |
license | array[string] |
Show only images with the specified license |
safe | boolean |
Enable or disable safe search |
language | Language |
Language for the keywords and categories in the response |
page | integer |
Page number |
per_page | integer |
Number of results per page |
view | string |
Amount of detail to render in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"page": 1,
"per_page": 1,
"total_count": 200,
"search_id": "",
"data": [
{
"id": "224429596",
"aspect": 1,
"assets": {
"preview": {
"height": 450,
"url": "https://image.shutterstock.com/display_pic_with_logo/302287/224429596/stock-vector-happy-halloween-vector-224429596.jpg",
"width": 450
},
"small_thumb": {
"height": 100,
"url": "https://thumb1.shutterstock.com/thumb_small/302287/224429596/stock-vector-happy-halloween-vector-224429596.jpg",
"width": 100
},
"large_thumb": {
"height": 150,
"url": "https://thumb1.shutterstock.com/thumb_large/302287/224429596/stock-vector-happy-halloween-vector-224429596.jpg",
"width": 150
},
"huge_thumb": {
"height": 260,
"url": "https://image.shutterstock.com/image-vector/happy-halloween-vector-260nw-224429596.jpg",
"width": 260
},
"preview_1000": {
"url": "https://ak.picdn.net/shutterstock/photos/224429596/watermark_1000/9b5c88b67f10298f7b5340f21dffc953/preview_1000-224429596.jpg",
"width": 1000,
"height": 1000
},
"preview_1500": {
"url": "https://image.shutterstock.com/z/stock-vector-happy-halloween-vector-224429596.jpg",
"width": 1500,
"height": 1500
}
},
"contributor": {
"id": "302287"
},
"description": "Happy Halloween - vector",
"image_type": "vector",
"media_type": "image"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ImageSearchResults |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
List similar videos
RESPONSE=$(curl -X POST 'https://api.shutterstock.com/v2/cv/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}")
echo "The next step requires the jq program."
UPLOAD_ID=$(jq -r .upload_id <<< $RESPONSE)
curl -X GET https://api.shutterstock.com/v2/cv/similar/videos \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "asset_id=$UPLOAD_ID"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const computerVisionApi = new sstk.ComputerVisionApi();
const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");
const body = new sstk.ImageCreateRequest(base64File);
computerVisionApi.uploadImage(body)
.then((data) => {
console.log(data.upload_id);
return computerVisionApi.getSimilarVideos(data.upload_id);
})
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);
$uploadBody = [
"base64_image" => $encodedImageData
];
$uploadEncodedBody = json_encode($uploadBody);
$uploadOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/cv/images",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $uploadEncodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $uploadOptions);
$uploadResponse = curl_exec($handle);
curl_close($handle);
$uploadDecodedResponse = json_decode($uploadResponse);
print_r($uploadDecodedResponse->upload_id);
$similarQuery = [
"asset_type" => "images",
"asset_id" => $uploadDecodedResponse->upload_id,
];
$similarOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/cv/similar/videos?" . http_build_query($similarQuery),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $similarOptions);
$similarResponse = curl_exec($handle);
curl_close($handle);
print_r($similarResponse);
GET
/v2/cv/similar/videos
Try it out
This endpoint returns videos that are visually similar to an image that you specify or upload.
Parameters
Parameter | Type | Description |
---|---|---|
asset_id
(Required) |
string |
The asset ID or upload ID to find similar videos for |
license | array[string] |
Show only videos with the specified license |
safe | boolean |
Enable or disable safe search |
language | Language |
Language for the keywords and categories in the response |
page | integer |
Page number |
per_page | integer |
Number of results per page |
view | string |
Amount of detail to render in the response |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"page": 1,
"per_page": 1,
"total_count": 200,
"search_id": "",
"data": [
{
"media_type": "video",
"id": "33248488",
"description": "The Concept of: Digitalization of Information Flow Moving Through Rack Servers in Data Center. Shot on RED EPIC-W 8K Helium Cinema Camera.",
"aspect": 1.778,
"duration": 19,
"contributor": {
"id": "178456"
},
"aspect_ratio": "16:9",
"assets": {
"thumb_webm": {
"url": "https://ak8.picdn.net/shutterstock/videos/33248488/thumb/stock-footage-the-concept-of-digitalization-of-information-flow-moving-through-rack-servers-in-data-center-shot.webm"
},
"thumb_mp4": {
"url": "https://ak8.picdn.net/shutterstock/videos/33248488/thumb/stock-footage-the-concept-of-digitalization-of-information-flow-moving-through-rack-servers-in-data-center-shot.mp4"
},
"preview_webm": {
"url": "https://ak8.picdn.net/shutterstock/videos/33248488/preview/stock-footage-the-concept-of-digitalization-of-information-flow-moving-through-rack-servers-in-data-center-shot.webm"
},
"preview_mp4": {
"url": "https://ak8.picdn.net/shutterstock/videos/33248488/preview/stock-footage-the-concept-of-digitalization-of-information-flow-moving-through-rack-servers-in-data-center-shot.mp4"
},
"thumb_jpg": {
"url": "https://ak8.picdn.net/shutterstock/videos/33248488/thumb/12.jpg"
},
"preview_jpg": {
"url": "https://ak8.picdn.net/shutterstock/videos/33248488/thumb/12.jpg"
}
},
"url": "https://www.shutterstock.com/video/clip-33248488"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | VideoSearchResults |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Keywords
List suggested keywords
RESPONSE=$(curl -X POST 'https://api.shutterstock.com/v2/cv/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}")
echo "The next step requires the jq program."
UPLOAD_ID=$(jq -r .upload_id <<< $RESPONSE)
curl -X GET https://api.shutterstock.com/v2/cv/keywords \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "asset_id=$UPLOAD_ID"
const sstk = require("shutterstock-api");
const fs = require("fs");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const computerVisionApi = new sstk.ComputerVisionApi();
const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");
const body = new sstk.ImageCreateRequest(base64File);
computerVisionApi.uploadImage(body)
.then((data) => {
console.log(data.upload_id);
return computerVisionApi.getKeywords(data.upload_id);
})
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);
$uploadBody = [
"base64_image" => $encodedImageData
];
$uploadEncodedBody = json_encode($uploadBody);
$uploadOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/cv/images",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $uploadEncodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $uploadOptions);
$uploadResponse = curl_exec($handle);
curl_close($handle);
$uploadDecodedResponse = json_decode($uploadResponse);
print_r($uploadDecodedResponse->upload_id);
$keywordsQuery = [
"asset_id" => $uploadDecodedResponse->upload_id,
];
$keywordsOptions = [
CURLOPT_URL => "https://api.shutterstock.com/v2/cv/keywords?" . http_build_query($keywordsQuery),
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $keywordsOptions);
$keywordsResponse = curl_exec($handle);
curl_close($handle);
print_r($keywordsResponse);
GET
/v2/cv/keywords
Try it out
This endpoint returns a list of suggested keywords for a media item that you specify or upload.
Parameters
Parameter | Type | Description |
---|---|---|
asset_id
(Required) |
any |
The asset ID or upload ID to suggest keywords for |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
"nature",
"wildlife",
"animal",
"cute",
"bamboo",
"panda",
"china",
"wild",
"endangered",
"black",
"bear"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | KeywordDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
415 | Unsupported Media Type | Unsupported Media Type | None |
Legacy
Upload ephemeral images
curl -X POST 'https://api.shutterstock.com/v2/images' \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-H 'Content-Type: application/json' \
-d "{\"base64_image\":\"`base64 myImage.jpg`\"}"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const imagesApi = new sstk.ImagesApi();
const imageFile = fs.readFileSync("./myImage.jpg");
const base64File = Buffer.from(imageFile).toString("base64");
const body = new sstk.ImageCreateRequest(base64File);
const queryParams = {
"page": 1,
"per_page": 20,
"view": "minimal"
};
imagesApi.uploadEphemeralImage(body)
.then((data) => {
console.log(data.id);
return imagesApi.getSimilarImages(data.id, queryParams);
})
.then((similarImageData) => {
console.log(similarImageData);
})
.catch((error) => {
console.error(error);
});
$imageData = file_get_contents("myImage.jpg");
$encodedImageData = base64_encode($imageData);
$body = [
"base64_image" => $encodedImageData
];
$encodedBody = json_encode($body);
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/images",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $encodedBody,
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN",
"Content-Type: application/json"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
POST
/v2/images
Try it out
Deprecated; use POST /v2/cv/images
instead. This endpoint uploads an image for reverse image search. The image must be in JPEG or PNG format. To get the search results, pass the ID that this endpoint returns to the GET /v2/images/{id}/similar
endpoint.
Body
Schema: ImageCreateRequest
The image data in JPEG or PNG format
Fields:
Field | Type | Description | ||
---|---|---|---|---|
base64_image | string | A Base 64 encoded jpeg or png; images can be no larger than 10mb and can be no larger than 10,000 pixels in width or height | ||
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
Created
{
"id": "Udb14e1c3540bdbf82b4b3fe12d3a44f2"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | ImageCreateResponse |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
413 | Payload Too Large | Payload Too Large | None |
Contributors
Contributors
Get details about multiple contributors
curl -X GET https://api.shutterstock.com/v2/contributors \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN" \
-G \
--data-urlencode "id=800506" \
--data-urlencode "id=1653538"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const contributorsApi = new sstk.ContributorsApi();
const queryParams = {
"id": [
800506,
1653538
]
};
contributorsApi.getContributorList(queryParams)
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/contributors?id=800506&id=1653538",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/contributors
Try it out
This endpoint lists information about one or more contributors, including contributor type, equipment they use and other attributes.
Parameters
Parameter | Type | Description |
---|---|---|
id
(Required) |
array[string] |
One or more contributor IDs |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
{
"id": "800506",
"display_name": "Dave Pusey",
"about": "Dave is a self confessed emotional photographer, capturing, keeping and sharing images for the stories of the wild that they convey.",
"equipment": [
"Both Canon & Nikon"
],
"contributor_type": [
"illustrator",
"videographer"
],
"styles": [
"black_and_white",
"landscape",
"nature"
],
"subjects": [
"animals",
"holiday",
"nature",
"travel",
"wildlife"
],
"website": "leovantage.com",
"location": "za",
"portfolio_url": "http://www.shutterstock.com/g/davep",
"social_media": {
"facebook": "pages/Dave-Pusey-Photography/131399733564475"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ContributorProfileDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
Get details about a single contributor
curl -X GET https://api.shutterstock.com/v2/contributors/1653538 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const contributorsApi = new sstk.ContributorsApi();
contributorsApi.getContributor("1653538")
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/contributors/1653538",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/contributors/{contributor_id}
Try it out
This endpoint shows information about a single contributor, including contributor type, equipment they use, and other attributes.
Parameters
Parameter | Type | Description |
---|---|---|
contributor_id
(Required) |
string |
Contributor ID |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"id": "1653538",
"display_name": "Mees Kuiper",
"about": "A 18 year old photographer living in Amsterdam.",
"equipment": [
"Nikon D7000",
"Nikkor 70-300mm",
"Nikkor 24-70mm"
],
"contributor_type": [
"photographer",
"illustrator",
"videographer"
],
"styles": [],
"subjects": [
"animals",
"buildings",
"nature",
"people",
"wildlife"
],
"location": "nl",
"portfolio_url": "http://www.shutterstock.com/g/Mees Kuiper",
"social_media": {}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ContributorProfile |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
List contributors' collections
curl -X GET https://api.shutterstock.com/v2/contributors/800506/collections \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const contributorsApi = new sstk.ContributorsApi();
contributorsApi.getContributorCollectionsList("800506")
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/contributors/800506/collections",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/contributors/{contributor_id}/collections
Try it out
This endpoint lists collections based on contributor ID.
Parameters
Parameter | Type | Description |
---|---|---|
contributor_id
(Required) |
string |
Contributor ID |
sort | string |
Sort order |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
{
"name": "Lion Cubs",
"cover_item": {
"id": "87672997",
"media_type": "image"
},
"updated_time": "2014-05-01T05:22:07-04:00",
"id": "135931",
"total_item_count": 10,
"created_time": "2012-04-07T02:07:28-04:00"
},
{
"name": "African Landscapes",
"cover_item": {
"id": "79489261",
"media_type": "image"
},
"updated_time": "2014-05-01T05:38:34-04:00",
"id": "1991564",
"total_item_count": 5,
"created_time": "2014-05-01T05:23:20-04:00"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CollectionDataList |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Contributor not found | None |
Get details about contributors' collections
curl -X GET https://api.shutterstock.com/v2/contributors/800506/collections/1991678 \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const contributorsApi = new sstk.ContributorsApi();
contributorsApi.getContributorCollections("800506", "1991678")
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/contributors/800506/collections/1991678",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/contributors/{contributor_id}/collections/{id}
Try it out
This endpoint gets more detailed information about a contributor's collection, including its cover image, timestamps for its creation, and most recent update. To get the items in collections, use GET /v2/contributors/{contributor_id}/collections/{id}/items.
Parameters
Parameter | Type | Description |
---|---|---|
contributor_id
(Required) |
string |
Contributor ID |
id
(Required) |
string |
Collection ID that belongs to the contributor |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"name": "Baby Elephants",
"cover_item": {
"id": "168592952",
"media_type": "image"
},
"updated_time": "2014-05-01T05:50:21-04:00",
"id": "1991678",
"total_item_count": 3
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Collection |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Set not found | None |
Get the items in contributors' collections
curl -X GET https://api.shutterstock.com/v2/contributors/800506/collections/1991678/items \
-H "Accept: application/json" \
-H "Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
const sstk = require("shutterstock-api");
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);
const contributorsApi = new sstk.ContributorsApi();
contributorsApi.getContributorCollectionItems("800506", "1991678")
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(error);
});
$options = [
CURLOPT_URL => "https://api.shutterstock.com/v2/contributors/800506/collections/1991678/items",
CURLOPT_USERAGENT => "php/curl",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN"
],
CURLOPT_RETURNTRANSFER => 1
];
$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);
$decodedResponse = json_decode($response);
print_r($decodedResponse);
GET
/v2/contributors/{contributor_id}/collections/{id}/items
Try it out
This endpoint lists the IDs of items in a contributor's collection and the date that each was added.
Parameters
Parameter | Type | Description |
---|---|---|
contributor_id
(Required) |
string |
Contributor ID |
id
(Required) |
string |
Collection ID that belongs to the contributor |
page | integer |
Page number |
per_page | integer |
Number of results per page |
sort | string |
Sort order |
Accepted authentication
-
Customer OAuth (No scope required.)
Example responses
OK
{
"data": [
{
"added_time": "2014-05-01T05:49:46-04:00",
"id": "168592952",
"media_type": "image"
},
{
"added_time": "2014-05-01T05:49:59-04:00",
"id": "88269310",
"media_type": "image"
},
{
"added_time":