The `gettyimages-api` package provides an official Node.js SDK for interacting with the Getty Images API, simplifying common tasks such as searching for creative and editorial images, retrieving image and video metadata, and managing media downloads. It handles credential management, including access token refresh, and employs a fluent API style for constructing requests. The current stable version is 6.5.4, released recently on April 17, 2026. While there isn't a fixed release cadence, updates are regularly pushed, often addressing dependency vulnerabilities, minor bug fixes, or adding small feature enhancements. Key differentiators include its direct support and maintenance by Getty Images, streamlined authentication and token management, and a fluent API design that abstracts away raw HTTP requests and complex URL construction, making API interaction more developer-friendly compared to manual integration.
npm install gettyimages-apiVerified import paths — ran on the pinned version, not inferred.
Demonstrates initializing the Getty Images API client and performing a creative image search using environment variables for credentials.
Upgrade your Node.js installation to version 14.20.1 or newer.
Add `"type": "module"` to your `package.json` file. If you are strictly using CommonJS, ensure your file extension is `.cjs` or `package.json` does NOT have `"type": "module"` and use `require` (though not recommended).
Instantiate the client once at application startup. Always use `await` before `client.someMethod().execute();`.
Review existing editorial search implementations and update any date-related parameters to `date_from` and `date_to`.
Upgrade to `gettyimages-api` version 6.2.1 or newer immediately to mitigate the CVE.
If manually managing or passing tokens, ensure you are on version 6.5.1 or newer to benefit from improved token expiration handling.
Ensure `"type": "module"` is set in your `package.json` and use `import api from 'gettyimages-api';`. If you must use CommonJS in a mixed environment, ensure your file extension is `.cjs`.
Double-check your `apiKey` and `apiSecret` credentials for correctness. Ensure they are active in your Getty Images developer account and have access to the specific API services you are trying to use.
Ensure `const client = new api(creds);` is correctly instantiated and that all subsequent chained API calls (e.g., `client.searchimagescreative().withPage().execute()`) are `await`ed before trying to access results.