Amazon image search
Find Amazon products that look like a photo: the objects in it, ranked ASIN matches with scores, and price, rating and stock for the top matches.
Find Amazon products that look like a photo: the objects in it, ranked ASIN matches with scores, and price, rating and stock for the top matches.
At a glance
GET or POST /v1/structured/amazon/image-search with a photo; it answers { endpoint, url, credits, duration_ms, data } with one result per image. Send image_url, up to 10 image_urls, or the image itself as image_base64 in a POST body. Each call is charged for the data it moves: about 10,000 images per credit is typical, and a larger photo costs more. An image we could not search costs nothing, and a call where none could be searched is 502 TARGET_FAILED, free.
Images | JPEG or PNG. WebP, AVIF and GIF are refused ( |
Per call | 10 images, answered in the order sent. Typical time: 2–4 s an image. |
Marketplace | Amazon US. |
- cURL
- Python
- Node.js
curl -G "https://api.scrapelyserp.com/v1/structured/amazon/image-search" \
-H "Authorization: Bearer $SCRAPELY_API_KEY" \
--data-urlencode "image_url=https://m.media-amazon.com/images/I/61PQSiTkywL.jpg"import os
import requests
HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}
r = requests.get(
"https://api.scrapelyserp.com/v1/structured/amazon/image-search",
headers=HEADERS,
params={"image_url": "https://m.media-amazon.com/images/I/61PQSiTkywL.jpg"},
timeout=30,
)
r.raise_for_status()
data = r.json()
for p in data["data"]["results"][0]["products"]:
print(p["asin"], p["price"], p["title"])const res = await fetch(`https://api.scrapelyserp.com/v1/structured/amazon/image-search?${new URLSearchParams({ image_url: 'https://m.media-amazon.com/images/I/61PQSiTkywL.jpg' })}`, {
headers: { Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}` },
signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
for (const p of data.data.results[0].products) console.log(p.asin, p.price, p.title);Parameters
Parameter | Type | Default | Description |
|---|---|---|---|
| string | — | A public http or https URL of a JPEG or PNG photo. |
| string | — | Up to 10 image URLs: a JSON array, or comma-separated. Each is answered on its own, in the order sent. |
| string | — | POST only: the image itself, base64 (a |
Send exactly one of the three. image_base64 goes in a POST with a JSON body, {"image_base64": "/9j/4AAQ…"}; image_url and image_urls work as GET parameters or in that body. An image URL must be a public http or https address on the standard port; addresses on a private, local or loopback network are refused (400 INVALID_PARAM, free), and so is one that redirects there (invalid_image). For a photo on your own machine, send it as image_base64.
What comes back
Each result has image_url (null for image_base64), status and four lists. objects: what was found in the photo (label, category, score, and a box in pixels of the image as measured, with that image_width and image_height). matches: every ranked ASIN for each object (rank, asin, score from 0 to 1, kind and object, the index into objects). products: the top matches, usually about 20, with title, url, brand, image, price, list_price, rating, reviews_count, availability, in_stock, variations and colors. queries: text phrases generated from the photo, when there are any (often none).
| Meaning | Charged |
|---|---|---|
| Products found. | yes |
| The image was searched and nothing was found in it. | yes |
| Not a JPEG or PNG, too large, not found, or a private address. | no |
| Not searched this time. Send it again. | no |
kind is visual for a match on the picture and text for one found through a generated phrase. Scores compare matches within one image, not across images. availability is in_stock, low_stock (only a few left), available_later (can be ordered for a later date), out_of_stock, or null when Amazon does not say; in_stock is null unless that answer is clear. A price is null when the listing shows none (or only a range); variations lists the ASINs of the same product family, sizes and colours, the product itself included. For the full listing, the buy box or delivery dates, send the ASINs to POST /v1/products.
Full reference → GET /v1/structured/amazon/image-search