Skip to content
apiclaw logo

Apiclaw

apiclaw

API endpoint reference for the APIClaw data platform. Provides the 12 endpoints (categories, markets, products, competitors, realtime ASIN, AI review analysis, raw reviews, price band, brand, history), their inputs/outputs, parameter quirks, Quick Start (auth, base URL), how credits are tracked (...

SKILL.md

Full skill instructions

📋 Live API Reference: Field names and parameters may change. If you encounter field errors, check the latest OpenAPI spec at https://apiclaw.io/api/v1/openapi-spec for current field definitions.

APIClaw — Commerce Data Infrastructure for AI Agents

200M+ Amazon products. 12 endpoints. One API key.

Quick Start

  1. Get key: apiclaw.io/​api-keys (1,000 free credits)
  2. export APICLAW_API_KEY='hms_live_xxx'
  3. Base URL: https://api.apiclaw.io/​openapi/​v2 — all POST with JSON body
  4. Auth: Authorization: Bearer YOUR_API_KEY
  5. New keys need 3-5s to activate. If 403, wait and retry.

⚠️ Critical API Pitfalls (ALL skills must follow)

  1. Keyword search is broad → MUST lock categoryPath first via categories endpoint
  2. Brand/​price-band queries MUST include --category to avoid cross-category contamination
  3. Revenue = sampleAvgMonthlyRevenue directly. NEVER calculate avgPrice × totalSales (overestimates 30-70%)
  4. Sales = monthlySalesFloor (lower bound). Fallback: 300,000 / BSR^0.65, tag as 🔍
  5. Use API fields directly: sampleOpportunityIndex, sampleTop10BrandSalesRate — never reinvent
  6. reviews/​analysis needs 50+ reviews. Fallback chain when sample is insufficient:
    1. Lightweight: realtime/​product → ratingBreakdown (star distribution only, no themes)
    2. Full 11-dim insights: realtime/​reviews (raw text, up to 100) + local Map/​Reduce via the Local Review Toolkit below — see "Local Review Toolkit" section
  7. Aggregation endpoints (price-band, brand) without categoryPath produce severely distorted data
  8. Price-band and brand endpoints only accept keyword (not categoryPath) — cross-validate returned products

On 401 Invalid Key

When apiclaw.py returns {"code": 401, "message": "API Key invalid or expired"}:

  1. STOP further endpoint calls immediately. Do not retry — a rejected key won't be accepted on a second try; every subsequent call will return 401 too.
  2. Report to the user:
    • The APICLAW_API_KEY in use was rejected (likely invalid, revoked, or expired)
    • If any partial findings were collected before the failure, show them and mark as partial
    • Fix at https://apiclaw.io/en/api-keys (verify the key, regenerate if needed)
  3. Do not fabricate or guess the data the failed calls would have returned.

On 402 Credit Exhausted

When apiclaw.py returns {"code": 402, "message": "API quota exhausted or subscription expired"}:

  1. STOP further endpoint calls immediately. Do not retry. Do not switch endpoints as a workaround — 402 is account-level (key/​subscription), not endpoint-level.
  2. Report to the user with all four of:
    • Which step in the workflow was reached (e.g. "Completed step 3/​5: brand analysis")
    • Partial findings already collected (show the actual data, not just a list of completed steps)
    • Rough credits needed to resume (sum remaining-step costs from this skill's API Budget table)
    • Top-up link: https://apiclaw.io/en/pricing
  3. Do not fabricate or guess the missing data to "complete" the report. Mark partial findings explicitly as partial.

12 Endpoints

#EndpointPurposeKey Output
1categoriesBrowse/​search category treecategoryPath, productCount
2markets/​searchMarket-level metricssampleAvgMonthlySales, sampleAvgPrice, topSalesRate, sampleNewSkuRate
3products/​searchProduct search (14 modes)asin, price, monthlySalesFloor, rating, ratingCount, fbaFee
4products/​competitorsCompetitor discoverysame fields as products/​search
5realtime/​productLive ASIN detailrating, features, bestsellersRank[], buyboxWinner.price, variants
6reviews/​analysisAI review insights (11 dims)sentimentDistribution, consumerInsights, topKeywords
7realtime/​reviewsLive raw review text (cursor paginated, max 100)reviews[], nextCursor — feeds Local Review Toolkit
8products/​price-band-overviewPrice band summaryhottestBand, bestOpportunityBand, sampleOpportunityIndex
9products/​price-band-detailFull 5-band distributionpriceBands[] with sales, brands, ratings per band
10products/​brand-overviewBrand concentrationsampleTop10BrandSalesRate (CR10), sampleBrandCount
11products/​brand-detailPer-brand breakdownbrands[] with sales, revenue, sampleProducts
12products/​historyTime series (single ASIN per call)timestamps[], price[], bsr[], monthlySalesFloor[], rating[], ratingCount[], sellerCount[], title/​imageUrl/​bestSeller/​newRelease/​aPlus/​inventoryStatus changelogs

Known Quirks

  • topN, listingAge, newProductPeriod are strings ("10" not 10)
  • Response .data is always an array — use .data[0]
  • ratingCount not reviewCount everywhere
  • bsr (int) in products vs bestsellersRank (array) in realtime
  • buyboxWinner.price — NOT top-level price in realtime
  • realtime/​product does NOT return: monthlySalesFloor, fbaFee, sellerCount
  • reviewCountMin/​Max filters currently broken (API-56)
  • reviews/​analysis may 500 for certain ASINs (API-58) — retry different ASIN
  • Rate limit: 100 req/​min, 10 req/​sec burst
  • categories uses categoryKeyword (not keyword) and parentCategoryPath (not parentCategoryName)
  • reviews/​analysis: mode required ("asin"/"category"), use asins (plural array) not asin
  • realtime/​reviews: returns 10 reviews/​page fixed (no pageSize param); 1 credit/​page; cursor-paginated; hard cap = 100 reviews (10 pages); supports marketplace US/​UK only

Local Review Toolkit

When /​reviews/​analysis lacks aggregation (ASIN has <50 reviews or no daily snapshot), fall back to live raw reviews + your own LLM. The toolkit does NOT call any external LLM — you (the calling skill's LLM) perform the Map/​Reduce steps.

Workflow:

# 1. Fetch raw reviews (up to 100, cursor-paginated, ~60s, 10 credits at full)
apiclaw.py reviews-raw --asin B0XXXXXXXX [--marketplace US] [--max-pages 10]

# 2. For EACH review, render the per-review Map prompt
apiclaw.py review-tag-prompt --review '<single review JSON>' \
    [--product-title "..."] [--product-category "..."]
# → Your LLM produces a JSON object with sentiment + 11 dimension arrays
#   (mentioned_scenarios, mentioned_issues, mentioned_positives, mentioned_improvements,
#    mentioned_buying_factors, mentioned_pain_points, user_profiles, mentioned_usage_times,
#    mentioned_usage_locations, mentioned_behaviors, keywords)
# Suggested map parallelism: ~20 concurrent if your LLM supports it

# 3. Collect candidate phrases per dimension. For EACH dimension render the Reduce prompt
apiclaw.py review-reduce-prompt --label-type positives \
    --candidates '["comfortable","comfy","very comfortable",...]'
# → Your LLM produces {clusters: [{canonical, members}, ...]}
# Suggested chunk size for `keywords` dim when >150 candidates: 150 per call

# 4. Aggregate into reviews/​analysis-compatible consumerInsights
apiclaw.py review-aggregate --reviews raw.json --tagged tags.json --clusters clusters.json
# → Output shape matches /​reviews/​analysis: reviewCount, avgRating,
#   sentimentDistribution, consumerInsights[], topKeywords[]

When to use the toolkit instead of reviews/​analysis:

  • ASIN has fewer than 50 reviews
  • reviews/​analysis returns sparse consumerInsights (missing dimensions)
  • Need the freshest possible data (Spider scrape vs. T+1 BigQuery snapshot)
  • Need to analyze a brand-new product that has no daily snapshot yet

Field Differences Across Endpoints

Datamarketsproducts/​competitorsrealtime/​productreviews/​analysisrealtime/​reviewsprice-bandbrandhistory
SalessampleAvgMonthlySalesmonthlySalesFloor❌❌❌sampleSalesRatesampleGroupMonthlySalesmonthlySalesFloor[]
PricesampleAvgPricepricebuyboxWinner.price❌❌bandMin/​MaxPricesampleAvgPriceprice[]
BSRsampleAvgBsrbsr (int)bestsellersRank[]❌❌❌❌bsr[]
RatingsampleAvgRatingratingratingavgRatingrating (per review)sampleAvgRatingsampleAvgRatingrating[]
ReviewssampleAvgReviewCountratingCountratingCountreviewCountreviews[] (raw text, max 100)❌sampleAvgRatingCountratingCount[]
Insights❌❌❌✅ consumerInsights❌ (raw only — feeds Local Review Toolkit)❌❌❌
ConcentrationtopSalesRate❌❌❌❌sampleTop3BrandSalesRateCR10❌
Opportunity❌❌❌❌❌sampleOpportunityIndex❌❌

Confidence Labels (all skills)

  • 📊 Data-backed — direct API data
  • 🔍 Inferred — logical reasoning from data
  • 💡 Directional — suggestions, predictions

Strategy recommendations and subjective conclusions are NEVER 📊. Extreme growth (>200%) = 💡 only.

Data Notes

  • Sales (monthlySalesFloor) = lower-bound estimate
  • Realtime = live; products/​competitors = ~T+1 delay
  • Amazon US only (amazon.com) — more marketplaces planned
  • Each call consumes credits; check meta.creditsConsumed

Links

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
Imagica logo
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View