Skip to content

Latest commit

 

History

History
2177 lines (1574 loc) · 72.7 KB

ImagesApi.md

File metadata and controls

2177 lines (1574 loc) · 72.7 KB

shutterstock-api.ImagesApi

All URIs are relative to https://api.shutterstock.com.

Method HTTP request Description
addImageCollectionItems POST /v2/images/collections/{id}/items Add images to collections
bulkSearchImages POST /v2/bulk_search/images Run multiple image searches
createImageCollection POST /v2/images/collections Create image collections
deleteImageCollection DELETE /v2/images/collections/{id} Delete image collections
deleteImageCollectionItems DELETE /v2/images/collections/{id}/items Remove images from collections
downloadImage POST /v2/images/licenses/{id}/downloads Download images
getFeaturedImageCollection GET /v2/images/collections/featured/{id} Get the details of featured image collections
getFeaturedImageCollectionItems GET /v2/images/collections/featured/{id}/items Get the contents of featured image collections
getFeaturedImageCollectionList GET /v2/images/collections/featured List featured image collections
getImage GET /v2/images/{id} Get details about images
getImageCollection GET /v2/images/collections/{id} Get the details of image collections
getImageCollectionItems GET /v2/images/collections/{id}/items Get the contents of image collections
getImageCollectionList GET /v2/images/collections List image collections
getImageKeywordSuggestions POST /v2/images/search/suggestions Get keywords from text
getImageLicenseList GET /v2/images/licenses List image licenses
getImageList GET /v2/images List images
getImageRecommendations GET /v2/images/recommendations List recommended images
getImageSuggestions GET /v2/images/search/suggestions Get suggestions for a search term
getUpdatedImages GET /v2/images/updated List updated images
licenseImages POST /v2/images/licenses License images
listImageCategories GET /v2/images/categories List image categories
listSimilarImages GET /v2/images/{id}/similar List similar images
renameImageCollection POST /v2/images/collections/{id} Rename image collections
searchImages GET /v2/images/search Search for images

ImagesApi.addImageCollectionItems

ImagesApi.addImageCollectionItems(id, body)

Add images to collections

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

Example

const sstk = require('shutterstock-api');

// To use OAuth access token authorization:
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const api = new sstk.ImagesApi();

const id = "126351027"; // String | Collection ID

const body = new ShutterstockApiReference.CollectionItemRequest(); // CollectionItemRequest | Array of image IDs to add to the collection


api.addImageCollectionItems(id, body)
  .catch((error) => {
    console.error(error);
  });

Parameters

Name Type Description
id (required) String Collection ID
body (required) CollectionItemRequest Array of image IDs to add to the collection

Accepted authentication

  • OAuth Required scopes:
    • collections.edit

HTTP request headers

  • Content-Type: application/json

Return type

No response body.

ImagesApi.bulkSearchImages

BulkImageSearchResults ImagesApi.bulkSearchImages(body, queryParams)

Run multiple image searches

This endpoint runs up to 5 image searches in a single request and returns up to 20 results per search. You can provide global search parameters in the query parameters and override them for each search in the body parameter. The query and body parameters are the same as in the GET /v2/images/search endpoint.

Example

const sstk = require('shutterstock-api');

// To use HTTP basic authorization:
sstk.setBasicAuth(client_id, client_secret);

// To use OAuth access token authorization:
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const api = new sstk.ImagesApi();

const body = new ShutterstockApiReference.BulkImageSearchRequest(); // BulkImageSearchRequest | List of queries to request results for and filters to apply per query; these values override the defaults in the query parameters

