Blog / API guides

StockX API: Product and Resale Price Data as JSON

The StockX API on Perceptlayer returns StockX product and market data as JSON: one GET /v1/stockx/search call returns a page of products, each with its lowest_ask, highest_bid, last_sale, 90-day average price and sales counts, at 1 credit per successful call. Two more endpoints cover a single product and its sales. This guide shows the search request, its parameters, a recorded response, a script that tracks resale prices for a sneaker list, and what that costs in credits.

Which StockX endpoints are there?

There are three StockX endpoints, and search does most of the work. search returns a page of products with their market figures already attached, product returns one product, and sales returns a product's sales, optionally for one size. All three cost 1 credit per successful call, a failed call costs nothing, and each one needs a country and a currency, so every figure you store comes with the market it was read in.

Endpoint Returns Required parameters Optional parameters Credits
GET /v1/stockx/search A page of products with market data sort, page, country, currency query, category, brand, gender, min_price, max_price 1
GET /v1/stockx/product One product country, currency url, slug, id 1
GET /v1/stockx/sales A product's sales product, country, currency size 1

Only the search endpoint has a recorded response in this guide, so the fields below all come from search. For the shape of product and sales responses, run them in the playground on the StockX API page, or read the product endpoint and sales endpoint pages.

How do you search StockX products?

Send a GET request to https://api.perceptlayer.com/v1/stockx/search with your key in the X-API-Key header and the four required parameters. Add query for a keyword, and narrow with brand, category, gender or a price range. This is the request behind the recorded response used throughout this guide:

curl "https://api.perceptlayer.com/v1/stockx/search?query=jordan+4&sort=lowest_ask&page=1&country=US&currency=USD" \
  -H "X-API-Key: $API_KEY"

Keys start with sk_live_. Where you can't set a header, the key can go in the api_key query parameter; the authentication docs cover both. Every successful response carries X-Credits-Used and X-Credits-Remaining, so a job can log what each call cost.

Which parameters does the search endpoint take?

The search endpoint takes ten parameters, four of them required. The table lists each with the constraints the API documents; nothing else about them is documented, so test a filter in the playground before you rely on how it narrows results.

Parameter Type Required Documented constraint
query string no Up to 200 characters
category string no Up to 60 characters
brand string no Up to 400 characters
gender string no No further constraint documented
min_price number no No further constraint documented
max_price number no No further constraint documented
sort string yes One of featured, lowest_ask, price_premium, recent_asks, volatility, average_price
page integer yes No further constraint documented
country string yes One of US, DE, GB
currency string yes One of USD, EUR, GBP

The recorded response echoes query, country, currency and sort back at the top of data, which is worth logging with every run so each stored price records the search that produced it.

What does a StockX search result contain?

Each item in data.items is one product with its identity, its catalogue details and a block of market figures: the lowest ask, the highest bid, the last sale, averages over 90 days and a year, sales counts, and the ask count per delivery level. This is the recorded response, trimmed to the first item and the paging block:

{
  "success": true,
  "data": {
    "query": "jordan 4",
    "country": "US",
    "currency": "USD",
    "sort": "lowest_ask",
    "items": [
      {
        "id": "b9dc5dd4-05ec-4f97-8fa7-6808802c0b83",
        "slug": "air-jordan-4-retro-vivid-sulfur-womens",
        "url": "https://stockx.com/air-jordan-4-retro-vivid-sulfur-womens",
        "title": "Jordan 4 Retro Vivid Sulfur (Women's)",
        "model": "Jordan 4 Retro",
        "brand": "Jordan",
        "gender": "women",
        "category": "sneakers",
        "condition": "New",
        "release_date": "2024-04-06",
        …
        "sizes_count": 25,
        "lowest_ask": {
          "amount": 12,
          "currency": "USD"
        },
        "lowest_ask_updated_at": "2026-11-11T06:57:02Z",
        "all_in_price": {
          "amount": 18.91,
          "currency": "USD"
        },
        "highest_bid": {
          "amount": 122,
          "currency": "USD"
        },
        "ask_count": 434,
        "ask_levels": {
          "standard": {
            …
            "ask_count": 434
          },
          "express_standard": {
            …
            "ask_count": 117
          },
          …
        },
        "last_sale": {
          "amount": 69,
          "currency": "USD"
        },
        "price_premium": -0.674,
        "volatility": 0.38852,
        "annual_average_price": {
          "amount": 132,
          "currency": "USD"
        },
        "annual_sales_count": 1515,
        "average_price_90d": {
          "amount": 124,
          "currency": "USD"
        },
        "sales_last_90d": 152,
        "sales_last_72h": 16
      },
      …
    ],
    "pagination": {
      "page": 1,
      "page_size": 40,
      "page_count": 25,
      "total": 1000,
      "has_more": true
    }
  },
  "meta": {
    "endpoint_family": "search",
    "request_id": "req_34511ce3baab4c70bcdda87da9814f30",
    "credits_charged": 1,
    "credits_remaining": 1918
  }
}
Field What a price tracker does with it
id, slug, url Identify the product across runs
lowest_ask.amount, lowest_ask_updated_at The current ask and when it last changed
all_in_price.amount Stored next to the ask; it's higher than lowest_ask in both recorded items
highest_bid.amount The bid side; absent on the second recorded item
last_sale.amount The most recent sale price
average_price_90d.amount, annual_average_price.amount Baselines to compare the ask against
sales_last_90d, sales_last_72h, annual_sales_count How liquid the product is
price_premium, volatility Figures you can also sort by
ask_levels Ask counts per delivery level: standard, express_standard and others

