AI Entegrasyon Rehberi
ASINSpotlight Scraping API'yi Cursor, Claude Code, Continue, ChatGPT'ye bağlayın — kotaya duyarlı, deyimsel kod üreten hazır prompt tarifleriyle.
Bu nedir
…kota sinyallerini görmezden gelir, yanlış şekilde sayfalama yapar, ürün detayını tekliflerle karıştırır.
Resmi sözleşme için AI'ı OpenAPI spesifikasyonuna yönlendirin:
https://www.asinspotlight.com/scraping-api-docs/openapi.jsonCursor, Claude Code, Continue, Windsurf ve ChatGPT — hepsi OpenAPI'yi doğrudan işliyor.
5 dakikada hızlı başlangıç
board.asinspotlight.com/dashboard/api adresinden anahtar oluşturun ve ortam değişkenine ekleyin:
export ASINSPOTLIGHT_API_KEY="sk_live_..."Bir istek atın:
curl -H "x-api-key: $ASINSPOTLIGHT_API_KEY" \
"https://api.asinspotlight.com/v1/product?asin=B0B3ZD8QXJ&marketplace=us"Yaklaşık şöyle bir şey görmelisiniz:
{
"success": true,
"found": true,
"page_type": "product",
"data": {
"asin": "B0B3ZD8QXJ",
"title": "Soundcore Q20i Headphones",
"bb_price": 39.99,
"rating": 4.6,
"reviews": 58800,
"bsr": 12,
"in_stock": true,
"bought_past_month": 20000
},
"meta": {
"marketplace": "us",
"language": "en",
"timing_ms": 1842,
"request_url": "https://api.asinspotlight.com/v1/product?asin=B0B3ZD8QXJ&marketplace=us",
"timestamp": "2026-05-03T10:14:22.318Z",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"usage": {"requests_consumed": 1, "requests_remaining": 49999}
}
}Sözleşme bu. Her başarılı yanıtta meta.usage.requests_remaining bulunur — kodunuzu ayrı bir kontrol olmadan kotaya duyarlı yapmak için her çağrıda okuyun.
Endpoint'lere genel bakış
| İş | Yol | Şunun için |
|---|---|---|
| Ürün detayını al | GET /v1/product?asin=…&marketplace=… | Başlık, Buy Box fiyatı, BSR, puan, yorumlar, marka, kategori, aylık talep, canlı kampanya durumu. Tipik PDP'lerde saniyeden kısa. |
| Anahtar kelimeyle ara | GET /v1/search?keyword=…&marketplace=… | Organik arama sonuçları, <code>page=N</code> ile sayfalanır. Her giriş zaten fiyat, puan, yorum, aylık talep, kampanya rozetleri, ASIN içerir — kısa liste için /product takip çağrısı gerekmez. |
| Tüm satıcıları al | GET /v1/offers?asin=…&marketplace=… | Tüm Buy Box paneli: her satıcı, fiyat, kargo, FBA/FBM, puan, teslimat tarihleri. Gerçek zamanlı, önbellekten değil. |
| Satıcı profilini al | GET /v1/seller?sellerId=…&marketplace=… | sellerId ile satıcı vitrini: ad, 12 aylık geri bildirim puanı ve olumlu %, ayrıca Detailed Seller Information'dan yasal şirket adı ve adresi. |
| Herhangi bir URL'i kazı | POST /v1/scrape | Gövde {url, marketplace, language}. Sayfa türü otomatik algılanır. Fırsat sayfaları, pazaryeri-spesifik düzenler, bestseller'lar, kategori sayfaları için kullanın. |
Prompt tarifleri
Her tarif Cursor, Claude Code, ChatGPT veya başka bir kodlama asistanına yapıştırmaya hazır. Spesifikasyon URL'sini, ortam değişkenini ve AI'ın genelde kaçırdığı tuzağı belirtirler.
1. Pazaryerleri arası fiyat karşılaştırması
Build a script that compares prices for a list of ASINs across multiple Amazon marketplaces using the ASINSpotlight Scraping API.
OpenAPI spec: https://www.asinspotlight.com/scraping-api-docs/openapi.json
API base URL: https://api.asinspotlight.com (note: api., not www.)
Auth: API key in the `x-api-key` header (read from env var `ASINSPOTLIGHT_API_KEY`).
Endpoint: GET /v1/product?asin=...&marketplace=...
Inputs:
- List of ASINs (e.g., ["B0B3ZD8QXJ", "B0CQXMXJC5"])
- List of marketplace codes (e.g., ["us", "uk", "de"])
For each (asin, marketplace) pair, fetch product details and collect: asin, marketplace, title, bb_price, in_stock, rating.
Output: CSV with columns asin, marketplace, title, bb_price, in_stock, rating.
Constraints:
- Stop early and surface the error if a request returns 401, 429, or 5xx.
- After each successful response, read `meta.usage.requests_remaining` and abort if it drops below 50.
- Don't run more than 5 requests in parallel — the account has a parallel-request limit.AI'ın genelde doğru yaptığı: istek döngüsü, env-var kimlik doğrulama, JSON parse.
Genelde kaçırdığı: meta.usage okumak, paralelliği sınırlamak. Her ikisi de promptta açıkça belirtilmiştir bu yüzden.
2. Günlük anahtar kelime takibi
Build a daily keyword tracker that records the top 10 ASINs for a list of keywords using the ASINSpotlight Scraping API.
OpenAPI spec: https://www.asinspotlight.com/scraping-api-docs/openapi.json
API base URL: https://api.asinspotlight.com (note: api., not www.)
Auth: API key in the `x-api-key` header (env var `ASINSPOTLIGHT_API_KEY`).
Endpoint: GET /v1/search?keyword=...&marketplace=...
For each keyword, fetch the search results page, take the first 10 entries from `data.shallow_parts`, and write one row per (keyword, rank, asin, title, price, rating, reviews, bought_past_month, captured_at).
Storage: append to a SQLite table `keyword_rankings` keyed on (keyword, marketplace, captured_at, rank).
Run cadence: once per day, intended to be invoked by cron.
Don't:
- Don't try to "follow up" with a /v1/product call for each search result — `shallow_parts` already contains everything we need.
- Don't paginate past page 1; we only care about the top 10.
- Don't retry on 4xx errors; only on 5xx and `CAPTCHA_DETECTED` (with backoff).Tuzak: AI sıklıkla her arama sonucu için takip eden bir /v1/product çağrısı üretir, kredi tüketimini iki katına çıkarır. shallow_parts yükü zaten günlük takipçinin ihtiyacı olan her şeyi içerir.
3. Buy Box sahipliği izleyicisi
Build a Buy Box ownership monitor for a watchlist of ASINs using the ASINSpotlight Scraping API.
OpenAPI spec: https://www.asinspotlight.com/scraping-api-docs/openapi.json
API base URL: https://api.asinspotlight.com (note: api., not www.)
Auth: API key in the `x-api-key` header (env var `ASINSPOTLIGHT_API_KEY`).
Endpoint: GET /v1/offers?asin=...&marketplace=...&condition=new
For each ASIN, call /v1/offers with `condition=new` and identify the current Buy Box owner: the seller in `data.product_sellers_info` whose `is_pinned` is `true`. At most one offer per response carries that flag, so read the owner from it directly instead of inferring it from price. If no offer is pinned (Amazon rendered no featured offer for that ASIN), fall back to the lowest `price + shipping_price` among `is_fba: true` sellers.
Compare against the previously recorded owner stored in a JSON file `buybox_state.json` keyed by asin. When the owner changes, log a line to stdout with: timestamp, asin, previous owner, new owner, new price.
Run as a loop with a 10-minute interval between full sweeps.
Don't:
- Don't conflate /v1/product and /v1/offers — `/v1/product` returns the Buy Box price but not the full seller list. You need /v1/offers for ownership.
- Don't compare used and new offers as interchangeable — each offer carries a `condition`; the Buy Box is a `new` offer, so pass `condition=new` (or filter on `condition`) before picking the lowest price.
- Don't ignore `stock_qty: 0` sellers; filter those out before picking a winner.
- Don't treat the first entry in `product_sellers_info` as the Buy Box owner; array order does not encode it. Use `is_pinned`.
- Don't run all watchlist requests at once; respect the parallel limit (default ~5).Tuzak: asistanlar sıklıkla buybox / bb_price alanlarını /v1/product'tan çekip Buy Box sahibi olarak adlandırır. O alan size fiyatın Buy Box olduğunu söyler, kime ait olduğunu değil. Sahiplik verisi yalnızca /v1/offers'tadır.
4. ASIN listesi toplu yenileme
Build an ASIN-list batch refresh that updates cached product data using the ASINSpotlight Scraping API.
OpenAPI spec: https://www.asinspotlight.com/scraping-api-docs/openapi.json
API base URL: https://api.asinspotlight.com (note: api., not www.)
Auth: API key in the `x-api-key` header (env var `ASINSPOTLIGHT_API_KEY`).
Endpoint: GET /v1/product?asin=...&marketplace=...
Inputs: a JSON file `watchlist.json` of `{asin, marketplace, last_refreshed_at}` records.
Refresh strategy:
1. Sort the list by `last_refreshed_at` ascending (oldest first).
2. For each entry, call /v1/product. On a successful 200, write the response data and the new timestamp back to the file.
3. After every response, read `meta.usage.requests_remaining`. If it would dip below the configured floor (default 1000), stop the run and log how many entries were skipped.
4. Run requests in batches of 5 in parallel.
Error handling:
- Not found (HTTP 200 with `found: false` and `data: null`): mark the entry as `status: gone` and continue. A not-found result still consumes 1 credit — that's expected.
- `CAPTCHA_DETECTED` (503): retry up to 3 times with exponential backoff.
- `RATE_LIMIT_EXCEEDED` (429): wait 30 seconds and retry the same entry.
- Any other error: log and stop.Tuzak: saf toplu işler paralel istek limitini ve kota tabanını yok sayar. Her ikisi de 429'lar ve meta.usage üzerinden net şekilde sinyalize edilir — prompt AI'ya bunlara bakmasını söyler.
5. Arama → veritabanı işlem hattı (sayfalamayla)
Build a search-to-database pipeline that captures the first 5 pages of results for a keyword using the ASINSpotlight Scraping API.
OpenAPI spec: https://www.asinspotlight.com/scraping-api-docs/openapi.json
API base URL: https://api.asinspotlight.com (note: api., not www.)
Auth: API key in the `x-api-key` header (env var `ASINSPOTLIGHT_API_KEY`).
Endpoint: GET /v1/search?keyword=...&marketplace=...&page=N
Steps:
1. Call GET /v1/search?keyword=...&marketplace=us (page 1 by default). Read `data.last_page_number` to know the upper bound.
2. For pages 2..min(5, last_page_number), call the same endpoint with `page=N`.
3. Append every entry to a Postgres table `search_results` with columns (keyword, marketplace, page, rank, asin, title, price, rating, reviews, captured_at).
Don't:
- Don't fetch past `last_page_number`: Amazon returns an empty result set and you'll waste credits.
- Don't run more than 5 requests in parallel; the account has a parallel-request limit.Tuzak: last_page_number ötesine istek atmak. Amazon boş sayfalar döndürür ve her istek yine bir kredi tüketir; bu yüzden prompt taramayı açıkça min(5, last_page_number) ile sınırlar.
AI araçlarına bağlama
Cursor
OpenAPI spesifikasyonuna referans veren bir proje kuralı ekleyin. .cursor/rules/asinspotlight.md oluşturun:
---
description: ASINSpotlight Amazon Scraping API
globs: ["**/*.py", "**/*.ts", "**/*.js"]
alwaysApply: false
---
When working with the ASINSpotlight Scraping API:
- Spec: https://www.asinspotlight.com/scraping-api-docs/openapi.json
- Auth: `x-api-key` header, value from env var `ASINSPOTLIGHT_API_KEY`
- Base URL: https://api.asinspotlight.com/v1
- Endpoints: /product (asin, marketplace, language), /search (keyword, marketplace, page, language), /offers (asin, marketplace, condition, language), /seller (sellerId, marketplace, language), POST /scrape (body: {url, marketplace, language})
- Read `meta.usage.requests_remaining` after every successful response
- A missing entity returns HTTP 200 with `found: false` and `data: null` — branch on `found`, not the status code
- Optional `language` param: `en` (default) or `native` (the marketplace's own language; currently `it`/`fr`/`de`/`es`, unsupported combos return 400 `NATIVE_LANGUAGE_NOT_SUPPORTED`)
- Cap parallelism at 5 unless told otherwise
- For search pagination beyond page 1, pass `page=N` to /search
Claude Code
Spesifikasyon URL'sini promptunuza geçirin veya proje kökündeki CLAUDE.md'ye ekleyin. Claude Code ilk referansta bunu çekip üzerinde akıl yürütür. Cursor kuralı için yukarıdaki aynı talimatlar bir CLAUDE.md bölümü olarak çalışır.
Continue.dev
Spesifikasyonu ~/.continue/config.json'a bir dokümantasyon kaynağı olarak ekleyin:
{
"docs": [
{
"title": "ASINSpotlight Scraping API",
"startUrl": "https://www.asinspotlight.com/scraping-api-docs/openapi.json",
"rootUrl": "https://www.asinspotlight.com/scraping-api-docs/openapi.json"
}
]
}Sohbette @docs ASINSpotlight Scraping API ile referans verin.
ChatGPT (web)
OpenAPI URL'sini sohbete yapıştırın ve ChatGPT'ye onu getirmesini söyleyin. Tarama açıkken spesifikasyonu çekip yazdığı tüm kod için sözleşme olarak kullanır. Claude (claude.ai) ve Gemini'de de aynı şekilde çalışır.
Diğer araçlar (Windsurf, Cline, codex CLI, …)
URL'leri çekebilen veya OpenAPI dokümanı kabul eden herhangi bir ajan aynı şekilde entegre olur: https://www.asinspotlight.com/scraping-api-docs/openapi.json'i gösterin ve yukarıdaki prompt tariflerini kullanın.
Taklit edilecek desenler
Bunlar kotaya duyarlı üretim kodunu naif scriptlerden ayıran deyimlerdir.
Kotaya duyarlı döngüler
Her başarılı yanıt meta.usage.requests_remaining taşır. Devam edip etmeyeceğine karar vermek için ayrı bir endpoint sorgulamayın — her çağrıda okuyun:
for (const asin of asins) {
const res = await fetchProduct(asin);
if (!res.success) handleError(res.error.code);
if (res.meta.usage.requests_remaining < FLOOR) break;
store(res.data);
}Pazaryeri değiştirme
marketplace, hangi Amazon vitrininin sorgulanacağını kontrol eden tek parametredir. Her çağrıda açıkça geçirin — us varsayılanına güvenmeyin, eğer kasıtlı değilse. Geçerli kodlar spesifikasyonun Marketplace şemasında listelenmiştir. İsteğe bağlı language parametresi her uç noktada aynı şekilde çalışır: en (varsayılan) sayfanın İngilizce sürümünü, native pazar yerinin kendi dilini getirir (şu anda it, fr, de, es).
Kredi yakmayan hata yönetimi
Çoğu hata yanıtı kredi tüketmez — ve eksik bir varlık hata değildir. Geçersiz bir ASIN ya da satıcı found: false ve data: null ile 200 döner ve sayfa getirilip ayrıştırıldığı için yine de 1 kredi ücretlendirilirsiniz. Buna göre planlayın: silinmiş ASIN'lere giden bir yenileme işi her birinden 1 kredi alarak kotayı yavaşça boşaltır, bu yüzden bu girişleri işaretleyin ve yenilemeyi durdurun.
/scrape ile sayfalama
/v1/search varsayılan olarak 1. sayfayı döndürür. 2+ sayfalar için aynı uç noktaya page=N geçirin ve ne zaman duracağınızı bilmek için data.current_page / data.last_page_number değerlerini okuyun. Amazon anahtar kelime aramasını genellikle 20 sayfayla sınırlar ve sayfa başına sonuç sayısı sorguya göre değişir.
AI'ın ürettiği kodun düştüğü yaygın tuzaklar
/v1/productve/v1/offers'i karıştırmak. Product size Buy Box fiyatını verir; offers Buy Box sahibini ve diğer her satıcıyı verir. Karıştırmayın.- Her pazar yerinde
language=nativeistemek. Yerel mod pazar yeri bazındadır (şu andait,fr,de,es); diğerleri400 NATIVE_LANGUAGE_NOT_SUPPORTEDdöndürür. Varsayılanenher yerde çalışır. meta.usageokumak yerine sorgulamak. Kalan kredi sayısı her başarılı yanıttadır. Çağrılacak başka bir şey yok.- 429 ile 503'ü karıştırmak. 429 çok fazla eşzamanlı istek veya kredi yok demektir — geri çekilin veya durun.
CAPTCHA_DETECTEDkodlu 503 geçicidir — üstel geri çekilmeyle yeniden deneyin. marketplaceparametresini unutmak. Onsuz her çağrı amazon.com'a gider — Avrupa veya Japonya iş akışları için sessiz UX hatası. Her zaman açıkça geçin.- Bulunamadı sonucunu ücretsiz saymak. Bir
found: falseyanıtı (HTTP 200) yine de 1 krediye mal olur (sayfa getirilip ayrıştırıldı). Eskimiş izleme listelerine karşı yenileme işleri kotayı sessizce boşaltabilir. - 4xx'i körü körüne yeniden denemek. Doğrulama (400) ve kimlik doğrulama (401) hataları kendiliğinden düzelmez. Yalnızca 429, 500 ve 503 yeniden denemeye değer.
Sonraki adımlar
- OpenAPI spesifikasyonu — resmi sözleşme, makine-okunabilir
- Anlatımlı dokümantasyon — yanıt biçimleri ve örneklerle insan-okunabilir referans
- API anahtarı oluştur