const queryParams = { 
  'added_date': new Date("2021-03-29"), // Date | Show images added on the specified date
  'added_date_start': new Date("2021-03-29"), // Date | Show images added on or after the specified date
  'aspect_ratio_min': 1.7778, // 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': 1.7778, // 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': 1.7778, // 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': new Date("2021-03-29"), // Date | Show images added before the specified date
  'category': "category_example", // String | Show images with the specified Shutterstock-defined category; specify a category name or ID
  'color': "4F21EA", // String | Specify either a hexadecimal color in the format '4F21EA' or 'grayscale'; the API returns images that use similar colors
  'contributor': ["[123456]"], // [String] | Show images with the specified contributor names or IDs, allows multiple
  'contributor_country': "US", // Object | Show images from contributors in one or more specified countries, or start with NOT to exclude a country from the search
  'fields': "fields_example", // String | Fields to display in the response; see the documentation for the fields parameter in the overview section
  'height': 56, // Number | (Deprecated; use height_from and height_to instead) Show images with the specified height
  'height_from': 1080, // Number | Show images with the specified height or larger, in pixels
  'height_to': 1080, // Number | Show images with the specified height or smaller, in pixels
  'image_type': ["photo"], // [String] | Show images of the specified type
  'keyword_safe_search': true, // Boolean | Hide results with potentially unsafe keywords
  'language': "fr", // String | Set query and result language (uses Accept-Language header if not set)
  'license': ["license_example"], // [String] | Show only images with the specified license
  'model': ["[12345, 67890]"], // [String] | Show image results with the specified model IDs
  'orientation': "vertical", // String | Show image results with horizontal or vertical orientation
  'page': 1, // Number | Page number
  'per_page': 20, // Number | Number of results per page
  'people_model_released': true, // Boolean | Show images of people with a signed model release
  'people_age': "20s", // String | Show images that feature people of the specified age category
  'people_ethnicity': ["hispanic"], // [String] | Show images with people of the specified ethnicities, or start with NOT to show images without those ethnicities
  'people_gender': "both", // String | Show images with people of the specified gender
  'people_number': 2, // Number | Show images with the specified number of people
  'region': "US", // Object | 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': true, // Boolean | Enable or disable safe search
  'sort': "popular", // String | Sort by
  'spellcheck_query': true, // Boolean | Spellcheck the search query and return results on suggested spellings
  'view': "minimal", // String | Amount of detail to render in the response
  'width': 56, // Number | (Deprecated; use width_from and width_to instead) Show images with the specified width
  'width_from': 1920, // Number | Show images with the specified width or larger, in pixels
  'width_to': 1920 // Number | Show images with the specified width or smaller, in pixels
};

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

Parameters

Name Type Description
body (required) BulkImageSearchRequest List of queries to request results for and filters to apply per query; these values override the defaults in the query parameters
added_date Date Show images added on the specified date
added_date_start Date 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 Date 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 returns images that use similar colors
contributor [String] Show images with the specified contributor names or IDs, allows multiple
contributor_country Object 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 Number (Deprecated; use height_from and height_to instead) Show images with the specified height
height_from Number Show images with the specified height or larger, in pixels
height_to Number Show images with the specified height or smaller, in pixels
image_type [String] Show images of the specified type

Valid values: "photo", "illustration", "vector"
keyword_safe_search Boolean Hide results with potentially unsafe keywords, defaults to true
language String Set query and result language (uses Accept-Language header if not set)

Valid values: "ar", "bg", "bn", "cs", "da", "de", "el", "en", "es", "fi", "fr", "gu", "he", "hi", "hr", "hu", "id", "it", "ja", "kn", "ko", "ml", "mr", "nb", "nl", "or", "pl", "pt", "ro", "ru", "sk", "sl", "sv", "ta", "te", "th", "tr", "uk", "ur", "vi", "zh", "zh-Hant"
license [String] Show only images with the specified license

Valid values: "commercial", "editorial", "enhanced"
model [String] Show image results with the specified model IDs
orientation String Show image results with horizontal or vertical orientation

Valid values: "horizontal", "vertical"
page Number Page number, defaults to 1
per_page Number Number of results per page, defaults to 20
people_model_released Boolean Show images of people with a signed model release
people_age String Show images that feature people of the specified age category

Valid values: "infants", "children", "teenagers", "20s", "30s", "40s", "50s", "60s", "older"
people_ethnicity [String] Show images with people of the specified ethnicities, or start with NOT to show images without those ethnicities

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

Valid values: "male", "female", "both"
people_number Number Show images with the specified number of people
region Object 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, defaults to true
sort String Sort by, defaults to popular

Valid values: "newest", "popular", "relevance", "random"
spellcheck_query Boolean Spellcheck the search query and return results on suggested spellings, defaults to true
view String Amount of detail to render in the response, defaults to minimal

Valid values: "minimal", "full"
width Number (Deprecated; use width_from and width_to instead) Show images with the specified width
width_from Number Show images with the specified width or larger, in pixels
width_to Number Show images with the specified width or smaller, in pixels

Accepted authentication

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Return type

BulkImageSearchResults

Example response

