惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
Vercel News
Vercel News
Recent Announcements
Recent Announcements
博客园 - Franky
小众软件
小众软件
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
宝玉的分享
宝玉的分享
I
InfoQ
博客园 - 聂微东
Jina AI
Jina AI
J
Java Code Geeks
V
V2EX
U
Unit 42
Stack Overflow Blog
Stack Overflow Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
阮一峰的网络日志
阮一峰的网络日志
L
LangChain Blog
T
The Blog of Author Tim Ferriss
量子位

SerpApi

Scrape YouTube Channel Data with SerpApi How to scrape movie and TV results from the Google Play Store SerpApi Weekly Changelog: Sep 07 - 13, 2026 Introducing MCP Bundle Support for SerpApi SerpApi Weekly Changelog: Aug 31 - Sep 06, 2026 We Have Resolved the Google /goto URL Redirect Rollout How to scrape Zillow Reddit promised its users an open internet. Then it closed the door. SerpApi Weekly Changelog: August 24 - 30, 2026 Best web scraping tools in 2026 Google’s New /goto Redirect URLs: Resolution in Progress How to Scrape Walmart Reviews Results Understanding HTTP 429: Too Many Requests Google tried again. We’re moving to dismiss a second time. SerpApi Weekly Changelog: August 17 - 23, 2026 Introducing SerpApi's New Markdown Output SerpApi Surpasses 1.5 Million Activated User Accounts How a Lead Generation Company Scaled Outreach with SerpApi's Google Maps API SerpApi Weekly Changelog: August 10 - 16, 2026 How to scrape book results from the Google Play Store What is an API? Part 3: Dynamic Data Displays with D&D! We Filed an Amicus Brief in U.S. v. Google How to scrape Google Play Store game information SerpApi Weekly Changelog: August 03 - 09, 2026 Introducing SerpApi Search Tools: Real-Time Web Search for Python AI Agents Measuring World Cup Attention: What the data says about Vozinha SerpApi Weekly Changelog: July 27 - August 02, 2026 How to Scrape Google Maps Autocomplete Build an AI Event Discovery Agent That Adds Events to Your Calendar in One Click How to Aggregate Local Business Ratings-Without Averaging
Amazon ASIN Lookup API: Find and Fetch Product Details
Hilman Ramadhan · 2026-06-08 · via SerpApi

Amazon products are identified by an ASIN, short for Amazon Standard Identification Number. If you're building a product research tool, price monitoring system, competitor tracker, or an Amazon data workflow, the ASIN is usually the key identifier you need.

In this tutorial, we’ll learn how to:

  1. Search Amazon products by keyword.
  2. Extract the ASIN from Amazon search results.
  3. Use that ASIN to fetch detailed product information.

We’ll use two SerpApi APIs:

Amazon ASIN Lookup API method

Video Tutorial

We also provide video tutorials for this guide.

Amazon Search Results Scraper:

Amazon Product Detail Scraper:

Why use an Amazon Search API?

Manually searching Amazon and copying product details is slow. Building your own scraper also means handling HTML changes, blocking, proxies, parsing, and maintenance.

With an API, you can programmatically look up products and get structured JSON data without the scraping headaches.

The Amazon Search API uses the endpoint https://serpapi.com/search?engine=amazon, and the query parameter is k, which works like a regular Amazon search query.

You can use this for:

Step 1: Search Amazon products and get ASINs

We're using Python for the tutorial. You can use any programming language you want.

Install requests first:

pip install requests

Create a new main.py file. Let’s say we want to search for "coffee" in Amazon:

import requests
import json

SERPAPI_API_KEY = "YOUR_SERPAPI_API_KEY"

params = {
    "api_key": SERPAPI_API_KEY,
    "engine": "amazon",
    "amazon_domain": "amazon.com",
    "k": "coffee"
}

search = requests.get("https://serpapi.com/search", params=params)
response = search.json()

print(json.dumps(response, indent=2))

This sends a request to the Amazon Search API and returns Amazon search results in JSON format.

The k parameter defines the Amazon search query, and amazon_domain lets you choose the Amazon marketplace, such as amazon.com.

Here is the example result:

Amazon ASIN scraper sample result

You can see that we receive the ASIN for each item.

Amazon Search API results can include product fields like title, link, thumbnail, rating, and reviews. Products inside Amazon results include an ASIN field and a serpapi_link pointing to the Amazon Product API lookup for that ASIN.

Let’s print a cleaner list of products:

import requests

SERPAPI_API_KEY = "YOUR_SERPAPI_API_KEY"

params = {
    "api_key": SERPAPI_API_KEY,
    "engine": "amazon",
    "amazon_domain": "amazon.com",
    "k": "coffee"
}

search = requests.get("https://serpapi.com/search", params=params)
response = search.json()

for product in response.get("organic_results", []):
    title = product.get("title")
    asin = product.get("asin")
    price = product.get("price")
    rating = product.get("rating")
    reviews = product.get("reviews")

    print(f"Title: {title}")
    print(f"ASIN: {asin}")
    print(f"Price: {price}")
    print(f"Rating: {rating}")
    print(f"Reviews: {reviews}")
    print("-" * 50)

Example output:

Title: Amazon Fresh, Colombia Ground Coffee, Medium Roast, 32 Oz
ASIN: B072MQ5BRX
Price: $15.31
Rating: 4.5
Reviews: 7823
--------------------------------------------------

Now we have the ASIN. Next, we can use it to get more complete product details.

Step 3: Look up product details by ASIN

