{"id":40556,"library":"amazon-creators-api","title":"Amazon Creators API Node.js SDK","description":"Unofficial TypeScript wrapper for the Amazon Creators API (affiliate program). Current stable version is 1.2.2, requiring Node.js >=18. Provides proper TypeScript types and a typed API (TypedDefaultApi) over Amazon's JavaScript runtime internals. Key differentiators: fully typed, ESM-first, simplifies authentication and request building for GetItems and other Creators API operations.","status":"active","version":"1.2.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","amazon","creators-api","sdk","api-client","typescript"],"install":[{"cmd":"npm install amazon-creators-api","lang":"bash","label":"npm"},{"cmd":"yarn add amazon-creators-api","lang":"bash","label":"yarn"},{"cmd":"pnpm add amazon-creators-api","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only package; CJS require() works but is not recommended.","wrong":"const ApiClient = require('amazon-creators-api').ApiClient","symbol":"ApiClient","correct":"import { ApiClient } from 'amazon-creators-api'"},{"note":"Named export, not default.","wrong":"import GetItemsRequestContent from 'amazon-creators-api'","symbol":"GetItemsRequestContent","correct":"import { GetItemsRequestContent } from 'amazon-creators-api'"},{"note":"Main typed API class.","symbol":"TypedDefaultApi","correct":"import { TypedDefaultApi } from 'amazon-creators-api'"},{"note":"Enum named GetItemsResource, not GetItemsResourceEnum.","wrong":"import { GetItemsResourceEnum } from 'amazon-creators-api'","symbol":"GetItemsResource","correct":"import { GetItemsResource } from 'amazon-creators-api'"}],"quickstart":{"code":"import { ApiClient, GetItemsRequestContent, GetItemsResource, TypedDefaultApi } from 'amazon-creators-api';\n\nconst apiClient = new ApiClient();\napiClient.credentialId = process.env.CREDENTIAL_ID ?? '';\napiClient.credentialSecret = process.env.CREDENTIAL_SECRET ?? '';\napiClient.version = process.env.CREDENTIAL_VERSION ?? '';\n\nconst api = new TypedDefaultApi(apiClient);\n\nasync function getItems(): Promise<void> {\n  const marketplace = 'www.amazon.com';\n  const partnerTag = process.env.PARTNER_TAG ?? '';\n  const itemIds: string[] = ['B0DLFMFBJW', 'B0BFC7WQ6R', 'B00ZV9RDKK'];\n  const request = new GetItemsRequestContent(partnerTag, itemIds);\n  const resources = [\n    'images.primary.medium',\n    'itemInfo.title',\n    'itemInfo.features',\n    'offersV2.listings.price',\n    'offersV2.listings.availability',\n    'offersV2.listings.condition',\n    'offersV2.listings.merchantInfo',\n  ].map(r => GetItemsResource.constructFromObject(r));\n  request.resources = resources;\n  try {\n    const response = await api.getItems(marketplace, request);\n    console.log('Response:', JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error('Error:', err);\n  }\n}\ngetItems();","lang":"typescript","description":"Initializes the Creators API client, authenticates with credentials from environment variables, and fetches product details for a list of ASINs."},"warnings":[{"fix":"Set properties manually or wrap with a config function.","message":"All credential fields (credentialId, credentialSecret, version) must be set before making API calls; they are not automatically read from env vars.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use the version string provided in your Creators API credentials.","message":"The 'version' property corresponds to 'Credential Version' from the dashboard, not API version.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Call constructFromObject on each resource string.","message":"GetItemsResource.constructFromObject() expects a string like 'images.primary.medium' – do not pass it as a resource enum value directly.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade Node.js to 18+ or use a polyfill.","message":"Requires Node.js >=18 due to use of global fetch.","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.2.2':20 '18':23 'affili':14 'amazon':1,11,34,59 'api':3,13,31,56,62,65 'api-cli':64 'authent':47 'build':50 'client':66 'creator':2,12,55,61 'creators-api':60 'current':16 'differenti':40 'esm':44 'esm-first':43 'first':45 'fulli':41 'getitem':52 'intern':38 'javascript':36,58 'key':39 'node.js':4,22 'oper':57 'program':15 'proper':25 'provid':24 'request':49 'requir':21 'runtim':37 'sdk':5,63 'simplifi':46 'stabl':17 'type':27,30,42 'typeddefaultapi':32 'typescript':7,26,67 'unoffici':6 'version':18 'wrapper':8","created_at":"2026-06-04T18:48:09.406621+00:00","updated_at":"2026-06-04T18:48:09.406621+00:00","problems":[{"fix":"Ensure you create a new ApiClient() and set credentialId, credentialSecret, and version.","cause":"ApiClient instance is not properly instantiated or credentials are not set.","error":"TypeError: Cannot read properties of undefined (reading 'credentialId')"},{"fix":"Provide a valid marketplace string (e.g., 'www.amazon.com') as first argument to getItems().","cause":"Marketplace parameter is missing in API call.","error":"Error: A required parameter marketplace was not specified"},{"fix":"Check your Amazon affiliate tracking ID and pass it correctly as the first argument to GetItemsRequestContent.","cause":"Partner tag is invalid or not provided.","error":"Error: Invalid partner tag"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"amazon-creators-api","openapi_spec":null,"status_page":null,"smithery":null,"categories":["ecommerce"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}