POST /amazon/serp

Returns the search result page in the desired format using as input the target keyword, page and marketplace.

Request Headers

X-API-Key: your_api_key_here
Accept-Encoding: gzip
Content-Type: application/json

We highly recommend using the Accept-Encoding: gzip header when you request html format as it will improve latency and performance by compressing the response.

Query Parameters

  • marketplace (required, string) - Amazon marketplace in ISO 3166-1 alpha-2. (Note that UK is “uk” not “gb”)

  • keyword (required, string) - Amazon search keyword query

  • page (optional, int, default: 1) - Amazon search pagination

  • settings (optional, obj)

    • session_id (optional, string) - (Only for page 2+) Specify the session id to ensure location matching at page level.

    • format (optional, enum, default: "json") - (Values: ”html”, ”json”) Specify the response formatting.

Responses Codes

Status: 200 OK
Status: 400 Bad Request
Status: 401 Unauthorized
Status: 500 Internal Server Error

Request Payload Example (JSON)

{
  "marketplace": "us",
  "keyword": "cat toys"
}

Response Example (JSON)

{
  "ts": 1724767659402,
  "rid": "57d74536-a1cf-4285-bc4e-0398b6c75f8d",
  "params": {
    "marketplace": "us",
    "keyword": "cat toys",
    "page": 1,
    "settings": {
      "session_id": "f9ac2370-c2a9-4f18-9a1c-5d2b6da57e48"
    }
  },
  "result": {
    "asin_count": 60,
    "spons_count": 12,
    "total_results": 7913,
    "delivery_to": "Delivering to Nashville 37217",
    "related_keywords": [
      "cat tree",
      "cat tower",
      "cat bed",
      "cat",
      "cat scratching post",
      "cat litter box"
    ],
    "products": [
      {
        "asin": "B07X27VK3D",
        "title": "Blink Mini – Compact indoor plug-in smart security camera, 1080p HD video, night vision, motion detection, two-way audio, easy set up, Works with Alexa – 2 cameras (White)",
        "image_url": "https://m.media-amazon.com/images/I/31k0hI-y8pL._AC_UL320_.jpg",
        "price": "$39.98",
        "rank": 1,
        "rating": 4.4,
        "reviews": 290384,
        "is_sponsored": true
      },
      {
        "asin": "B07F45GGPT",
        "title": "Interactive Cat Toys - Retractable Wand Toy and Feather Toys Refills for Indoor Cats to Chase and Exercise",
        "image_url": "https://m.media-amazon.com/images/I/615Ccf+wziL._AC_UL320_.jpg",
        "price": "$8.99",
        "rank": 2,
        "rating": 4.6,
        "reviews": 38805,
        "is_sponsored": true,
        "is_best_seller": true
      },
      ... // Continues
    ]
  }
}

Request Payload Example (HTML)

{
  "marketplace": "us",
  "keyword": "hair brush",
  "settings": {
    "format": "html"
  }
}

Response Example (HTML)

{
  "ts": 1719447982851,
  "rid": "1150b044-639a-411f-a39e-b84347b4bcaf",
  "params": {
    "marketplace": "us",
    "keyword": "hair brush",
    "page": 1,
    "settings": {
      "session_id": "931cf317-4ce2-4da9-b651-67c332937f94",
      "format": "html"
    }
  },
  "result": {
    "asin_count": 60,
    "spons_count": 12,
    "total_results": 8111,
    "delivery_to": "Delivering to Forest 39074",
    "data": "<!DOCTYPE html><html lang=\"en-us\" ..."
  }
}

Page-Level Location Matching

To achieve page level location matching, just send back the session_id you've received in the response of the first page as parameter in the json payload for the next request.

Use them only for crawling the next page (2+).

If you send a session_id on first page, it will be automatically ignored to prevent abuse.

Example request to match the location for page 2:

{
  "marketplace": "us",
  "keyword": "hair brush",
  "page": 2,
  "settings": {
    // Set session_id same as the previous page response
    "session_id": "931cf317-4ce2-4da9-b651-67c332937f94", 
    "format": "html"
  }
}

Example response:

{
  "ts": 1719448787602,
  "rid": "1250b044-639a-411f-a39e-b84347b4bcaf",
  "params": {
    "marketplace": "us",
    "keyword": "hair brush",
    "page": 2,
    "settings": {
      "session_id": "931cf317-4ce2-4da9-b651-67c332937f94",
      "format": "html"
    }
  },
  "result": {
    "asin_count": 60,
    "spons_count": 12,
    "total_results": 8113,
    "delivery_to": "Delivering to Forest 39074", // Matched with previous page.
    "data": "<!DOCTYPE html><html lang=\"en-us\"..."
  }
}

Last updated