The export endpoint streams all of a scraper's results as a downloadable file. It pages through the full result set for you, so a single request returns everything rather than one page.
Request
text
GET https://api.trawley.ai/v1/scrapers/{scraperId}/export?format=json
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
format | string | json | Output format. One of json or csv. |
JSON
curl -L "https://api.trawley.ai/v1/scrapers/scr_8f2a1c9e/export?format=json" \
-o results.json
The response is sent as a file attachment named after your scraper (for example
acme_listings_results.csv). CSV columns are your scraper's field names.
Passing any format other than json or csv returns 400 Bad Request.
When to use export vs results
| Use export when | Use the results endpoint when |
|---|---|
| You want the entire dataset in one file | You want to page through results in your app |
| You are loading into a spreadsheet or warehouse | You need a small, fast slice |
| A download is the end product | The data feeds further requests |