GithubHelp home page GithubHelp logo

musabatas / amazon-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tuhinpal/amazon-api

0.0 0.0 0.0 75 KB

Serverless Amazon Search and Product API, runs on Cloudflare worker. Supports multiple country's amazon version.

Home Page: https://amazon-api.tprojects.workers.dev

TypeScript 100.00%

amazon-api's Introduction

Amazon API

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.

Changelog πŸ””

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 πŸŽ‰

Features πŸ“–

  • Support multiple country versions of Amazon
  • Search for products on Amazon
  • Get product details by ASIN
  • Supports both REST and GraphQL endpoints
  • Supports pagination

Tech Stack πŸ’»

  • Cloudflare Workers
  • Hono
  • TypeScript
  • GraphQL
  • REST

REST API 🌐

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

GraphQL API 🌐

  • The graphql endpoint is available at /graphql.
  • Try out the playground at /graphql/playground.

Deployment πŸš€

Deploy to Cloudflare Workers

Implented country versions 🌍

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 🚧

Legal Disclaimer βš–οΈ

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.

amazon-api's People

Contributors

tuhinpal avatar dvishal485 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.