Responses & statuses

Every item endpoint answers the same way: one result per item, each with a status that tells you what to do, plus a summary and the credits the call was charged.

Embed
Preview of the card
<a href="https://scrapelyserp.com/docs/responses"><img src="https://scrapelyserp.com/docs/_api/public/orgs/affc5b0f-d3c2-423a-8143-9d10db5736ae/spaces/981e6275-da3f-446c-82de-889f59c83b6f/pages/fec9384f-8788-47d0-ab2b-f3e2badde4dc/social-card.svg?v=3e7ae33eec8b" alt="Responses &amp; statuses" width="600" height="315"></a>

Every item endpoint answers the same way: one result per item, each with a status that tells you what to do, plus a summary and the credits the call was charged.

What happens to a call

An item call is checked, estimated, read item by item, and charged for the data it moved. A problem with the request itself is an HTTP error and costs nothing; a problem with one item is a status on that item, inside a 200.

flowchart TD
  req["POST /v1/products: platform, marketplace, ids, tier"] --> valid{"Well-formed?"}
  valid -- "no" --> e400["400: nothing charged"]
  valid -- "yes" --> funds{"Balance covers the estimate?"}
  funds -- "no" --> e402["402 INSUFFICIENT_CREDITS: nothing charged"]
  funds -- "yes" --> hold["Hold set aside"]
  hold --> read["Every item read, data metered"]
  read --> answered["Answered requests: counted"] & failed["No answer, blocked, errors: free"]
  answered --> settle["Charged for the data moved, rest of the hold returned"]
  failed --> settle
  settle --> resp["200: results in request order, stats, credits"]

Request errors cost nothing; you pay only for the data of answered requests.

The envelope

Field

What it holds

platform, marketplace

Where the data came from.

tier

The tier that answered (products). Amazon also echoes include when you sent it.

results

One entry per unique id, in the order you sent them.

stats

requested (unique ids), ok, partial, notFound, unavailable and elapsedMs.

credits

What the call was charged, in credits: a fractional number, in proportion to the data its answered requests moved. Also the X-Scrapely-Credits header.

Always 200

A well-formed item call answers 200, even when every item is unavailable. Branch on each result's status, not on the HTTP status. HTTP errors mean the request itself was refused (Errors & retries).

Item statuses

Status

Meaning

What to do

Cost

ok

The item was found and read.

Use it. Out-of-stock items are ok too, with availability.inStock: false.

What reading it moved

partial

Found, but key fields (such as price or stock) could not be read.

Do not trust price or stock. Ask again later (on Amazon, or at a higher tier).

What came back

not_found

The retailer says the item does not exist.

Delist it. Do not retry.

The answer that said so (very little)

unavailable

No answer this time.

Retry later. It is never evidence the item is gone.

Usually nothing: unanswered, blocked and failed requests are free

not_found is reported only when the retailer itself says so; a failed lookup is always unavailable. That is what makes it safe to delist on not_found, and why watchlists do. You pay for data, not statuses: a call is charged for what its answered requests moved, whatever the statuses of its items (What you pay for).

Common fields

Every product result carries these neutral fields when the retailer and tier have the data. A field the retailer does not show is left out, never sent empty.

Field

Type

Description

id

string

The item id you sent (cleaned up).

status

string

ok, partial, not_found or unavailable.

fetchedAt

string

When this item was read (ISO 8601).

title

string

The product name.

url

string

The product page.

price

{ amount, currency }

The current (featured) price, in the marketplace currency.

availability

{ inStock, message? }

inStock is true only when it can be bought now; message is the retailer's own words.

seller

{ id?, name }

Who sells the featured offer.

fulfillment

{ byPlatform, name? }

byPlatform is true when the retailer itself ships it.

images

string[]

Image URLs, primary first.

Retailer-specific detail sits in an object named after the platform: walmart, target, bestbuy, costco, petsmart, samsclub, ebay, walgreens, cvs, bjs, tcgplayer, taylormade, staples, kohls, officedepot, ikea, poshmark, gamestop, dicks, golfgalaxy, grailed, macys, maccosmetics, sephora, albertsons, newegg, ulta, whatnot, kroger, homedepot, wayfair, shopify, academy, fivebelow, dollargeneral, familydollar, hottopic, ace, londondrugs, leatherman, funko, forgeandfiregaming, loungefly, banggood, overstock, dhgate, redbubble, costway, rooftopdefense, wish, vidaxl, dell, hp, alibaba, corsair, fanatics, panini, sparkfun, ubiquiti, nbatopshot, depop, etsy, hackernews, devto, wikipedia, rss, aliexpress, reverb, microcenter, ahiddenfortress, adidas, verizon, aldo, amc, harleydavidson, claires, azck, currys, officesupply, steelcity, steakltd, allkeyshop, ninningame, hmv, antonline, entertainmentearth, mezcotoyz, quill, spencers, canadacomputers, amiami, bandai, asics, pokene, barnesnoble, beckettcastle, mcfarlane, pishop, buckscardshop, coolstuffinc, krikzz, supreme, bladehq, premierecollectibles, smkw, bruteforce, tackledirect, brotherusa, canon, boxlunch, hallmark, theworks, pacsun, sundayred, booksamillion, journeys, potterybarn, buildabear, hersheys, yeti, canakit, cardgiants, partyanimal, cinemark, coach, fnac, katespadeoutlet, scheels, canadiantire, collectorstore, geminicollectibles, millenniumgames, toysrus, crocs, boots, hobbylobby, misfittoys, deepdiscount, skatewarehouse, titleist, sharkninja, hasbropulse, goldstarcollectibles, farmandfleet, dlttrading, disneystore, fye, goodsmileus, gamenerdz, lego, louisvuitton, magicmadhouse, marshalls, meijer, merchbar, michaels, netprocards, miniaturemarket, nintendo, premiumbandai, operationparts, on, partycity, popcultcha, popmart, qvc, rackroomshoes, rei, razer, secondipity, pbs, schylling, scrubdaddy, spotampa, spirithalloween, tjmaxx, topps, toywiz, topdeckhero, v1tactical, vangogh, upperdeck, underarmour, vitacost, warhammer, wizardtower, wilson, waterstones, yardinflatables, zappos, zwoodknives, iherb, opensea, cardrush, hlj, mecchajapan, banquetrecords, totalcards, stoneisland, prodirect, nobleknight, ssense, shoppersdrugmart, mercari, vinted. Amazon keeps its detail at the top level (buybox, offers, delivery, full). See the retailer pages.

Timing

Item calls answer in seconds for a few hundred ids and can take a minute or two at the largest sizes. Allow 300 seconds client-side. If a call runs short of time, the items not yet read come back unavailable, and moved nothing you pay for, rather than the whole call failing.

Smaller calls finish proportionally faster. For the lowest latency, send several smaller calls in parallel within your concurrency.

Headers worth reading

Header

Use it to

X-Request-Id

Quote a call to support. On every response.

X-Scrapely-Credits

What this call was charged, in credits.

X-Scrapely-Balance

What is left, in credits. Track spend without another call.

X-RateLimit-Remaining, Retry-After

Pace yourself (Rate limits).

Every header, the item envelope field by field, pagination and idempotency: API reference overview.

Updated