New New: product-change webhooks for Amazon, free during the pilot
GravitronData

API documentation

A single GET request returns a structured product record from a marketplace listing. No SDK required — it is HTTP and JSON.

Quickstart

Create an account, generate a key in the dashboard, and make your first call. New accounts include 250 free credits.

curl https://api.gravitrondata.com/v1/walmart/price \
  -H "Authorization: Bearer gd_live_..." \
  -G --data-urlencode "item_id=650209444"

Every response is JSON. A successful lookup costs one credit; the remaining balance is returned on each response in X-Credits-Remaining.

Authentication

Pass your API key as a bearer token on every request.

Authorization: Bearer gd_live_xxxxxxxxxxxxxxxxxxxxxxxx

Keys are shown once at creation and stored only as a hash — we cannot recover one for you. If a key is lost or exposed, revoke it in the dashboard and generate a replacement. Revocation takes effect immediately.

You can hold up to 20 active keys. Issue one per environment or per service so a single compromised key can be revoked without disrupting everything else.

Credits & billing

Access is prepaid. One credit is consumed per lookup that returns an answer. Credits do not expire.

OutcomeChargedWhy
Product data returned1 creditA complete answer.
No product at that identifier1 creditStill a real answer, and it required a live fetch.
Served from cache1 creditYou pay for the answer, not for our infrastructure.
Blocked, timed out, upstream failureFreeOur failure. The credit is returned automatically.
Invalid key, bad parameters, rate limitedFreeNo fetch was attempted.

Check X-Credits-Charged on any response to see whether that specific call cost you anything.

Endpoints

Base URL: https://api.gravitrondata.com

MethodPathReturns
GET/v1/{marketplace}/productComplete product record
GET/v1/{marketplace}/pricePrice, availability and seller only
GET/healthService status. No key required, not billed.

{marketplace} is a slug from the API catalogue. Marketplaces that are not yet available return 501 and are never billed. /price returns a subset of /product — the same underlying fetch, a smaller payload.

Parameters

NameTypeRequiredDescription
item_idstringOne of the two Marketplace item identifier. The format is the marketplace's own.
urlstringOne of the two Full product URL. Useful when you have a link but not an ID.

Supply exactly one. Supplying neither returns 400. When both are given, url takes precedence.

MarketplaceIdentifierExample
walmartWalmart item ID 650209444
ebayeBay item number 285923847562
flipkartFlipkart pid MOBGTAGPTB3VS24W
bestbuySKU or UPC 6505727
targetTCIN 1005861258
samsclubItem number 13609768106
costcoItem number 4000440693
canadiantireProduct code 3993772
johnlewisProduct id 111357708
lazadaItem id 128150790
zalandoArticle code NI111A1V9-Q11
krogerProduct id or UPC 0001111041700
etsyListing id 1234567890
mercadolibreCatalog product id MLB45862017

An identifier that does not match its marketplace's format returns 400 and is never billed. International sites are supported through url: pass an ebay.co.uk or ebay.de listing URL and it is fetched from that site, priced in that site's currency.

Response schema

The /product response for a live marketplace. Fields that a listing does not carry are returned as null rather than omitted, so you can rely on the shape being stable.

FieldTypeDescription
marketplacestringSlug of the marketplace the record came from.
item_idstringMarketplace identifier for the item.
urlstringCanonical product URL.
titlestringListing title as displayed.
brandstring | nullBrand name.
modelstring | nullManufacturer model number.
upcstring | nullUPC barcode where published.
price.currentnumber | nullPrice now, as a number.
price.wasnumber | nullStruck-through price when discounted.
price.unitnumber | nullPrice per unit of measure.
price.unit_labelstring | nullHuman-readable unit price, e.g. $8.44/oz.
price.currencystringISO currency code.
price.is_reducedbooleanTrue when a was-price is present.
availability.in_stockbooleanWhether the item is buyable now.
availability.statusstringRaw status, e.g. IN_STOCK.
availability.transactable_offersinteger | nullOffers that can actually be purchased.
seller.namestring | nullBuy-box seller.
seller.is_first_partybooleanSold by the marketplace itself, or by a third-party seller on it.
seller.ratingnumber | nullSeller rating out of 5.
reviews.ratingnumber | nullAverage product rating.
reviews.countinteger | nullNumber of reviews.
category_pathstring | nullBreadcrumb category path.
specificationsobjectName/value attribute pairs from the listing.
imagesarrayImage URLs, primary first.

