Piloterr
Referencia de la APIRuns

Get a download link to a run's results

GET
/v1/runs/{id}/export/link

A link to the file GET /v1/runs/{id}/export would send with the same query, which downloads without the API key until expires_at: the project's export_link_ttl_hours (24 hours by default, as the links of its delivery emails and webhooks), or expires_in_hours, up to 7 days. Each download goes through Dataflow (https://dataflow.piloterr.com/exports/…), which checks the link, records the download (time, IP) and redirects to the file for 60 seconds. Revoke it with DELETE /v1/export-links/{id} or all of the run's with DELETE /v1/runs/{id}/export/links: it then answers 410, as it does once expired or once the run's results are deleted. The file is written to the run's storage (a finished run's full export is the one stored when it ended; a filtered file of a finished run is written once and given again), and deleted with the run's results, 30 days after it finished. While the run goes, the rows stored so far: ask again for a newer file.

Autorización

ApiKeyAuth
headerX-Api-Key<token>

Parámetros de ruta

id*string

The run's id (GET /v1/projects/{id}/runs, or the answer of POST /v1/projects/{id}/runs)

Length1 <= length

Parámetros de consulta

format?string

The file's format

Default"json"
Value in"json""ndjson""csv""xlsx"
merged?string

The run with its retries: one line per row, the latest attempt winning (from any run of the family), in a file named run-{first run's id}-merged.{format}; the filters then apply to each row's latest attempt

Value in"true""false"
rows?string

ok: only the rows that succeeded (as status=ok), ko: only those that failed or were invalid (as status=failed). status wins when both are sent. Same columns as the full export; the file name ends in -ok or -ko.

Default"all"
Value in"all""ok""ko"
status?string

Only the rows with this status; failed: those that failed or were invalid, as many as the run's ko

Value in"ok""error""invalid""failed"
http_status?integer

Only the rows the API answered with this HTTP status

Range100 <= value <= 599
q?string

Only the rows holding this text, as /results?q= finds them, but across the whole run: the file is streamed, without the search's limit. The file name ends in -search- and 8 characters of the search's hash

Lengthlength <= 200
columns?string

CSV and XLSX only: these columns, comma-separated, in this order, instead of all of them. input.* for every input column; _status, _http_status, _error, _credits (what the row cost); any column of the full export (organic_results, hq.city); or a dotted path into the answer, array positions as numbers (organic_results.0.title). A column no row has stays, empty. JSON and NDJSON ignore it. The file name ends in -columns- and 8 characters of their hash

Lengthlength <= 8000
expires_in_hours?integer

Hours the link works, from 1 to 168; default: the project's export_link_ttl_hours

Range1 <= value <= 168

Cuerpo de la respuesta

The link

application/json
  1. response
id*|

The link's id, to revoke it (DELETE /v1/export-links/{id}); null on a server without encryption keys (local development), whose links are the storage's own

url*string

Downloads the file, no API key needed

expires_at*string

When the URL stops working

Example Request
curl -X GET 'https://dataflow.piloterr.com/v1/runs/string/export/link'
Example Response
{
  "id": "cm4j1q3rp000al208t7gv2mxd",
  "url": "https://dataflow.piloterr.com/exports/example-link-token",
  "expires_at": "2026-11-11T07:05:00.000Z"
}