GravitronData

Documentation

One authentication scheme, two endpoints per marketplace, JSON in and out.

Authentication

Every request carries your key as a bearer token. Generate keys in the dashboard.

Authorization: Bearer gd_live_xxxxxxxxxxxxxxxxxxxx

Keys are shown once at creation. If you lose one, revoke it and generate another.

Base URL

https://api.gravitrondata.com

Endpoints

MethodPathReturns
GET/v1/walmart/productFull product record
GET/v1/walmart/pricePrice, availability and seller only

Parameters

NameRequiredDescription
item_idOne of the twoMarketplace item ID, e.g. 650209444
urlOne of the twoFull product URL

Example

curl https://api.gravitrondata.com/v1/walmart/price \
  -H "Authorization: Bearer gd_live_..." \
  -G --data-urlencode "item_id=974282675"
{
  "walmart_item_id": "974282675",
  "title": "L'Oreal Paris Lumi Glotion Liquid Face and Body Highlighter",
  "price": {
    "current": 14.97, "was": 17.99, "unit": 14.97,
    "currency": "USD", "is_reduced": true, "display": "$14.97"
  },
  "availability": {
    "in_stock": true, "status": "IN_STOCK", "transactable_offers": 1
  },
  "seller": {
    "name": "Walmart.com", "is_walmart": true,
    "rating": 4.29, "review_count": 3620
  }
}

Response headers

HeaderMeaning
X-Credits-RemainingYour balance after this call
X-Credits-Charged1 if this call cost a credit, 0 if not

Status codes

CodeMeaningCharged
200Product data returnedYes
400Missing or invalid parametersNo
401Missing, invalid or revoked keyNo
402Out of creditsNo
404No product at that IDYes — a real answer
429Rate limit exceededNo
501That marketplace is not live yetNo
502/503Lookup failed on our sideNo — credit returned

Retry once on 5xx

These are live fetches of real marketplace pages, and roughly 1 in 20 cold lookups fails. You are never charged for those, and a single retry almost always succeeds. Build one retry into your client.

import requests, time

def lookup(item_id, key, attempts=2):
    for i in range(attempts):
        r = requests.get(
            "https://api.gravitrondata.com/v1/walmart/price",
            params={"item_id": item_id},
            headers={"Authorization": f"Bearer {key}"}, timeout=90)
        if r.status_code < 500:
            return r.json()
        time.sleep(1)
    r.raise_for_status()

Rate limits

Limits are per account and depend on the largest bundle you have purchased: 5/min on the free trial, then 10, 20 or 40 requests per minute. Exceeding the limit returns 429 and costs nothing.