Buy-box data is a point in time

On marketplaces with third-party sellers, the buy box rotates between sellers with different prices and stock states. seller.name tells you whose price you received. Two lookups minutes apart can legitimately return different prices for the same item — that is the marketplace changing, not an inconsistency in the data.

Marketplace-specific fields

The envelope above is shared, so code written against one marketplace parses another. Where a marketplace publishes something the others do not, it is added as its own field rather than being squeezed into one that means something else elsewhere. Fields a marketplace does not publish are null.

FieldMarketplaceDescription
auction.is_auctioneBayFalse for ordinary Buy-It-Now listings.
auction.bidseBayBid count on an auction listing.
auction.current_bideBayStanding bid, in the listing's currency.
auction.ends_ateBayListing end instant, where eBay publishes one.
seller.feedback_percenteBayPositive-feedback percentage. eBay publishes no star rating, so seller.rating is null there.
availability.sold_quantityeBayUnits already sold on the listing.
fulfillment.item_locationeBayWhere the item ships from.
fulfillment.ships_toeBayDestination the shipping quote assumes. eBay prices postage per destination, so the cost is only meaningful next to it.
store.pickup_availableHome DepotWhether the item can be collected from a branch.
store.pickup_quantityHome DepotUnits that branch is holding.
store.pickup_storeHome DepotWhich branch the pickup figures describe.
store.ship_to_home / delivery_availableHome DepotPost and scheduled-delivery availability, which move independently of pickup.
price.save_amount / save_percenteBay, Home Depot, FlipkartSaving in cash and percent against the was-price.
store_skuHome DepotIn-store SKU, distinct from the internet number.
offers[]FlipkartBank, exchange and no-cost-EMI offers. Not folded into price.current, because whether one applies depends on the buyer.
seller.ratingFlipkart, WalmartSeller rating out of 5. Null on eBay, which publishes a feedback percentage instead.
reviews.review_countFlipkartWritten reviews, which Flipkart counts separately from ratings given.
listing_idFlipkartThe itm… listing id, alongside the pid in item_id.
price.unit / unit_labelWalmartPrice per unit of measure.
seller.is_first_partyWalmartSold by the marketplace itself. Always false on eBay, where every listing is a seller's own.
ingredients, directionsWalmartGrocery and drug listings only.

Response headers

HeaderDescription
X-Credits-RemainingBalance after this request.
X-Credits-Charged1 if billed, 0 if not.

Product-change webhooks Free pilot

Instead of polling a product, subscribe to it. We check the page about every 45 minutes and POST to your HTTPS endpoint when its price or stock changes. During the pilot, webhooks are available for Amazon stores in every country (amazon.com, amazon.ca, amazon.co.uk, amazon.de and the rest) and cost no credits. You can manage subscriptions in the dashboard or through the API below, using the same API key.

MethodPathPurpose
POST/v1/watch/amazonSubscribe to a product.
GET/v1/watchList your subscriptions.
DELETE/v1/watch/{id}Unsubscribe.

Subscribe

curl -X POST https://api.gravitrondata.com/v1/watch/amazon \
  -H "Authorization: Bearer gd_live_..." \
  -H "Content-Type: application/json" \
  -d '{"item_id": "B08N5WRWNW", "webhook_url": "https://your-app.com/hooks/gravitron"}'
FieldRequiredDescription
item_id or urlOne of themAn ASIN means amazon.com. For any other store, send the product URL: it keeps its store, so an amazon.ca link watches amazon.ca.
webhook_urlYesYour endpoint. Must be https://.
webhook_secretNoYour own signing secret. If you leave it out, we generate one.
check_minutesNoCheck interval for a new watch: 15 to 720 minutes. Default 45.

