Skip to content
ChangelogNew

Commerce stores get their own endpoints, with sort and price filters

API
A Walmart search for wireless earbuds on POST /v1/commerce/walmart/search with three ranked products at $23.28, $16.99 and $13.99, beside the store prices: 0.5 credits on Walmart, 1 on Amazon and 2 on Coupang

Each of the 15 Commerce stores has its own search and product endpoint that takes the store’s sort, price range and filters, and a completed request on 12 of them now costs 0.5 credits, down from 3.

What you get

  • POST /v1/commerce/{site}/search on 15 stores: Amazon, Walmart, Target, eBay, AliExpress, Google Shopping, Sephora, Ulta, Coupang, Olive Young, Musinsa, Rakuten, Yahoo! Shopping, Qoo10 and Flipkart.
  • POST /v1/commerce/{site}/product on the same 15 stores, with the productId a search returns or the page url. Google Shopping takes url.
  • The store’s own options: sort, minPrice, maxPrice and page where the store applies them, and filters such as brand and soldByWalmart on Walmart, storeId on Target and freeShipping on Rakuten.
  • A lower price: a completed search or product page costs 0.5 credits on 12 stores, 1 on Amazon and 2 on Google Shopping and Coupang. Every store cost 3 before.

How it works

The body is flat JSON: the store’s fields beside idempotencyKey, priority and webhook, with no taskType or payload. The endpoint waits for the task as POST /v1/sync/task does, up to 290 seconds or what Prefer: wait asks, and answers 202 with Location while the task still runs.

Sort names are the same on every store: relevance (the default, the store’s own order), price_asc, price_desc, rating, reviews, newest, best_selling and discount. Each store takes the ones that change its results, and its docs page lists them. minPrice and maxPrice are whole units of the store’s currency. page reads a later results page, and rank counts from 1 within that page. Google Shopping and Coupang take query and limit.

A field outside the store’s list answers 400 VALIDATION_ERROR, and a missing, mistyped or out-of-range value answers 422 VALIDATION_ERROR, with the field as sent in details[].field. POST /v1/async/task takes the same options in the COMMERCE_SERP payload, and the response echoes the options it was given under the same names.

Where it helps

  • Every morning, list the cheapest wireless earbuds between $20 and $50 on Walmart with sort price_asc, minPrice and maxPrice.
  • Follow your product’s rank on the second results page of Amazon with page 2.
  • Read one product’s price on Amazon, Walmart and Target through each store’s product endpoint, and compare them.
  • Check a K-beauty line on Olive Young and Qoo10 every day at 0.5 credits a search.

Send a request

Send the request with your API key in the Authorization header.

curl -X POST https://api.querying.ai/v1/commerce/walmart/search \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "wireless earbuds", "limit": 3 }'

Request fields

querystringRequired
The search, written the way a shopper types it into the store’s search box. 1 to 500 characters.
sortstring
The order of the results: relevance (the default, the store’s own order), price_asc, price_desc, rating, reviews, newest, best_selling or discount. Each store takes the sorts its docs page lists.
minPricenumber
Lowest price, in whole units of the store’s currency. A fraction rounds inward, and either bound works alone.
maxPricenumber
Highest price, in whole units of the store’s currency. A fraction rounds inward, and either bound works alone.
pageinteger
The store’s results page to read, from 1 to its last page (10 on most stores). rank counts from 1 within that page. Default 1.
limitinteger
Products to return, from 1 to the store’s maximum: 40, or 45 on Rakuten and 60 on eBay, Sephora, Ulta and Musinsa. Default 20.
webhook.urlstring
An HTTPS address on your server. The finished task is posted there the moment it completes.

Response

The response, trimmed for length.

JSON
{
  "success": true,
  "task": {
    "id": "…",
    "taskType": "COMMERCE_SERP",
    "status": "COMPLETED",
    "createdAt": "…"
  },
  "credits": { "creditsToCharge": 0.5, "creditsCharged": 0.5 },
  "response": {
    "site": "walmart",
    "query": "wireless earbuds",
    "country": "US",
    "returnedCount": 3,
    "products": [
      {
        "rank": 1,
        "productId": "19988265343",
        "title": "Wireless Earbuds, 40Hour Battery Life, IPX6 Water Resistance, Touch Controls, for Cycling, Running and Working Out",
        "url": "https://www.walmart.com/ip/Wireless-Earbuds-40-Hour-Battery-Life-IPX6-Water-Resistance-Touch-Controls-for-Cycling-Running-and-Working-Out/19988265343",
        "price": 23.28,
        "currency": "USD",
        "rating": 4.6,
        "reviewCount": 60
      },
      {
        "rank": 2,
        "productId": "20857668382",
        "title": "Bloydek Wireless Earbuds In-Ear Earbuds,Bluetooth 5.4,Strong Noise Cancellation,IPX5 Waterproof,Touch Control,Type-C Fast Charge,Gaming Low Latency",
        "url": "https://www.walmart.com/ip/Bloydek-Wireless-Bluetooth-In-Ear-Earbuds-Bluetooth-5-4-Strong-Noise-Cancellation-IPX5-Waterproof-Touch-Control-Type-C-Fast-Charge-Gaming-Low-Latency/20857668382",
        "price": 16.99,
        "currency": "USD",
        "rating": 5,
        "reviewCount": 81
      },
      "…"
    ]
  }
}
task.statusstring
QUEUED, PROCESSING, then COMPLETED with the answer or FAILED with error.
credits.creditsChargedinteger
Credits charged for the finished task. A failed task charges 0.
response.returnedCountinteger
The number of products in products.
response.productsarray
Products in the storefront’s order: rank, productId, title and url, plus price, currency, rating, reviewCount, imageUrl and brand when the results page shows them.

Pricing

Each completed search or product page costs its store’s price, charged when the task completes. Plans and credits: https://querying.ai/pricing

  • 0.5 credits: Walmart, Target, eBay, AliExpress, Sephora and Ulta (US), Olive Young and Musinsa (KR), Rakuten, Yahoo! Shopping and Qoo10 (JP), and Flipkart (IN).
  • 1 credit: Amazon (US).
  • 2 credits: Google Shopping (US) and Coupang (KR).

More updates

Stay in the loop

Get new product updates in your inbox.

RSS feed