Amazon Data API User Guide
Table of Contents
Last Updated Date: 2024/8/27
I. Product Overview
This product primarily provides the latest data (within 24 hours) from Amazon web pages through an API, receiving the data types and parameters required by the client. The types of data provided include: product category data, merchant data, and detailed product information data.
Supported sites: US, UK, Germany, France, etc.
II. Getting Started
Since this product is provided through an API, it involves two steps: data task creation and data reception, with request examples provided in languages such as Shell, Python, Golang, etc.
The time from data task creation to data reception is generally within 3 minutes.
We can also add data fields and increase the data refresh frequency according to client needs.
III. Product Features
This product provides three types of data from Amazon web pages.
1. Product Category Data
Retrieve information on similar products based on product categories, including but not limited to price, ratings, etc.
2. Merchant Data
Retrieve merchant product information based on the merchant ID, including but not limited to price, ratings, etc.
3. Product Detail Data
Retrieve product information based on the ASIN, including but not limited to title, price, ratings, reviews, image links, product dimensions, product weight, merchant ID, first release date, product category, etc.
IV. User Guide
1. Create Data Task Based on Product Category
Brief Description
- Create a data task based on product category.
Request URL
http://scrape.pangolinfo.com/api/custom/task/category/receive?token=xxx
Request Method
POST
Headers
Content-Type: application/json
Parameters
Parameter Name | Required | Type | Description | Example |
---|---|---|---|---|
url | Yes | string | URL of the page to scrape | https://www.amazon.co.uk/b?node=4224879031&language=en_GB |
site | Yes | string | Site to scrape (US, UK, DE) | "UK" |
callbackUrl | Yes | string | URL to receive the data | https://xxx.xxx.xxx.xxx:xx/callback |
Input Example
{
"url": "https://www.amazon.co.uk/b?node=4224879031&language=en_GB",
"site": "UK",
"callbackUrl": "https://xxx.xxx.xxx.xxx:xx/callback"
}
Response Example:
{
"code": 0,
"message": "ok",
"data": {
"data": "e5b5952c20cc499cb7939613e440bd7b",
"bizCode": 0,
"bizMsg": "ok"
}
}
Shell Example:
#! /bin/bash
curl --location 'http://scrape.pangolinfo.com/api/custom/task/category/receive?token=xxxx' \
--header 'Content-Type: application/json' \
--data '{"url":"https://www.amazon.co.uk/b?node=4224879031&language=en_GB","site":"UK","callbackUrl": "https://xxx.xxx.xxx.xxx:xx/callback"}'
Python Example:
import requests
import json
url = "http://scrape.pangolinfo.com/api/custom/task/category/receive"
headers = {
"Content-Type": "application/json",
}
params = {
"token": "xxxx",
}
data = {
"url": "https://www.amazon.co.uk/b?node=4224879031&language=en_GB"
"site": "UK",
"callbackUrl": "https://xxx.xxx.xxx.xxx:xx/callback"
}
response = requests.request(
method="POST",
url=url,
headers=headers,
params=params,
data=json.dumps(data)
)
print(response.text)
Golang Example:
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
)
type Request struct {
URL string `json:"url"`
Site string `json:"site"`
CallbackUrl string `json:"callbackUrl"`
}
func main() {
url := "http://scrape.pangolinfo.com/api/custom/task/category/receive?token=xxxx"
request := Request{
URL: "https://www.amazon.co.uk/b?node=4224879031&language=en_GB",
Site: "UK",
CallbackUrl: https://xxx.xxx.xxx.xxx:xx/callback",
}
reqBody, err := json.Marshal(request)
if err != nil {
log.Fatal(err)
}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(reqBody))
if err != nil {
log.Fatal(err)
}
req.Header.Add("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
respBody, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Println(string(respBody))
}
2. Create Data Task Based on Merchant
Brief Description
- Create a data task based on a merchant.
Request URL
http://scrape.pangolinfo.com/api/custom/task/seller/receive?token=xxxx
Request Method
POST
Headers
Content-Type: application/json
Parameters
Parameter Name | Required | Type | Description | Example |
---|---|---|---|---|
url | Yes | string | URL of the page to scrape | https://www.amazon.co.uk/s?me=AM4IB6PKMNCWD&marketplaceID=A1F83G8C2ARO7P |
site | Yes | string | Site to scrape (US, UK, DE) | "UK" |
callbackUrl | Yes | string | URL to receive the data | https://xxx.xxx.xxx.xxx:xx/callback |
Input Example
{
"url": "https://www.amazon.co.uk/s?me=AM4IB6PKMNCWD&marketplaceID=A1F83G8C2ARO7P",
"site": "UK",
"callbackUrl": "https://xxx.xxx.xxx.xxx:xx/callback"
}
Response Example:
{
"code": 0,
"message": "ok",
"data": {
"data": "e5b5952c20cc499cb7939613e440bd7b",
"bizCode": 0,
"bizMsg": "ok"
}
}
Shell Example:
#! /bin/bash
curl --location 'http://scrape.pangolinfo.com/api/custom/task/seller/receive?token=xxxx' \
--header 'Content-Type: application/json' \
--data '{"url": "https://www.amazon.co.uk/s?me=AM4IB6PKMNCWD&marketplaceID=A1F83G8C2ARO7P","site":"UK","callbackUrl": "https://xxx.xxx.xxx.xxx:xx/callback"}'
Python Example:
import requests
import json
url = "http://scrape.pangolinfo.com/api/custom/task/seller/receive"
headers = {
"Content-Type": "application/json",
}
params = {
"token": "xxxx",
}
data = {
"url": "https://www.amazon.co.uk/s?me=AM4IB6PKMNCWD&marketplaceID=A1F83G8C2ARO7P",
"site": "UK",
"callbackUrl": "https://xxx.xxx.xxx.xxx:xx/callback"
}
response = requests.request(
method="POST",
url=url,
headers=headers,
params=params,
data=json.dumps(data)
)
print(response.text)
Golang Example:
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
)
type Request struct {
URL string `json:"url"`
Site string `json:"site"`
CallbackUrl string `json:"callbackUrl"`
}
func main() {
url := "http://scrape.pangolinfo.com/api/custom/task/seller/receive?token=xxxx"
request := Request{
URL: "https://www.amazon.co.uk/s?me=AM4IB6PKMNCWD&marketplaceID=A1F83G8C2ARO7P",
Site: "UK",
CallbackUrl: https://xxx.xxx.xxx.xxx:xx/callback",
}
reqBody, err := json.Marshal(request)
if err != nil {
log.Fatal(err)
}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(reqBody))
if err != nil {
log.Fatal(err)
}
req.Header.Add("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
respBody, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Println(string(respBody))
}
3. Create Product Detail Data Task
Brief Description
- Create a product detail data task.
Request URL
http://scrape.pangolinfo.com/api/custom/task/product/receive?token=xxxx
Request Method
POST
Headers
Content-Type: application/json
Parameters
Parameter Name | Required | Type | Description | Example |
---|---|---|---|---|
site | Yes | string | Site to scrape (US, UK, DE) | "UK" |
url | Yes | string | Web page link | https://www.amazon.co.uk/dp/B0D8KPRWFV |
callbackUrl | Yes | string | URL to receive the data | https://xxx.xxx.xxx.xxx:xx/callback |
Input Example
{
"site": "UK",
"url": "https://www.amazon.co.uk/dp/B0D8KPRWFV",
"callbackUrl": "https://xxx.xxx.xxx.xxx:xx/callback"
}
Response Example:
{
"code": 0,
"message": "ok",
"data": {
"data": "e5b5952c20cc499cb7939613e440bd7b",
"bizCode": 0,
"bizMsg": "ok"
}
}
Shell Example:
#! /bin/bash
curl --location 'http://scrape.pangolinfo.com/api/custom/task/product/receive?token=xxxx' \
--header 'Content-Type: application/json' \
--data '{"site":"UK","url": "https://www.amazon.co.uk/dp/B0D8KPRWFV","callbackUrl": "https://xxx.xxx.xxx.xxx:xx/callback"}'
Python Example:
import requests
import json
url = "http://scrape.pangolinfo.com/api/custom/task/product/receive"
headers = {
"Content-Type": "application/json",
}
params = {
"token": "xxxx",
}
data = {
"site": "UK",
"url": "https://www.amazon.co.uk/dp/B0D8KPRWFV",
"callbackUrl": "https://xxx.xxx.xxx.xxx:xx/callback"
}
response = requests.request(
method="POST",
url=url,
headers=headers,
params=params,
data=json.dumps(data)
)
print(response.text)
Golang Example:
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
)
type Request struct {
Site string `json:"site"`
URL string `json:"url"`
CallbackUrl string `json:"callbackUrl"`
}
func main() {
url := "http://scrape.pangolinfo.com/api/custom/task/product/receive?token=xxxx"
request := Request{
Site: "UK",
URL: "https://www.amazon.co.uk/dp/B0D8KPRWFV",
CallbackUrl: "https://xxx.xxx.xxx.xxx:xx/callback",
}
reqBody, err := json.Marshal(request)
if err != nil {
log.Fatal(err)
}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(reqBody))
if err != nil {
log.Fatal(err)
}
req.Header.Add("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
respBody, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Println(string(respBody))
}
Receiving Service Example
Need help?
We are devoted to your success, don't hestitate to contact us for any kind of questions!
Our team of experts is committed to helping you troubleshoot and fix any issue that you might experience with our products.
If you want to file a bug report or need technical assistance, be sure to reach our support team by sending us an email. Or consult technical documentation.[Amazon Data API User Guide] | [Scrape API User Guide]