The same ASIN on two stores is two separate products, with their own price and stock. Outside amazon.com, the returned item_id names the store, for example 1506749305@amazon.ca. Prices are reported in the currency the store page shows.

The response holds the subscription id and your webhook_secret. The secret is returned only here, so store it. Subscribing twice to the same product with the same webhook URL returns the existing subscription with "created": false.

Payload

Each change is a POST with a JSON body:

{
  "event": "product.changed",
  "id": "5f0c3e9a7b2d4c1e8f6a0b9c2d3e4f5a",
  "marketplace": "amazon",
  "item_id": "B08N5WRWNW",
  "url": "https://www.amazon.com/dp/B08N5WRWNW",
  "title": "amazon:B08N5WRWNW",
  "detected_at": "2026-11-15T07:20:00+00:00",
  "diff": "(changed) In Stock: True - Price: 11.99\n(into) In Stock: True - Price: 9.99",
  "product": {
    "title": "Example Product Title",
    "url": "https://www.amazon.com/dp/B08N5WRWNW",
    "store": "amazon.com",
    "price": 9.99,
    "currency": "USD",
    "availability": "InStock",
    "in_stock": true
  }
}

product is the product as we last read it: title, store, price, currency and stock. availability is one of InStock, OutOfStock or PreOrder; it and price are null when the page did not show them. diff is a short text summary of what changed, capped at 4,000 characters.

HeaderDescription
X-Gravitron-EventAlways product.changed for now.
X-Gravitron-DeliveryThe event id. Use it to ignore duplicates: a retried delivery has the same id.
X-Gravitron-TimestampUnix time the delivery was signed.
X-Gravitron-Signaturesha256= followed by the HMAC (see below).

Delivery and retries

Reply with any 2xx within 15 seconds. Anything else, or no reply, is retried after 1 minute, 10 minutes, 1 hour and 2 hours. After 10 deliveries in a row fail every attempt, the subscription is disabled and shows as Disabled in the dashboard. Delete it and subscribe again once your endpoint is back.

Verifying signatures

Compute an HMAC-SHA256 of {timestamp}.{raw body} with your secret and compare it to the signature header. Use the raw request body, before any JSON parsing. Reject deliveries whose timestamp is more than five minutes old, so a captured request cannot be replayed.

import hashlib, hmac, time

def verify(secret: str, headers, raw_body: bytes) -> bool:
    ts = headers["X-Gravitron-Timestamp"]
    if abs(time.time() - int(ts)) > 300:
        return False
    expected = "sha256=" + hmac.new(
        secret.encode(), ts.encode() + b"." + raw_body, hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(expected, headers["X-Gravitron-Signature"])
// Node.js (Express: use express.raw({ type: "application/json" }) on this route)
const crypto = require("crypto");

function verify(secret, headers, rawBody) {
  const ts = headers["x-gravitron-timestamp"];
  if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;
  const expected = "sha256=" + crypto.createHmac("sha256", secret)
    .update(ts + "." + rawBody).digest("hex");
  const got = headers["x-gravitron-signature"] || "";
  return got.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(got), Buffer.from(expected));
}

Errors & retries

Errors return a JSON body with an error field.

StatusMeaningChargedWhat to do
200SuccessYes—
400Missing or invalid parametersNoSend item_id or url.
401Missing, malformed, invalid or revoked keyNoCheck the Authorization header.
402Out of creditsNoTop up in the dashboard.
404No product at that identifierYesDo not retry — the answer will not change.
429Rate limit exceededNoBack off and retry.
501Marketplace not yet availableNoDo not retry.
502 / 503Lookup failed on our sideNoRetry once after a short delay.

Build one retry into your client

These are live fetches of real marketplace pages behind commercial bot protection. Roughly 1 in 20 uncached lookups fails and returns 502. You are never charged for those, and a single retry almost always succeeds. We would rather state this plainly than have you discover it in production.

