This project is a comprehensive edge API for Amazon. It supports search and product endpoints. The search endpoint allows you to search for products on Amazon. The product endpoint allows you to get product details by ASIN. This API supports both REST
and GraphQL
endpoints.
1. May 5, 2024 - Amazon blocked Cloudflare ASN
It seems like Amazon has blocked Cloudflare ASN. So, the API will work in development mode only. It uses hono, so it is possible to deploy the project on any other cloud provider.
2. May 5, 2024 - Don't use the hosted API
Please don't use the hosted API. Deploy your own instance of the project. The hosted API is for demonstration purposes only. The hosted API may be taken down at any time.
3. May 5, 2024 - V2 is here
I rewrite the full project from scratch. The new version is written in TypeScript and uses Cloudflare Workers. This version is faster and more reliable and also supports GraphQL.
Changes:
- Rewrite the full project in TypeScript
- Used Hono
- Add GraphQL support
- Add support for multiple country versions of Amazon
- Add support for pagination
Cheers π
- Support multiple country versions of Amazon
- Search for products on Amazon
- Get product details by ASIN
- Supports both REST and GraphQL endpoints
- Supports pagination
- Cloudflare Workers
- Hono
- TypeScript
- GraphQL
- REST
Path | Method | Description | Try it out |
---|---|---|---|
/api/[country]/search | GET |
The country code of the Amazon website | Try it out |
/api/[country]/product/[asin] | GET |
The country code of the Amazon website | Try it out |
- The graphql endpoint is available at
/graphql
. - Try out the playground at /graphql/playground.
Country | Code | Base URL | Implementation |
---|---|---|---|
India | in | amazon.in | Full β
|
USA | us | amazon.com | Partial π§ |
England | uk | amazon.co.uk | Partial π§ |
Canada | ca | amazon.ca | Partial π§ |
Germany | de | amazon.de | Partial π§ |
France | fr | amazon.fr | Partial π§ |
Italy | it | amazon.it | Partial π§ |
EspaΓ±a | es | amazon.es | Partial π§ |
Australia | au | amazon.com.au | Partial π§ |
Japan | jp | amazon.co.jp | Partial π§ |
Brazil | br | amazon.com.br | Partial π§ |
Saudi Arabia | sa | amazon.sa | Partial π§ |
UAE | ae | amazon.ae | Partial π§ |
Accroding to some website it is not illegal to scrape public data from Amazon. I am not responsible for any misuse of this API. Use it at your own risk. This project comply with these terms:
- Not making excessive requests to Amazon website
- Not interfering with Amazonβs website or services
- Not using Amazonβs trademarks or logos
Are you from Amazon? and want to take down this project? Sure, I will happy to do that. Well, see the new version of the project was written just to test, how fast I can write a production ready scraper (BTW it took 3 hours only). So my mission was accomplished. Just create an issue and I will make this project private.