{
  "results" : [ {
    "data" : [ {
      "id" : "1572478477",
      "aspect" : 1.5,
      "assets" : {
        "preview" : {
          "height" : 300,
          "url" : "https://image.shutterstock.com/display_pic_with_logo/250738318/1572478477/stock-photo-cropped-image-of-woman-gardening-1572478477.jpg",
          "width" : 450
        },
        "small_thumb" : {
          "height" : 67,
          "url" : "https://thumb7.shutterstock.com/thumb_small/250738318/1572478477/stock-photo-cropped-image-of-woman-gardening-1572478477.jpg",
          "width" : 100
        },
        "large_thumb" : {
          "height" : 100,
          "url" : "https://thumb7.shutterstock.com/thumb_large/250738318/1572478477/stock-photo-cropped-image-of-woman-gardening-1572478477.jpg",
          "width" : 150
        },
        "mosaic" : {
          "height" : 167,
          "url" : "https://image.shutterstock.com/image-photo/cropped-image-woman-gardening-250nw-1572478477.jpg",
          "width" : 250
        },
        "huge_thumb" : {
          "height" : 260,
          "url" : "https://image.shutterstock.com/image-photo/cropped-image-woman-gardening-260nw-1572478477.jpg",
          "width" : 390
        },
        "preview_1000" : {
          "url" : "https://ak.picdn.net/shutterstock/photos/1572478477/watermark_1000/1706028c641ea2f443057287c67d9b91/preview_1000-1572478477.jpg",
          "width" : 1000,
          "height" : 667
        },
        "preview_1500" : {
          "url" : "https://image.shutterstock.com/z/stock-photo-cropped-image-of-woman-gardening-1572478477.jpg",
          "width" : 1500,
          "height" : 1000
        }
      },
      "contributor" : {
        "id" : "250738318"
      },
      "description" : "cropped image of woman gardening",
      "image_type" : "photo",
      "has_model_release" : true,
      "media_type" : "image"
    } ],
    "page" : 1,
    "per_page" : 5,
    "search_id" : "749090bb-2967-4a20-b22e-c800dc845e10",
    "spellcheck_info" : { },
    "total_count" : 45
  }, {
    "data" : [ ],
    "page" : 1,
    "per_page" : 5,
    "search_id" : "749090bb-2967-4a20-b22e-c800dc845e11",
    "spellcheck_info" : { },
    "total_count" : 0
  } ]
}

ImagesApi.createImageCollection

CollectionCreateResponse ImagesApi.createImageCollection(body)

Create image collections

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

Example

const sstk = require('shutterstock-api');

// To use OAuth access token authorization:
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const api = new sstk.ImagesApi();

const body = new ShutterstockApiReference.CollectionCreateRequest(); // CollectionCreateRequest | The names of the new collections


api.createImageCollection(body)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Parameters

Name Type Description
body (required) CollectionCreateRequest The names of the new collections

Accepted authentication

  • OAuth Required scopes:
    • collections.edit

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Return type

CollectionCreateResponse

Example response

{
  "id" : "48433105"
}

ImagesApi.deleteImageCollection

ImagesApi.deleteImageCollection(id)

Delete image collections

This endpoint deletes an image collection.

Example

const sstk = require('shutterstock-api');

// To use OAuth access token authorization:
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const api = new sstk.ImagesApi();

const id = "136351027"; // String | Collection ID


api.deleteImageCollection(id)
  .catch((error) => {
    console.error(error);
  });

Parameters

Name Type Description
id (required) String Collection ID

Accepted authentication

  • OAuth Required scopes:
    • collections.edit

HTTP request headers

No request headers required.

Return type

No response body.

ImagesApi.deleteImageCollectionItems

ImagesApi.deleteImageCollectionItems(id, queryParams)

Remove images from collections

This endpoint removes one or more images from a collection.

Example

const sstk = require('shutterstock-api');

// To use OAuth access token authorization:
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const api = new sstk.ImagesApi();

const id = "126351027"; // String | Collection ID

const queryParams = { 
  'item_id': ["item_id_example"] // [String] | One or more image IDs to remove from the collection
};

api.deleteImageCollectionItems(id, queryParams)
  .catch((error) => {
    console.error(error);
  });

Parameters

Name Type Description
id (required) String Collection ID
item_id [String] One or more image IDs to remove from the collection

Accepted authentication

  • OAuth Required scopes:
    • collections.edit

HTTP request headers

No request headers required.

Return type

No response body.

ImagesApi.downloadImage

Url ImagesApi.downloadImage(id, body)

Download images

This endpoint redownloads images that you have already received a license for. The download links in the response are valid for 8 hours.

Example

const sstk = require('shutterstock-api');

// To use OAuth access token authorization:
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const api = new sstk.ImagesApi();

const id = "e123"; // String | License ID

const body = new ShutterstockApiReference.RedownloadImage(); // RedownloadImage | Information about the images to redownload


api.downloadImage(id, body)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Parameters

