{"id":28412468,"url":"https://github.com/scaleleap/amazon-marketplaces","last_synced_at":"2025-07-28T07:09:23.289Z","repository":{"id":35124735,"uuid":"209804541","full_name":"ScaleLeap/amazon-marketplaces","owner":"ScaleLeap","description":"A collection of Amazon Marketplace data objects.","archived":false,"fork":false,"pushed_at":"2025-07-28T01:02:26.000Z","size":6494,"stargazers_count":14,"open_issues_count":7,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-28T03:06:54.109Z","etag":null,"topics":["amazon","amazon-advertising","amazon-advertising-api","amazon-marketplace","api","marketplace"],"latest_commit_sha":null,"homepage":"https://npm.im/@scaleleap/amazon-marketplaces","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ScaleLeap.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-09-20T14:03:37.000Z","updated_at":"2025-07-28T01:02:28.000Z","dependencies_parsed_at":"2024-04-01T04:31:38.519Z","dependency_job_id":"7b8eb560-cf43-440d-90b3-4cae79f3c697","html_url":"https://github.com/ScaleLeap/amazon-marketplaces","commit_stats":{"total_commits":606,"total_committers":14,"mean_commits":"43.285714285714285","dds":0.4620462046204621,"last_synced_commit":"28de4098a56094aa787b5108c2199b4a9daa13c9"},"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/ScaleLeap/amazon-marketplaces","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleLeap%2Famazon-marketplaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleLeap%2Famazon-marketplaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleLeap%2Famazon-marketplaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleLeap%2Famazon-marketplaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScaleLeap","download_url":"https://codeload.github.com/ScaleLeap/amazon-marketplaces/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleLeap%2Famazon-marketplaces/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267476283,"owners_count":24093471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon","amazon-advertising","amazon-advertising-api","amazon-marketplace","api","marketplace"],"created_at":"2025-06-02T22:16:52.396Z","updated_at":"2025-07-28T07:09:23.268Z","avatar_url":"https://github.com/ScaleLeap.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Amazon Marketplace Logo](https://raw.githubusercontent.com/ScaleLeap/amazon-marketplaces/master/amazon-marketplace.png)\n\n@scaleleap/amazon-marketplaces\n=======================================\n\nA collection of [Amazon Marketplace](https://en.wikipedia.org/wiki/Amazon_Marketplace) data objects.\n\nThis package is written in TypeScript and is fully typed.\n\n---\n\nThis package combines data about Amazon Marketplace (the consumer side of Amazon) into\na structured class.\n\n### Available Marketplace Data\n\n* ID (e.g. `A2EUQ1WTGCTBG2`)\n* Country code (ISO 3166-1) (e.g. `CA`)\n* Amazon marketplace time zone (e.g. `America/Los_Angeles`)\n* Currency code (ISO 4217) (e.g. `CAD`)\n* Name (country name) (e.g. `Canada`)\n* URI (e.g. `https://www.amazon.ca/`)\n* Amazon Marketplace Web Service (Amazon MWS) endpoint URI\n* Amazon Advertising\n  * API endpoint URI\n  * Sponsored products\n    * Minimum bid\n    * Maximum bid\n  * Sponsored Brands\n    * Minimum bid\n    * Maximum bid\n  * Account time zone\n* Amazon Selling Partner API\n  * Selling Partner Region\n  * API endpoint URI\n  * Seller Central endpoint URI (used for SP Auth)\n\n### Code Demo\n\n#### Enum of Amazon Marketplace Data\n\n```ts\nimport { amazonMarketplaces } from '@scaleleap/amazon-marketplaces'\n\nconst { CA } = amazonMarketplaces\n\nconsole.log('Amazon Marketplace %s uses currency %s.', CA.name, CA.currency)\n```\n\n#### List of Amazon Marketplace Data\n\nSometimes it is more ergonomic to iterate over an array of marketplaces.\nAnd that is where `amazonMarketplacesList` may come handy.\n\n```ts\nimport { amazonMarketplacesList } from '@scaleleap/amazon-marketplaces'\n\nconst marketplaceIds = amazonMarketplacesList.map(marketplace =\u003e marketplace.id)\n```\n\n#### Utility Functions\n\n```ts\nimport {\n  findAmazonMarketplace,\n  findAmazonMarketplaceOrFail,\n  AmazonMarketplaceCountryCode\n} from '@scaleleap/amazon-marketplaces'\n\n// Return value *can* be undefined\nconst CA = findAmazonMarketplace('countryCode', AmazonMarketplaceCountryCode.CA)\n\n// Function will throw an error if marketplace is not found\n// Thus return value is never undefined.\nconst US = findAmazonMarketplaceOrFail('countryCode', AmazonMarketplaceCountryCode.US)\n\n// TypeScript assertion functions that ensure that the marketplace has advertising / selling partner enabled.\n// Throws if not.\nassertMarketplaceHasAdvertising(CA)\nassertMarketplaceHasSellingPartner(CA)\n\n// CA.advertising is now type guarded and can be safely accessed.\nconsole.log(CA.advertising.countryCode)\n```\n\n### Full Data Object Example\n\n```json\n{\n  \"countryCode\": \"CA\",\n  \"timeZone\": \"America/Los_Angeles\",\n  \"currency\": \"CAD\",\n  \"id\": \"A2EUQ1WTGCTBG2\",\n  \"name\": \"Canada\",\n  \"uri\": \"https://www.amazon.ca\",\n  \"webServiceUri\": \"https://mws.amazonservices.ca\",\n  \"advertising\": {\n    \"countryCode\": \"CA\",\n    \"timeZone\": \"America/Los_Angeles\",\n    \"region\": {\n      \"accessTokenUri\": \"https://api.amazon.com/auth/o2/token\",\n      \"authorizationUri\": \"https://www.amazon.com/ap/oa\",\n      \"code\": \"NA\",\n      \"endpoint\": \"https://advertising-api.amazon.com\",\n      \"name\": \"North America\",\n    },\n    \"bids\": {\n      \"sponsoredBrands\": {\n        \"min\": 10,\n        \"max\": 4900\n      },\n      \"sponsoredProducts\": {\n        \"min\": 2,\n        \"max\": 100000\n      }\n    },\n  },\n  \"sellingPartner\": {\n    \"region\": {\n      \"awsRegion\": \"us-east-1\",\n      \"code\": \"NA\",\n      \"endpoint\": \"https://sellingpartnerapi-na.amazon.com\",\n      \"name\": \"North America\",\n    },\n    \"sellerCentralAuthUri\": \"https://sellercentral.amazon.com\"\n  }\n}\n```\n\nYou may also view the [Jest snapshot data](tests/__snapshots__/marketplaces.test.ts.snap) for the fully rendered data object examples.\n\n### Download \u0026 Installation\n\n```sh\n$ npm i -s @scaleleap/amazon-marketplaces\n```\n\n### Contributing\n\nIf you find any other data that can be added, please open an issue and let us know.\n\nNote that this repository uses [Conventional Commit](https://www.conventionalcommits.org/)\nstyle commit messages.\n\nIf a new marketplace is added, this should be marked as breaking change and increase the major\nversion, because others may rely on iterating over the available marketplaces.\n\n### Original Data Sources\n\n* [Amazon Advertising API](https://advertising.amazon.com/API/docs/en-us/get-started/how-to-use-api)\n* [Amazon Marketplace Web Service](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_Endpoints.html)\n* [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)\n* [ISO 3166](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)\n* [Regional profile time zone codes](https://advertising.amazon.com/API/docs/en-us/reference/2/profiles#regional-profile-time-zone-codes)\n* [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)\n* [Selling Partner API endpoints](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/developer-guide/SellingPartnerApiDeveloperGuide.md#selling-partner-api-endpoints)\n\n### Authors or Acknowledgments\n\n* Roman Filippov ([Scale Leap](https://www.scaleleap.com))\n\n### License\n\nThis project is licensed under the MIT License.\n\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FScaleLeap%2Famazon-marketplaces.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FScaleLeap%2Famazon-marketplaces?ref=badge_large)\n\n### Badges\n\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ScaleLeap/amazon-marketplaces/CI)](https://github.com/ScaleLeap/amazon-marketplaces/actions)\n[![NPM](https://img.shields.io/npm/v/@scaleleap/amazon-marketplaces)](https://npm.im/@scaleleap/amazon-marketplaces)\n[![License](https://img.shields.io/npm/l/@scaleleap/amazon-marketplaces)](./LICENSE)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FScaleLeap%2Famazon-marketplaces.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FScaleLeap%2Famazon-marketplaces?ref=badge_shield)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleleap%2Famazon-marketplaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscaleleap%2Famazon-marketplaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleleap%2Famazon-marketplaces/lists"}