Scrapingdog
HomePricingSupportLogin
  • Documentation
  • Web Scraping API
    • Request Customization
      • Javascript Rendering
        • Wait when rendering Javascript
      • Custom Headers
      • Premium Residential Proxies
      • Geotargeting
      • Sessions
  • POST Request
  • Google Search Scraper API
    • Google Country Parameter: Supported Google Countries
    • Supported Google Countries via cr parameter
    • Google Domains Page
    • Google Language Page
    • Google LR Language Page
  • Google AI Overview API
  • Google Maps API
    • Google Maps Posts API
    • Google Maps Photos API
    • Google Maps Reviews API
    • Google Maps Places API
  • Google Trends API
    • Google Trends Autocomplete API
    • Google Trends Trending Now API
  • Google Images API
  • Google News API
    • Google News API 2.0
  • Google Shopping API
  • Google Product API
  • Google Videos API
  • Google Shorts API
  • Google Autocomplete API
  • Google Scholar API
    • Google Scholar Profiles API
    • Google Scholar Author API
      • Google Scholar Author Citation API
    • Google Scholar Cite API
  • Google Finance API
  • Google Lens API
  • Google Jobs API
  • Google Local API
  • Google Patents API
    • Google Patent Details API
  • Bing Search Scraper API
  • Amazon Scraper API
    • Amazon Product Scraper
    • Amazon Search Scraper
    • Amazon Reviews API
    • Amazon Autocomplete Scraper
  • Instagram Scraper API
  • Linkedin Scraper API
    • Person Profile Scraper
    • Company Profile Scraper
  • Linkedin Jobs Scraper
    • Scrape Linkedin Jobs
    • Scrape LinkedIn Job Overview
  • Yelp Scraper API
  • Twitter Scraping API
    • X Scraping API 2.0
  • Indeed Scraper API
  • Zillow Scraper API
  • Youtube Scraper API
    • Youtube Search API
    • YouTube Transcripts API
    • YouTube Channel API
  • Walmart Scraper API
    • Walmart Product Scraper
    • Walmart Search Scraper
    • Walmart Reviews Scraper
  • Screenshot API
  • Webhook Integration
  • Datacenter Proxies
  • Account API
Powered by GitBook
On this page
  • Scrapingdog Parameters
  • Search Query
  • Language
  • Response
  1. Amazon Scraper API

Amazon Autocomplete Scraper

This API can be used for scraping suggestions from any product page from Amazon. All you need is the query for the search.

You have to send a GET request to https://api.scrapingdog.com/amazon/autocomplete with the below-given parameters.

Scrapingdog Parameters

Parameter
Description

api_key

required

Your personal API key. Available on your dashboard

Type: String

Search Query

Parameter
Description

prefix

prefix represent the partial search term that Amazon uses to generate keyword suggestions. Type: String

last_prefix

This indicate that the user first typed "i" and then continued typing "phone" (leading to "iphone"). Type: String

mid

In Amazon URLs, mid often refers to the Merchant IDrting, which identifies a specific seller on the platform. Type: String

suffix

The suffix parameter in the Amazon Suggestions API plays a key role in handling search query completion and predictions. Type: String

Language

Parameter
Description

language

Language of the results. Possible Values - en, es, fr, de, etc. Default Value - en Type - String

curl "https://api.scrapingdog.com/amazon/autocomplete?api_key=5eaa61a6e562fc52fe763tr516e4653&domain=com&prefix=spoon"
import requests

# API URL and key
api_url = "https://api.scrapingdog.com/amazon/autocomplete"
api_key = "5eaa61a6e562fc52fe763tr516e4653"

# Search parameters
domain = "com"
prefix = "spoon"

# Create a dictionary with the query parameters
params = {
    "api_key": api_key,
    "prefix": prefix
}

# Send the GET request with the specified parameters
response = requests.get(api_url, params=params)

# Check if the request was successful (status code 200)
if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"HTTP Request Error: {response.status_code}")
const axios = require('axios');

// API URL and key
const apiURL = 'https://api.scrapingdog.com/amazon/autocomplete';
const apiKey = '5eaa61a6e562fc52fe763tr516e4653';

// Search parameters
const prefix = 'spoon';

// Create an object with the query parameters
const params = {
  api_key: apiKey,
  prefix: prefix
};

// Send a GET request with the specified parameters
axios
  .get(apiURL, { params: params })
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.error('HTTP Request Error:', error);
  });
<?php

// API URL and key
$apiURL = 'https://api.scrapingdog.com/amazon/autocomplete';
$apiKey = '5eaa61a6e562fc52fe763tr516e4653';

// Search parameters
$prefix = 'spoon';

// Create an array with the query parameters
$params = [
    'api_key' => $apiKey,
    'prefix' => $prefix
];

// Initialize cURL session
$ch = curl_init();

// Set cURL options
curl_setopt($ch, CURLOPT_URL, $apiURL . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Execute cURL session and get the response
$response = curl_exec($ch);

// Check for cURL errors
if (curl_errno($ch)) {
    echo 'cURL error: ' . curl_error($ch);
}

// Close cURL session
curl_close($ch);

// Parse and use the response data
if ($response) {
    $jsonData = json_decode($response, true);
    print_r($jsonData);
} else {
    echo 'No response received.';
}
require 'net/http'
require 'json'

api_url = 'https://api.scrapingdog.com/amazon/autcomplete'
api_key = '5eaa61a6e562fc52fe763tr516e4653'
query = 'spoon'

params = {
  'api_key' => api_key,
  'query' => query
}

uri = URI(api_url)
uri.query = URI.encode_www_form(params)

response = Net::HTTP.get_response(uri)

if response.is_a?(Net::HTTPSuccess)
  data = JSON.parse(response.body)
  puts data
else
  puts "Request failed with status code #{response.code}"
end
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class Main {
    public static void main(String[] args) {
        String apiURL = "https://api.scrapingdog.com/amazon/autocomplete";
        String apiKey = "5eaa61a6e562fc52fe763tr516e4653";
        String prefix = "spoon";

        try {
            // Create the URL with query parameters
            URL url = new URL(apiURL + "?api_key=" + apiKey + '"&prefix=" + prefix);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            // Set the request method to GET
            connection.setRequestMethod("GET");

            // Get the response code
            int responseCode = connection.getResponseCode();

            if (responseCode == 200) {
                // Read the response data
                BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String line;
                StringBuilder response = new StringBuilder();

                while ((line = reader.readLine()) != null) {
                    response.append(line);
                }
                reader.close();

                // Print the response data
                System.out.println(response.toString());
            } else {
                System.out.println("Request failed with response code: " + responseCode);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

Response

[
    {
        "type": "KEYWORD",
        "keyword": "cricket noise maker prank"
    },
    {
        "type": "KEYWORD",
        "keyword": "cricket printer"
    },
    {
        "type": "KEYWORD",
        "keyword": "cricket"
    },
    {
        "type": "KEYWORD",
        "keyword": "cricket bat"
    },
    {
        "type": "KEYWORD",
        "keyword": "live crickets"
    },
    {
        "type": "KEYWORD",
        "keyword": "cricket phones"
    },
    {
        "type": "KEYWORD",
        "keyword": "cricket keeper"
    },
    {
        "type": "KEYWORD",
        "keyword": "live crickets for reptiles"
    },
    {
        "type": "KEYWORD",
        "keyword": "cricket ball"
    },
    {
        "type": "KEYWORD",
        "keyword": "cricket shoes men"
    }
]

PreviousAmazon Reviews APINextInstagram Scraper API

Last updated 2 months ago