Rate limits

Limits are per account, set by the largest bundle you have purchased. Exceeding one returns 429 and costs nothing.

PlanRequests / minute
Free trial3
Starter8
Growth20
Scale120

Limits reflect real capacity rather than an arbitrary tier ladder. Every request is a live fetch of a marketplace page, so throughput — not storage — is the scarce resource. If you need sustained volume beyond the Scale tier, get in touch before building against it.

Caching & freshness

Responses are cached for five minutes per item. A cached response is returned in milliseconds instead of seconds, and still costs one credit.

If you are making pricing decisions on fast-moving items, treat any response as up to five minutes old. Marketplace prices and buy-box winners change continuously; a response describes a moment, not a steady state.

Code samples

Python

import requests, time

API = "https://api.gravitrondata.com/v1/walmart/price"
KEY = "gd_live_..."

def lookup(item_id, attempts=2):
    for i in range(attempts):
        r = requests.get(API, params={"item_id": item_id},
                         headers={"Authorization": f"Bearer {KEY}"}, timeout=90)
        if r.status_code < 500:
            r.raise_for_status()
            return r.json()
        time.sleep(1.5)          # our failure, not yours — never billed
    r.raise_for_status()

data = lookup("650209444")
print(data["price"]["current"], data["seller"]["name"])

Node.js

const API = "https://api.gravitrondata.com/v1/walmart/price";
const KEY = "gd_live_...";

async function lookup(itemId, attempts = 2) {
  for (let i = 0; i < attempts; i++) {
    const r = await fetch(`${API}?item_id=${encodeURIComponent(itemId)}`, {
      headers: { Authorization: `Bearer ${KEY}` },
    });
    if (r.status < 500) {
      if (!r.ok) throw new Error(`${r.status} ${await r.text()}`);
      return r.json();
    }
    await new Promise(res => setTimeout(res, 1500));
  }
  throw new Error("upstream unavailable");
}

PHP

<?php
$key = 'gd_live_...';
$url = 'https://api.gravitrondata.com/v1/walmart/price?item_id=650209444';

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ["Authorization: Bearer $key"],
    CURLOPT_TIMEOUT        => 90,
]);
$body = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

$data = json_decode($body, true);
echo $data['price']['current'];

Shell

# Full record
curl -s https://api.gravitrondata.com/v1/walmart/product \
  -H "Authorization: Bearer gd_live_..." \
  -G --data-urlencode "item_id=650209444" | jq .

# By URL instead of ID
curl -s https://api.gravitrondata.com/v1/walmart/price \
  -H "Authorization: Bearer gd_live_..." \
  -G --data-urlencode "url=https://www.walmart.com/ip/650209444"

Changelog

2026-11-15
Product-change webhooks, free pilot: subscribe to an Amazon product with POST /v1/watch/amazon or from the dashboard, and receive a signed product.changed POST when its price or stock changes. See Product-change webhooks.
2026-08-12
Flipkart is live: /v1/flipkart/product and /v1/flipkart/price. Adds the offers list — bank, exchange and no-cost-EMI offers, which move what a buyer actually pays — plus a real out-of-5 seller.rating and reviews.review_count separate from ratings given. All prices in INR; identifiers are the Flipkart pid.
2026-08-12
Home Depot is live: /v1/homedepot/product and /v1/homedepot/price. Adds the store block — pickup availability, the quantity a branch holds, and which branch that is — plus price.save_amount, price.save_percent and store_sku. Online stock and branch stock are reported separately because they move independently.
2026-08-12
eBay is live: /v1/ebay/product and /v1/ebay/price. Adds the auction block, seller.feedback_percent, availability.sold_quantity and fulfillment.item_location. International eBay sites are supported by passing a listing url. Credits are shared across marketplaces — nothing to buy again.
2026-08-12
Public launch. First marketplace endpoints (/product, /price), prepaid credits, per-account rate limits.

Something unclear or missing? Documentation gaps are bugs — tell us and we will fix them.