Which fields can be missing?

Not every product carries every figure. In the recorded response, the second item, "Jordan 4 RM Bred (TD)", has no highest_bid and no sales_last_72h, and its ask_levels holds two levels where the first item holds four. Read these fields as optional and store an empty value, not a zero, when they're absent. Note also that the first item's lowest_ask of 12 sits far below its average_price_90d of 124, and the search item doesn't say which of its sizes_count 25 sizes the ask belongs to. When the size matters, look at the sales endpoint, which takes a size.

How do you get one product or its sales?

To look up one product, call GET /v1/stockx/product with country, currency and one of url, slug or id. Each search item carries an id, a slug and a url, so the names match the product endpoint's parameters; try a slug from your own search in the playground to see the product response before you build on it. Each call costs 1 credit.

For sales, call GET /v1/stockx/sales with product, country and currency, and add size (up to 30 characters) to narrow it to one size. This guide has no recorded sales response, so it doesn't describe the fields; run it on the sales endpoint page with one of your products to see what comes back, and what product value it accepts, before you write code against it.

How do you track resale prices for a sneaker list?

The simplest tracker runs one search per sneaker each day, finds the item whose slug matches the one you're tracking, and appends its market figures to a CSV file. It reads only fields that appear in the recorded response, treats highest_bid and sales_last_72h as optional, and records "not found" when the slug isn't on the page. It waits on a 429 or 503 using Retry-After.

import csv
import datetime
import os
import time

import requests

API_KEY = os.environ["API_KEY"]
URL = "https://api.perceptlayer.com/v1/stockx/search"
WATCHLIST = [
    {"query": "jordan 4 vivid sulfur", "slug": "air-jordan-4-retro-vivid-sulfur-womens"},
    {"query": "jordan 4 rm bred", "slug": "air-jordan-4-rm-bred-td"},
]


def search(query, attempts=3):
    params = {"query": query, "sort": "lowest_ask", "page": 1, "country": "US", "currency": "USD"}
    for _ in range(attempts):
        r = requests.get(URL, params=params, headers={"X-API-Key": API_KEY}, timeout=60)
        if r.status_code in (429, 503):
            time.sleep(int(r.headers.get("Retry-After", "5")))
            continue
        r.raise_for_status()
        return r.json()["data"]["items"]
    raise RuntimeError(f"gave up on {query}")


def amount(item, key):
    value = item.get(key)
    return value["amount"] if value else ""


today = datetime.date.today().isoformat()
with open("stockx_prices.csv", "a", newline="") as f:
    out = csv.writer(f)
    for entry in WATCHLIST:
        items = search(entry["query"])
        hit = next((i for i in items if i["slug"] == entry["slug"]), None)
        if hit is None:
            out.writerow([today, entry["slug"], "not found"])
        else:
            out.writerow([
                today,
                hit["slug"],
                amount(hit, "lowest_ask"),
                amount(hit, "all_in_price"),
                amount(hit, "highest_bid"),
                amount(hit, "last_sale"),
                amount(hit, "average_price_90d"),
                hit.get("sales_last_90d", ""),
                hit.get("sales_last_72h", ""),
                hit.get("lowest_ask_updated_at", ""),
            ])
        time.sleep(1)

The one-second pause keeps the script inside the free tier's 1 request a second; paying accounts run at least 5 a second. Run it from cron once a day. To track the same sneakers in Germany or the UK, add rows with country=DE and currency=EUR, or country=GB and currency=GBP; each combination is a separate call.

What should the job do with errors?

Every error comes back with an HTTP status and a JSON body with code, message and request_id, and costs nothing. Treat invalid_parameters (422) as a bug in your watchlist, for example a country outside US, DE and GB, and source_error (502) as a reason to retry later. Requests have no idempotency key, so a client timeout can hide a call that succeeded and was billed. The errors docs list every code.

What does StockX price tracking cost?

StockX price tracking costs 1 credit per successful call, so the bill is the number of searches you run. A watchlist costs one call per sneaker, per market, per day. A market scan costs one call per page: the recorded "jordan 4" search reports 25 pages of 40, so reading all 1,000 products is 25 credits, or 0.025 credits per product.

Plan Arithmetic Credits
20 sneakers, US, daily for 30 days 20 × 1 × 30 × 1 credit 600
50 sneakers, US, daily for 30 days 50 × 1 × 30 × 1 credit 1,500
50 sneakers, US, DE and GB, daily for 30 days 50 × 3 × 30 × 1 credit 4,500
Full "jordan 4" scan (25 pages), daily for 30 days 25 × 30 × 1 credit 750

The 100 free credits on signup cover the first plan for 5 days, or four full 25-page scans. After that, the first three plans each fit the Starter pack's 10,000 credits, the second for six months. Purchased credits last 12 months, with no subscription. See pricing for what credits cost and the credits docs for how debits work.

To try it, run search in the playground on the StockX API page with a sneaker from your list, check that its slug comes back, then get a free API key and schedule the script. The marketplaces APIs page lists other resale sources, and Vinted Scraper or API covers second-hand fashion.

APIs in this post

Frequently asked questions

How much does a StockX API call cost?

Each successful call to search, product or sales costs 1 credit, and a failed call costs nothing and returns X-Credits-Used: 0. One search call returns a page of products with their market figures; the recorded "jordan 4" search reports 40 per page. Tracking 50 sneakers once a day is 50 × 30 = 1,500 credits a month.

Can I get StockX prices in euros or pounds?

Yes. Every StockX endpoint requires country, one of US, DE or GB, and currency, one of USD, EUR or GBP. The recorded response echoes both back in data, and each price object carries its own currency field. Each country and currency combination is a separate call at 1 credit, so store the pair with every price.

Can I get prices for one size?

The sales endpoint takes an optional size parameter of up to 30 characters next to product, country and currency. This guide has no recorded sales response, so check its fields in the playground on the sales endpoint page before you build on them. Search results report a product-level lowest_ask and a sizes_count, not a price per size.

How fast can I run StockX checks?

Request rates are per account, shared by all its keys, and counted per minute. Free accounts get 1 request a second, 60 a minute. Paying accounts run at least 5 a second, 300 a minute, depending on the pack. Every response carries RateLimit-Remaining and RateLimit-Reset, and a 429 carries Retry-After. The rate limits docs have the details.

Can an AI agent look up sneaker prices?

Yes. Through the MCP server at https://perceptlayer.com/mcp, an agent finds the StockX endpoints with search_endpoints, reads their parameters with get_endpoint (both free) and runs a search with call_endpoint, which spends credits only on success and reports the credits used and remaining. The AI agents docs show the setup for Claude Code and other clients.

  1. Etsy Scraper or API: What You Get

    An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked.

  2. Etsy API: Product Data as JSON

    One GET to /v1/etsy/product returns an Etsy listing's price, discount, stock, variations and images as JSON, at 10 credits per successful call.

  3. Vinted Scraper or API: What You Get

    A Vinted scraper vs 10 endpoints: one recorded search returned 24 items with price, service_fee and total_item_price for 1 credit, about 0.04 credits per item.

Start with 100 free credits

No password to set. We email you a sign-in link, and your key works on every API.

No credit card. 100 free credits on signup.