Skip to content
ChangelogImproved

eBay, AliExpress and Coupang product pages

API
Commerce Product reading an eBay item: the title, $136.99 sale price against a $249 list price, seller and gallery

Commerce Product now reads eBay, AliExpress and Coupang too, so item pages from these stores come back in the same price, stock, gallery and seller fields.

What you get

  • COMMERCE_PRODUCT takes the url of an item page on eBay, AliExpress or Coupang and reads it from the store's own country.
  • The same title, brand, price, listPrice, currency, inStock, seller, rating, reviewCount and images as the other storefronts.
  • eBay brings the item's gtin and its item condition, Coupang its options and delivery line, so the fields a page shows are the fields you get.
  • A page the store answers as removed or sold out ends the task with a failure code instead of an empty answer.

How it works

eBay's edge turns a product page away from a fresh exit and lets in an exit its search page let in before, so a read earns a visitor on the search page and asks the item as that visitor. One visitor serves the reads that follow.

AliExpress renders its item pages for a crawler's user agent only, which carries the title and photographs but no price. The price comes from the item's own card in a search for its name. AliExpress answers a query of ten words or more as no match, so the search carries the name's first eight words, and its page keeps no brand or GTIN.

Coupang turns plain requests away, so its pages are read on the browser session the Coupang lane keeps. A refusal comes back as NO_IP_AVAILABLE and the task is asked again on a new session, up to 6 minutes.

Each read stays on the store's own country and answers the values the page opens on, as the other storefronts do.

Where it helps

  • Read a secondhand listing in full: condition, seller, gallery and review count.
  • Track import prices on AliExpress and Coupang next to the same product at home.
  • Collect seller and gallery data for the stores that carry your category.

Send a request

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

curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskType": "COMMERCE_PRODUCT",
    "payload": { "url": "https://www.ebay.com/itm/366736231992" }
  }'

Request fields

taskTypestringRequired
The engine to run, such as CHATGPT or GOOGLE.
payload.urlstringRequired
A product page on one of the 12 storefronts, up to 2,048 characters. The URL picks the storefront and its country.
payload.countrystring
The storefront’s own country, such as US for Amazon or KR for Olive Young. It is also the default.
webhook.urlstring
An HTTPS address on your server. The finished task is posted there the moment it completes.

Response

A finished task looks like this, trimmed for length.

JSON
{
  "success": true,
  "task": {
    "id": "…",
    "taskType": "COMMERCE_PRODUCT",
    "status": "COMPLETED",
    "createdAt": "…"
  },
  "credits": { "creditsToCharge": 0.5, "creditsCharged": 0.5 },
  "response": {
    "site": "ebay",
    "country": "US",
    "url": "https://www.ebay.com/itm/366736231992",
    "productId": "366736231992",
    "title": "Apple AirPods Pro 3rd Wireless Active Noise Cancelling Earbuds - White MFHP4LL/A",
    "brand": "Apple",
    "price": 136.99,
    "listPrice": 249,
    "currency": "USD",
    "inStock": true,
    "seller": "quickshipelectronics",
    "rating": 4.89,
    "reviewCount": 9,
    "images": [
      "https://i.ebayimg.com/images/g/19QAAeSw8KJq9UoX/s-l1600.png"
    ],
    "gtin": "195950543698"
  }
}
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.pricenumber
What a shopper pays for the product as the page first shows it, before coupons and delivery, in currency (ISO 4217). listPrice is the struck-through regular price when it is above price.
response.imagesarray
Up to 30 photos from the product gallery, in page order.

Receive the result

The request returns the task right away with status QUEUED. Poll GET /v1/async/task/{id} until status is COMPLETED or FAILED, or add webhook.url and the finished task arrives at your server with the same task, credits and response. Results stay available for 24 hours after a task finishes.

curl https://api.querying.ai/v1/async/task/$TASK_ID \
  -H "Authorization: Bearer $QUERYING_API_KEY"

Pricing

A completed read uses 0.5 credits on eBay and AliExpress and 2 credits on Coupang, as its search does. Refused reads are not charged until the task ends.

More updates

Stay in the loop

Get new product updates in your inbox.

RSS feed