Trawley
Search API

Diff endpoint

Compare two scrape runs to see what was added, removed, or changed.

The diff endpoint compares the results of two completed scrape runs of the same scraper and reports what changed. Use it to detect new listings, dropped items, or updated values between runs, for example to power a "what's new today" feed or a price-change alert.

Request

text
GET https://api.trawley.ai/v1/scrapers/{scraperId}/diff?jobId1={older}&jobId2={newer}

Query parameters

ParameterTypeDescription
jobId1stringThe first run to compare. Required.
jobId2stringThe second run to compare. Required.

Both jobs must belong to the scraper and must have completed.

cURL
curl "https://api.trawley.ai/v1/scrapers/scr_8f2a1c9e/diff?\
jobId1=job_a1&jobId2=job_b2"

How records are matched

Records are matched across the two runs using the scraper's first text field as a stable key (for example a title or a listing URL). A record present in one run but not the other is an addition or removal; a matched record whose contents changed is reported as a change.

If the scraper has no text field, there is no stable key to match on and the endpoint returns 400. Make sure your scraper captures something unique and stable, like a listing URL, to use diffs.

What's next