API Examples

API Examples

Copy-paste code snippets for every ShelfRun API endpoint.

POSTPOST /v1/quickscan

Quick Scan a Store

Instantly scan any e-commerce store URL and get product data back.

curl -X POST https://shelfrun.com/v1/quickscan \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "allbirds.com", "limit": 10}'
GETGET /v1/stores

List Your Stores

Get all stores you're tracking with their current status.

curl https://shelfrun.com/v1/stores \
  -H "X-API-Key: YOUR_API_KEY"
GETGET /v1/stores/:id/products

Get Products from a Store

Retrieve all tracked products with prices, stock status, and images.

curl "https://shelfrun.com/v1/stores/STORE_ID/products?limit=50&offset=0" \
  -H "X-API-Key: YOUR_API_KEY"
POSTPOST /v1/scrape/:id

Trigger a Scrape

Start a new scrape for a specific store. Uses 1 credit.

curl -X POST https://shelfrun.com/v1/scrape/STORE_ID \
  -H "X-API-Key: YOUR_API_KEY"
GETGET /v1/search

Search Products

Full-text search across all your tracked stores.

curl "https://shelfrun.com/v1/search?q=running+shoes&limit=20" \
  -H "X-API-Key: YOUR_API_KEY"
GETGET /v1/usage

Check API Usage

Monitor your API usage, remaining credits, and rate limits.

curl https://shelfrun.com/v1/usage \
  -H "X-API-Key: YOUR_API_KEY"

Need an API key?