The Amazon Product API uses engine=amazon_product and requires an asin parameter. The request returns a product_results object containing fields like asin, title, description, tags, badges, variants, brand, links, thumbnails, and more.

Here’s how to look up a product by ASIN:

import requests
import json

SERPAPI_API_KEY = "YOUR_SERPAPI_API_KEY"

params = {
    "api_key": SERPAPI_API_KEY,
    "engine": "amazon_product",
    "asin": "B072MQ5BRX"
}

search = requests.get("https://serpapi.com/search", params=params)
response = search.json()

print(json.dumps(response, indent=2))

Now let’s print only the most useful product details:

import requests

SERPAPI_API_KEY = "YOUR_SERPAPI_API_KEY"

params = {
    "api_key": SERPAPI_API_KEY,
    "engine": "amazon_product",
    "amazon_domain": "amazon.com",
    "asin": "B072MQ5BRX"
}

search = requests.get("https://serpapi.com/search", params=params)
response = search.json()

product = response.get("product_results", {})

print(f"Title: {product.get('title')}")
print(f"ASIN: {product.get('asin')}")
print(f"Brand: {product.get('brand')}")
print(f"Rating: {product.get('rating')}")
print(f"Reviews: {product.get('reviews')}")
print(f"Price: {product.get('price')}")
print(f"Link: {product.get('link')}")

Complete example: Search Amazon, get the first ASIN, then fetch product details

In many cases, you don’t already know the ASIN. You only have a keyword, a product name, a brand, or a category.

Here’s a complete workflow:

import requests

SERPAPI_API_KEY = "YOUR_SERPAPI_API_KEY"


def search_amazon_products(query):
    params = {
        "api_key": SERPAPI_API_KEY,
        "engine": "amazon",
        "amazon_domain": "amazon.com",
        "k": query
    }

    search = requests.get("https://serpapi.com/search", params=params)
    return search.json()


def get_amazon_product_by_asin(asin):
    params = {
        "api_key": SERPAPI_API_KEY,
        "engine": "amazon_product",
        "amazon_domain": "amazon.com",
        "asin": asin
    }

    search = requests.get("https://serpapi.com/search", params=params)
    return search.json()


search_results = search_amazon_products("coffee")

first_product = search_results.get("organic_results", [])[0]
asin = first_product.get("asin")

print(f"Found ASIN: {asin}")
print(f"Product title: {first_product.get('title')}")

product_details = get_amazon_product_by_asin(asin)
product = product_details.get("product_results", {})

print("\nProduct Details")
print(f"Title: {product.get('title')}")
print(f"Brand: {product.get('brand')}")
print(f"Price: {product.get('price')}")
print(f"Rating: {product.get('rating')}")
print(f"Reviews: {product.get('reviews')}")

JavaScript example

You can also do the same thing in JavaScript.

Install the SerpApi package:

npm install serpapi

Then create an index.js file:

const { getJson } = require("serpapi");

const API_KEY = "YOUR_SERPAPI_API_KEY";

async function searchAmazonProducts(query) {
  return new Promise((resolve, reject) => {
    getJson(
      {
        api_key: API_KEY,
        engine: "amazon",
        amazon_domain: "amazon.com",
        k: query,
      },
      (json) => {
        resolve(json);
      }
    );
  });
}

async function getAmazonProductByAsin(asin) {
  return new Promise((resolve, reject) => {
    getJson(
      {
        api_key: API_KEY,
        engine: "amazon_product",
        amazon_domain: "amazon.com",
        asin,
      },
      (json) => {
        resolve(json);
      }
    );
  });
}

async function main() {
  const searchResults = await searchAmazonProducts("coffee");

  const firstProduct = searchResults.organic_results?.[0];

  if (!firstProduct) {
    console.log("No product found.");
    return;
  }

  const asin = firstProduct.asin;

  console.log("Found ASIN:", asin);
  console.log("Product title:", firstProduct.title);

  const productDetails = await getAmazonProductByAsin(asin);
  const product = productDetails.product_results;

  console.log("\nProduct Details");
  console.log("Title:", product?.title);
  console.log("Brand:", product?.brand);
  console.log("Price:", product?.price);
  console.log("Rating:", product?.rating);
  console.log("Reviews:", product?.reviews);
}

main();

Useful parameters

For Amazon Search API:

{
  "engine": "amazon",
  "amazon_domain": "amazon.com",
  "k": "coffee"
}

Useful parameters include:

  • k: the Amazon search query.
  • amazon_domain: the Amazon marketplace to use.
  • language: the Amazon search language.
  • delivery_zip: ZIP or postal code for shipping-based results.
  • shipping_location: shipping country.
  • s: sorting option.

The Amazon Search API supports sorting options such as featured, price low to high, price high to low, average customer review, newest arrivals, and best sellers.

What data can you get from an ASIN lookup?

Depending on the product and Amazon page, the Amazon Product API can return structured data such as:

  • Product title
  • ASIN
  • Brand
  • Description
  • Product images
  • Price
  • Rating
  • Reviews
  • Badges
  • Variants
  • Product details
  • Product features
  • Buying options
  • Other sellers
  • Related products

Conclusion

An Amazon ASIN lookup workflow usually has two steps:

  1. Use the Amazon Search API to search Amazon and find product ASINs.
  2. Use the Amazon Product API to fetch detailed product information from a specific ASIN.

This makes it easier to build product research tools, price trackers, marketplace dashboards, AI shopping assistants, and catalog enrichment workflows without maintaining your own Amazon scraper.

You can try the APIs here: