# Watchlists & pipelines

> For AI agents: the index of these docs is at https://scrapelyserp.com/docs/llms.txt (every page it lists has a Markdown version like this one).

Hand Scrapely up to 50,000 item ids and a schedule. Every run reads them, compares with what it read before, and pushes what changed (or what matched your rules) to your webhook and your bucket.

## What a watchlist is {#overview}

A watchlist is four things: a list of item ids on one platform and marketplace, a **schedule** (a cadence or a cron), a **pipeline** (which reads each run makes, and which outcomes reach you), and a **destination** (a webhook endpoint, every subscribed endpoint, and your S3 bucket if you export).

- You never poll: Scrapely runs the schedule, keeps the last snapshot of every item, and sends only what moved.
- A run is billed exactly like the same reads made as your own API calls: credits in proportion to the data they moved. Failed reads cost nothing and are retried next run.
- The pipeline is optional. Without one, each platform runs a default built to catch every change of price, stock or seller at the lowest cost.
- Up to 100 lists per account, 50,000 items each. Creating, editing and deleting lists is free.

:::hint{style="success" title="Register a webhook endpoint first"}
Events are signed with the receiving endpoint's own secret, so a list's `webhook_url` must be one of your [registered endpoints](/docs/webhooks#endpoints). The same data is always available to pull with `GET /v1/watchlists/{id}/items`.
:::

## Lifecycle of a list {#lifecycle}

1. **Create** it with ids, a schedule and (optionally) a pipeline and a webhook. The first run starts at once.
2. **Baseline.** The first read of every item records what it looks like now. It reports no changes: there is nothing to compare with yet. Items you add later get their own baseline on the next run.
3. **Runs.** On the schedule, each run reads the items through the pipeline and compares every answer with the last answer of the same kind.
4. **Events.** Changes and rule matches are sent in batches, delistings once, and `watchlist.run.completed` last, every run.
5. **Edit, pause, delete** any time: `PATCH` the schedule, pipeline, webhook or status; add and remove items; `DELETE` removes the list with its history.

| Item state | Means |
| --- | --- |
| `new` | Waiting for its baseline read. |
| `active` | Read on every run. |
| `delisted` | The retailer said `not_found`. Reported once, kept on the list, never read again. Add it again to give it another chance. |

## Pipelines {#pipelines}

A pipeline is up to 10 **steps**. Each step runs one **scraper** (a kind of read, with its own items per credit) over the items sent to it, and compares each answer with the last read of the same kind. Each step has up to 8 **routes**: a route picks items by outcome and sends them to another step (`run`), to you (`notify`), or both. Steps run once per run, in graph order; chains cannot loop.

Amazon's default pipeline shows the idea: a scan of everything at about 62.5 million ASINs per credit, a fuller read only for what moved, and a full baseline for new items.

```mermaid
flowchart TD
  start(["Run starts: schedule, or run now"]) --> which{"Which entry step?"}
  which -- "item never read before" --> baseline["baseline: amazon.full"]
  which -- "every 8th run (refresh)" --> check
  which -- "every other run" --> scan["scan: amazon.pulse"]
  scan -- "route: changed, run check" --> check["check: amazon.lite"]
  scan -- "unchanged" --> quiet["nothing more for this item"]
  check -- "route: changed, notify" --> changed["watchlist.product.changed"]
  baseline --> stored["snapshot stored, no event"]
  scan -- "not_found" --> delisted["watchlist.product.delisted"]
  check -- "not_found" --> delisted
  changed --> done(["watchlist.run.completed"])
  delisted --> done
  stored --> done
  quiet --> done
```

_Every item takes one path per run; only what moved is read at the expensive tier, and only what changed is sent._

### Routes {#routes}

| Key | Meaning |
| --- | --- |
| `when` | The branch: `new`, `changed`, `unchanged`, `ok`, `failed`, `not_found`, `always`. `new`: first read of this kind. `changed` / `unchanged`: a tracked field moved, or did not. `ok`: answered, whatever the values (test a value with `field` + `op`). `failed`: no answer this run. `not_found`: gone (the item is also delisted). `always`: any answer. |
| `field` | With `changed`: only a change to this field counts. With `ok`: the field `op` tests. |
| `op`, `value` | `increased`, `decreased`, `below`, `above`, `is`, `is_not`. `increased` and `decreased` compare with the last read; the others compare with `value`. |
| `run` | A step id: the matching items go through that step next, in the same run. |
| `notify` | `true`: send the matching items to you. A `changed` route sends `watchlist.product.changed`; any other branch sends `watchlist.product.matched`. |

Routes are independent: one item can match several (notify on any change, and also read every seller when the buy box changed hands). A pipeline also names its `entry` step, an optional `baseline` step for never-read items, and an optional `refresh`: every Nth run starts at another step.

### Scrapers {#scrapers}

| Scraper | Reads | Items per credit | Fields routes can test |
| --- | --- | --- | --- |
| `amazon.pulse` | Offer count and lowest new price. The cheapest way to notice that something moved. | about 62.5 million per credit | `newCount`, `newMinPrice` |
| `amazon.lite` | Buy box, stock, seller, offer counts, rating and delivery dates. | about 2.5 million per credit | `price`, `listPrice`, `inStock`, `availabilityType`, `merchant`, `isFba`, `offerListingId`, `condition`, `newCount`, `newMinPrice`, `usedCount`, `usedMinPrice`, `deliveryDate`, `rating` |
| `amazon.full` | Everything in prices & delivery, plus description, bullets, item specifics, variations and images. | about 575,000 per credit | `price`, `listPrice`, `inStock`, `availabilityType`, `merchant`, `isFba`, `offerListingId`, `condition`, `newCount`, `newMinPrice`, `usedCount`, `usedMinPrice`, `deliveryDate`, `rating` |
| `amazon.offers` | All offers on the listing: who holds the buy box, the lowest delivered price, how many sellers. | about 150,000–2.5 million per credit | `offerCount`, `buyboxSeller`, `buyboxPrice`, `lowestPrice` |
| `amazon.offer_check` | Checks the exact buy-box offer the last product step found. Cheap, and catches a pulled offer. | about 8 million per credit | `buyable` |
| `walmart.standard` | Price, stock and the rest of what the retailer shows. | about 1.3 million per credit | `price`, `listPrice`, `inStock`, `seller`, `byPlatform`, `clearance` |
| `target.standard` | Price, stock and the rest of what the retailer shows. | about 3 million per credit | `price`, `regularPrice`, `inStock`, `shipping`, `pickup` |
| `bestbuy.standard` | Price, stock and the rest of what the retailer shows. | about 1.4 million per credit | `price`, `regularPrice`, `inStock`, `purchasable`, `state` |
| `costco.standard` | Price, stock and the rest of what the retailer shows. | about 1.4 million per credit | `price`, `regularPrice`, `inStock`, `buyable` |
| `petsmart.standard` | Price, stock and the rest of what the retailer shows. | about 30,000 per credit | `price`, `priceMax`, `inStock` |
| `samsclub.standard` | Price, stock and the rest of what the retailer shows. | about 25,000 per credit | `price`, `listPrice`, `inStock` |
| `walgreens.standard` | Price, stock and the rest of what the retailer shows. | about 190,000 per credit | `price`, `regularPrice`, `inStock` |
| `cvs.standard` | Price, stock and the rest of what the retailer shows. | about 400,000 per credit | `price`, `listPrice`, `inStock` |
| `stockx.standard` | Price, stock and the rest of what the retailer shows. | about 400,000 per credit | `price`, `inStock`, `highestBid`, `lastSale` |
| `goat.standard` | Price, stock and the rest of what the retailer shows. | about 500,000 per credit | `price`, `inStock`, `lowestPriceUsed` |

`amazon.offer_check` checks the exact buy-box offer an earlier product or offers step found, so one of those must run before it; items without a known offer are `skipped`. `GET /v1/watchlists/scrapers?platform=…&marketplace=…` lists what can run in a marketplace, with ready-made templates.

### Ready-made pipelines {#templates}

| Template | Platform | Does |
| --- | --- | --- |
| Price & stock monitor | Amazon | Quick scan everything; confirm and notify what moved. Cheapest for big lists. |
| Buy-box watch | Amazon | Prices & delivery every run; when the buy box changes hands, read every seller. |
| Offer guard | Amazon | Check the exact buy-box offer each run; if it is gone, re-read the listing. |
| Deal hunter | Amazon | Quick scan; when the lowest price drops, read every seller and notify. |
| Price & stock monitor | Walmart, Target, Best Buy, Costco, PetSmart, Sam's Club | Notify when price, stock or seller changes. |
| Back in stock | Walmart, Target, Best Buy, Costco, PetSmart, Sam's Club | Notify only when an item comes back in stock. |
| Price drops | Walmart, Target, Best Buy, Costco, PetSmart, Sam's Club | Notify when the price goes down. |

Use one as is, or as the starting point of your own. This creates a Target list that tells you only when a price goes down:

:::codeGroup{syncKey="lang"}
```bash title="cURL"
curl -X POST "https://api.scrapelyserp.com/v1/watchlists" \
  -H "Authorization: Bearer $SCRAPELY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Price drops",
    "platform": "target",
    "ids": ["83887639", "1011697103"],
    "every": "1h",
    "webhook_url": "https://example.com/hooks/scrapely",
    "pipeline": {
      "entry": "check",
      "baseline": null,
      "refresh": null,
      "steps": [
        {
          "id": "check",
          "scraper": "target.standard",
          "routes": [
            {
              "when": "changed",
              "field": "price",
              "op": "decreased",
              "notify": true
            }
          ]
        }
      ]
    }
  }'
```
```python title="Python"
import os
import uuid
import requests

HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}

r = requests.post(
    "https://api.scrapelyserp.com/v1/watchlists",
    headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())},
    json={
        "name": "Price drops",
        "platform": "target",
        "ids": ["83887639", "1011697103"],
        "every": "1h",
        "webhook_url": "https://example.com/hooks/scrapely",
        "pipeline": {
            "entry": "check",
            "baseline": None,
            "refresh": None,
            "steps": [
                {
                    "id": "check",
                    "scraper": "target.standard",
                    "routes": [
                        {
                            "when": "changed",
                            "field": "price",
                            "op": "decreased",
                            "notify": True,
                        },
                    ],
                },
            ],
        },
    },
    timeout=30,
)
r.raise_for_status()
data = r.json()
```
```javascript title="Node.js"
const res = await fetch('https://api.scrapelyserp.com/v1/watchlists', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({
    name: 'Price drops',
    platform: 'target',
    ids: ['83887639', '1011697103'],
    every: '1h',
    webhook_url: 'https://example.com/hooks/scrapely',
    pipeline: {
      entry: 'check',
      baseline: null,
      refresh: null,
      steps: [
        {
          id: 'check',
          scraper: 'target.standard',
          routes: [
            {
              when: 'changed',
              field: 'price',
              op: 'decreased',
              notify: true,
            },
          ],
        },
      ],
    },
  }),
  signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
```
:::

**Full reference →** [`POST /v1/watchlists`](/reference/watchlists#create-watchlist), [`GET /v1/watchlists/scrapers`](/reference/watchlists#list-watchlist-scrapers)

## Default pipelines {#default-pipelines}

| Platform | Each run | A change is |
| --- | --- | --- |
| Amazon | A `pulse` scan of every item; a `lite` read of the items whose scan moved (plus those whose last buy box sat above the lowest offer, which a scan cannot see). New items get a `full` baseline. Every 8th run (`refresh_every_runs`, 0 to turn off, at most 1,000) reads everything at `lite` instead of the scan, to catch a buy-box seller change at the same price. | `price`, `inStock`, `availabilityType`, `isFba`, `offerListingId`, `merchant`, `condition`, `newCount`, `newMinPrice`, `usedCount`, `usedMinPrice` |
| Walmart | One `standard` read of every item. | `price`, `listPrice`, `inStock`, `seller`, `byPlatform`, `thirdPartySeller`, `offerId`, `clearance` |
| Target | One `standard` read of every item. | `price`, `regularPrice`, `inStock`, `shipping`, `pickup` |
| Best Buy | One `standard` read of every item. | `price`, `inStock`, `state`, `regularPrice`, `purchasable` |
| Costco | One `standard` read of every item. | `price`, `inStock`, `regularPrice`, `buyable` |
| PetSmart | One `standard` read of every item. | `price`, `inStock`, `priceMax` |
| Sam's Club | One `standard` read of every item. | `price`, `inStock`, `listPrice` |
| CVS | One `standard` read of every item. | `price`, `inStock`, `listPrice` |
| StockX | One `standard` read of every item. | `price`, `inStock`, `highestBid`, `lastSale` |
| GOAT | One `standard` read of every item. | `price`, `inStock`, `lowestPriceUsed` |
| Shopify stores | One `standard` read of every item. | `price`, `inStock`, `listPrice` |
| Every other retailer (193) | One read of every item at its standard tier. | `price`, `inStock`, `regularPrice` |

Prices within half a cent are equal. Amazon compares `merchant` by seller id. `PATCH` a list with `"pipeline": null` to go back to its default.

## What you receive {#events}

Each run sends, in this order and only when there is something to say: `watchlist.product.changed`, `watchlist.product.matched` and `watchlist.product.delisted`, then always `watchlist.run.completed`. Item events carry at most 500 items per delivery (`part` of `parts`).

| Event | Carries |
| --- | --- |
| `watchlist.product.changed` | Per item: `changes` (only the fields that moved, `{ before, after }`), `snapshot` (every tracked field now), and the `step` and `scraper` that saw it. |
| `watchlist.product.matched` | Per item: the `branch` that matched and the `values` the step read. |
| `watchlist.product.delisted` | Per item: when, which step saw it, and its `last_snapshot`. |
| `watchlist.mention.found` | Mention lists: per new post, the `query`, the `source` and the `post` itself. |
| `watchlist.run.completed` | The run: status, per-step counts, the credits charged (`credits`), and the list's state (including an auto-pause). |

Who receives them: the list's `webhook_url` endpoint, or every endpoint subscribed to the event when the list names none. With [S3 export](/docs/s3-export) on, every event is also written to your bucket. Payloads field by field: [Webhook events](/reference/webhook-events).

:::hint{style="success" title="Missed a delivery?"}
`GET /v1/watchlists/{id}/items?changed_since=<time>` returns every item that changed or was delisted since then, with its snapshot and `last_change`: the pull counterpart of the webhook.
:::

## Mention lists {#mentions}

A **mention list** watches words instead of item ids: a brand, a product, a person. Create it with `"platform": "mentions"`, up to 50 `queries` (one per search; quote a phrase to match it exactly) and optionally `sources` (default: all of them). Every run searches each query on each source, newest first, and sends every post it has not seen as `watchlist.mention.found`, each with its `query`, `source` and the `post` in the [shared post shape](/docs/social). Schedules, webhooks, pausing and `/items` (add or remove queries) work as on any list; there is no pipeline.

| Source | `sources` value | Searched |
| --- | --- | --- |
| Reddit | `reddit` | `GET /v1/structured/reddit/search`, newest first |
| Bluesky | `bluesky` | `GET /v1/structured/bluesky/search`, newest first |
| Lemmy | `lemmy` | `GET /v1/structured/lemmy/search`, newest first |
| Tumblr | `tumblr` | `GET /v1/structured/tumblr/search`, newest first |

The first run of a query on a source records what is already there and sends nothing, like a product list's baseline; so does a source you add later. Each search is billed like that call on the API, and one that fails costs nothing and is tried again next run.

## Billing {#billing}

A run is billed exactly like the same reads made as API calls: each step's calls are charged credits in proportion to the data they moved, and failed requests are never charged. `partial` and `unavailable` items are retried next run, before anything else. A run's charge is on the run as `credits`, and per step in `stats.steps`. `GET /v1/watchlists/{id}` shows `estimated_credits` for the next runs (from items per credit; the charge is measured).

| List | Schedule | Typical per run | 30 days, typically |
| --- | --- | --- | --- |
| 2,000 Walmart items, default pipeline | `15m` | 0.0016 credits | 4.61 credits |
| 10,000 Amazon ASINs, default pipeline | `15m` | 0.0002 credits per scan run, plus a `lite` read (about 2.5 million per credit) for each ASIN that moved; 0.004 credits on each refresh run | 1.84 credits, plus what moved |
| 500 Target items, price-drop template | `1h` | 0.0002 credits | 0.12 credits |

:::hint{style="warning" title="When the balance runs out"}
A run first holds its entry step's estimate (from its items and their items per credit), as an API call would. If your balance cannot cover the estimate the run is **skipped**: nothing is read or charged, and `watchlist.run.completed` arrives with `"status": "insufficient_credits"` and `stats.credits_needed`. After 3 skips in a row the list pauses (`paused_reason: "insufficient_credits"`): top up, then `PATCH` it to `"status": "active"`. If only a later step cannot be covered, its items wait for the next run (`stats.deferred`).
:::

## Managing lists {#managing}

| To | Use |
| --- | --- |
| Change the schedule, pipeline, webhook or name; pause or resume | `PATCH /v1/watchlists/{id}` ([Schedules](/docs/schedules) for `every` and `cron`) |
| Add or remove items | `POST /v1/watchlists/{id}/items` with `add` and `remove` (removals first). Added items get a baseline on the next run. |
| Run now | `POST /v1/watchlists/{id}/run`: billed like a scheduled run; works on a paused list; `409` while one is running. |
| See what happened | `GET /v1/watchlists/{id}/runs`: per-step counts and `credits` for the newest runs. |
| Read the current state | `GET /v1/watchlists/{id}/items`: every item with its last snapshot, paged. |

The same, field by field, with samples: [Watchlists reference](/reference/watchlists). `POST /v1/watchlists/{id}/asins` (the old name of `/items`) and the `asin_count` / `asins_by_state` fields still work.

---

## For AI agents

- This page for a human reader: https://scrapelyserp.com/docs/watchlists
- The whole space as one Markdown file: https://scrapelyserp.com/docs/llms-full.txt
- Live search + fetch over MCP: https://scrapelyserp.com/docs/_api/public/orgs/affc5b0f-d3c2-423a-8143-9d10db5736ae/spaces/981e6275-da3f-446c-82de-889f59c83b6f/mcp
  - Install (Claude CLI): `claude mcp add scrapely --transport http https://scrapelyserp.com/docs/_api/public/orgs/affc5b0f-d3c2-423a-8143-9d10db5736ae/spaces/981e6275-da3f-446c-82de-889f59c83b6f/mcp`

This Markdown is the same content the page renders — safe to quote and to ground answers in.