Name Type Description
id (required) String License ID
body (required) RedownloadImage Information about the images to redownload

Accepted authentication

  • OAuth Required scopes:
    • licenses.view

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Return type

Url

Example response

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

ImagesApi.getFeaturedImageCollection

FeaturedCollection ImagesApi.getFeaturedImageCollection(id, queryParams)

Get the details of featured image collections

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.

Example

const sstk = require('shutterstock-api');

// To use HTTP basic authorization:
sstk.setBasicAuth(client_id, client_secret);

// To use OAuth access token authorization:
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const api = new sstk.ImagesApi();

const id = "136351027"; // String | Collection ID

const queryParams = { 
  'embed': "embed_example", // String | Which sharing information to include in the response, such as a URL to the collection
  'asset_hint': "1x" // String | Cover image size
};

api.getFeaturedImageCollection(id, queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Parameters

Name Type Description
id (required) String Collection ID
embed String Which sharing information to include in the response, such as a URL to the collection

Valid values: "share_url"
asset_hint String Cover image size, defaults to 1x

Valid values: "1x", "2x"

Accepted authentication

HTTP request headers

  • Accept: application/json

Return type

FeaturedCollection

Example response

{
  "total_item_count" : 82,
  "items_updated_time" : "2021-07-08T12:33:37.000Z",
  "name" : "Exercise & Fitness",
  "id" : "19853",
  "created_time" : "2021-07-07T13:10:24.000Z",
  "updated_time" : "2021-07-07T13:10:24.000Z",
  "cover_item" : {
    "url" : "https://ak.picdn.net/assets/cms/b467415246debdab45825d915a548f8f79b57882-Collection_1_Thumnail.jpg"
  }
}

ImagesApi.getFeaturedImageCollectionItems

CollectionItemDataList ImagesApi.getFeaturedImageCollectionItems(id, queryParams)

Get the contents of featured image collections

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

Example

const sstk = require('shutterstock-api');

// To use HTTP basic authorization:
sstk.setBasicAuth(client_id, client_secret);

// To use OAuth access token authorization:
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const api = new sstk.ImagesApi();

const id = "136351027"; // String | Collection ID

const queryParams = { 
  'page': 1, // Number | Page number
  'per_page': 100 // Number | Number of results per page
};

api.getFeaturedImageCollectionItems(id, queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Parameters

Name Type Description
id (required) String Collection ID
page Number Page number, defaults to 1
per_page Number Number of results per page, defaults to 100

Accepted authentication

HTTP request headers

  • Accept: application/json

Return type

CollectionItemDataList

Example response

{
  "data" : [ {
    "id" : "1690105108",
    "added_time" : "2021-07-08T12:33:37.000Z",
    "media_type" : "image"
  }, {
    "id" : "1468703072",
    "added_time" : "2021-07-08T12:31:43.000Z",
    "media_type" : "image"
  } ],
  "page" : 1,
  "per_page" : 2,
  "total_count" : 82
}

ImagesApi.getFeaturedImageCollectionList

FeaturedCollectionDataList ImagesApi.getFeaturedImageCollectionList(queryParams)

List featured image collections

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

Example

const sstk = require('shutterstock-api');

// To use HTTP basic authorization:
sstk.setBasicAuth(client_id, client_secret);

// To use OAuth access token authorization:
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const api = new sstk.ImagesApi();

const queryParams = { 
  'embed': "share_url", // String | Which sharing information to include in the response, such as a URL to the collection
  'type': ["[photo]"], // [String] | The types of collections to return
  'asset_hint': "1x" // String | Cover image size
};

api.getFeaturedImageCollectionList(queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Parameters

Name Type Description
embed String Which sharing information to include in the response, such as a URL to the collection

Valid values: "share_url"
type [String] The types of collections to return

Valid values: "photo", "editorial", "vector"
asset_hint String Cover image size, defaults to 1x

Valid values: "1x", "2x"

Accepted authentication

HTTP request headers

  • Accept: application/json

Return type

FeaturedCollectionDataList

Example response

{
  "data" : [ {
    "total_item_count" : 82,
    "items_updated_time" : "2021-07-08T12:33:37.000Z",
    "name" : "Exercise & Fitness",
    "id" : "19853",
    "created_time" : "2021-07-07T13:10:24.000Z",
    "updated_time" : "2021-07-07T13:10:24.000Z",
    "cover_item" : {
      "url" : "https://ak.picdn.net/assets/cms/b467415246debdab45825d915a548f8f79b57882-Collection_1_Thumnail.jpg"
    }
  } ],
  "page" : 1,
  "per_page" : 5,
  "total_count" : 123455
}

ImagesApi.getImage

Image ImagesApi.getImage(id, queryParams)

Get details about images

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

Example

const sstk = require('shutterstock-api');

// To use HTTP basic authorization:
sstk.setBasicAuth(client_id, client_secret);

// To use OAuth access token authorization:
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const api = new sstk.ImagesApi();

const id = "465011609"; // String | Image ID

const queryParams = { 
  'language': "es", // String | Language for the keywords and categories in the response
  'view': "full", // String | Amount of detail to render in the response
  'search_id': "00000000-0000-0000-0000-000000000000" // String | The ID of the search that is related to this request
};

api.getImage(id, queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Parameters

Name Type Description
id (required) String Image ID
language String Language for the keywords and categories in the response

Valid values: "ar", "bg", "bn", "cs", "da", "de", "el", "en", "es", "fi", "fr", "gu", "he", "hi", "hr", "hu", "id", "it", "ja", "kn", "ko", "ml", "mr", "nb", "nl", "or", "pl", "pt", "ro", "ru", "sk", "sl", "sv", "ta", "te", "th", "tr", "uk", "ur", "vi", "zh", "zh-Hant"
view String Amount of detail to render in the response, defaults to full

Valid values: "minimal", "full"
search_id String The ID of the search that is related to this request

Accepted authentication

HTTP request headers

  • Accept: application/json

Return type

Image

Example response

{
  "id" : "1572478477",
  "aspect" : 1.5,
  "assets" : {
    "preview" : {
      "height" : 300,
      "url" : "https://image.shutterstock.com/display_pic_with_logo/250738318/1572478477/stock-photo-cropped-image-of-woman-gardening-1572478477.jpg",
      "width" : 450
    },
    "small_thumb" : {
      "height" : 67,
      "url" : "https://thumb7.shutterstock.com/thumb_small/250738318/1572478477/stock-photo-cropped-image-of-woman-gardening-1572478477.jpg",
      "width" : 100
    },
    "large_thumb" : {
      "height" : 100,
      "url" : "https://thumb7.shutterstock.com/thumb_large/250738318/1572478477/stock-photo-cropped-image-of-woman-gardening-1572478477.jpg",
      "width" : 150
    },
    "mosaic" : {
      "height" : 167,
      "url" : "https://image.shutterstock.com/image-photo/cropped-image-woman-gardening-250nw-1572478477.jpg",
      "width" : 250
    },
    "huge_thumb" : {
      "height" : 260,
      "url" : "https://image.shutterstock.com/image-photo/cropped-image-woman-gardening-260nw-1572478477.jpg",
      "width" : 390
    },
    "preview_1000" : {
      "url" : "https://ak.picdn.net/shutterstock/photos/1572478477/watermark_1000/1706028c641ea2f443057287c67d9b91/preview_1000-1572478477.jpg",
      "width" : 1000,
      "height" : 667
    },
    "preview_1500" : {
      "url" : "https://image.shutterstock.com/z/stock-photo-cropped-image-of-woman-gardening-1572478477.jpg",
      "width" : 1500,
      "height" : 1000
    }
  },
  "contributor" : {
    "id" : "250738318"
  },
  "description" : "cropped image of woman gardening",
  "image_type" : "photo",
  "has_model_release" : true,
  "media_type" : "image",
  "original_filename" : "123.jpg"
}

ImagesApi.getImageCollection

Collection ImagesApi.getImageCollection(id, queryParams)

Get the details of image collections

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.

Example

const sstk = require('shutterstock-api');

// To use OAuth access token authorization:
sstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);

const api = new sstk.ImagesApi();

const id = "126351027"; // String | Collection ID

const queryParams = { 
  'embed': ["embed_example"], // [String] | Which sharing information to include in the response, such as a URL to the collection
  'share_code': "share_code_example" // String | Code to retrieve a shared collection
};

api.getImageCollection(id, queryParams)
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

Parameters

Name Type Description
id (required) String Collection ID
embed [String] Which sharing information to include in the response, such as a URL to the collection

Valid values: "share_code", "share_url"
share_code String Code to retrieve a shared collection

Accepted authentication

  • OAuth Required scopes:
    • collections.view

HTTP request headers

  • Accept: application/json

Return type

Collection

Example response

{
  "id" : "293542904",
  "name" : "My collection",
  "total_item_count" : 85,
  "items_updated_time" : "2021-05-20T16:15:22-04:00",
  "cover_item" : {
    "id" : "297886754"
  }
}

ImagesApi.getImageCollectionItems

CollectionItemData