Market NinjaMarket Ninja
Workflows

Scrape sessions

Retrieving exactly what you just scraped via the extension — checking a session's status and pulling its data once it's merged

Every scrape from the extension — a single page or a bulk run — becomes one scrape session, scoped to your own account. GET /products and the other endpoints on this site search the whole shared dataset; these three endpoints only ever return your own data.

You don't create or choose a session id yourself — the extension generates one automatically each time you start a scrape. GET /me/scrapes is how you find it.

Listing your recent scrapes

curl -H "Authorization: Bearer mn_live_..." \
  "https://data.marketninja.ru/v1/me/scrapes"
{
  "data": [
    {
      "id": "b1f8b6b0-2f7d-4a1a-9a3c-2f6d8e9a1234",
      "status": "processing",
      "stats": { "total": 40, "pending": 12, "processing": 0, "merged": 28, "rejected": 0, "flagged": 0 },
      "metadata": { "source_type": "bulk", "intent": "data", "url_count": 40 },
      "created_at": "2026-08-04T10:15:00.000Z",
      "updated_at": "2026-08-04T10:16:42.000Z"
    }
  ],
  "meta": { "total": 1, "page": 1, "page_size": 100 }
}

Most recent first, no filter parameters — this is always your own account's history.

Checking a session's status

status is completed once nothing in the session is still pending/processing anymore — not "every item successfully merged." Use stats for the exact breakdown.

curl -H "Authorization: Bearer mn_live_..." \
  "https://data.marketninja.ru/v1/me/scrapes/b1f8b6b0-2f7d-4a1a-9a3c-2f6d8e9a1234"
The background merge step runs on a schedule, not instantly — right after a scrape, status is almost always processing. Poll this endpoint (or just re-request .../products below) until it flips to completed, rather than assuming a single scrape is done the moment the extension finishes.

Getting the scraped data

Once you have a session id, this is the actual "give me what I just scraped" endpoint — it returns every submission in the session, not only the ones already merged:

curl -G -H "Authorization: Bearer mn_live_..." \
  "https://data.marketninja.ru/v1/me/scrapes/b1f8b6b0-2f7d-4a1a-9a3c-2f6d8e9a1234/products" \
  --data-urlencode "page_size=100"
{
  "data": [
    { "submission_status": "merged", "product": { "id": "e86bee19-...", "name": "..." } },
    { "submission_status": "pending", "product": null }
  ],
  "meta": { "total": 40, "page": 1, "page_size": 100 }
}

product is null until that specific item has been merged — this is deliberate, not a bug: omitting not-yet-merged rows entirely would make a fresh scrape look like an empty page for the first minute or so. A merged product is the exact same object shape GET /products returns.

Your daily data quota is only charged for rows that actually carry a merged product — a pending placeholder costs nothing, so polling a still-processing session repeatedly is free.

Last updated on

On this page