Exports
All matching items at once, as CSV or NDJSON, streamed.
/export writes every item that matches your filters in one answer, streamed as it is read: as CSV (for
spreadsheets and databases) or NDJSON (one JSON object per line, for programs). It takes the same filters as
/items.
curl -H "Authorization: Bearer $PRICANA_KEY" -o items.csv "https://pricana.io/api/v1/export?format=csv"curl -H "Authorization: Bearer $PRICANA_KEY" -o laptops.ndjson \
"https://pricana.io/api/v1/export?format=ndjson&category=computers-laptops"CSV columns
id, title, price, currency, url, image, category, category_path, site, source, first_seen_at, last_seen_at, last_changed_at, removed_at, attributes, brand, gtin, mpn, attribution
UTF-8 with a header row, comma-separated, quoted where needed. attributes holds the shop's further values as JSON.
New columns are only ever added at the end, so readers that go by position keep working. Cells that start with =, +,
- or @ get a leading ', so spreadsheets don't run them as formulas.
NDJSON
Each line is one item, as /items returns it:
import json, os, requests
with requests.get("https://pricana.io/api/v1/export", params={"format": "ndjson"},
headers={"Authorization": f"Bearer {os.environ['PRICANA_KEY']}"}, stream=True, timeout=3600) as r:
r.raise_for_status()
for line in r.iter_lines():
item = json.loads(line)
...Export rows
Exported rows count against your plan's export rows per month. The answer says how many it holds and how many are left:
| Header | |
|---|---|
X-Export-Rows | rows in this export |
X-Export-Rows-Remaining | rows left this month after it |
X-Export-Truncated | true if the export stopped at the monthly limit |
X-Export-Matching | with X-Export-Truncated: how many rows matched |
X-Export-Overage | true: rows beyond the month's quota, billed (paid plans) |
On paid plans, rows beyond the month's quota are billed as overage, as the pricing page says; the export is
complete. On Free, during the trial, and where overage is switched off (on request, see
Limits), an export that would go beyond what is left ends at the limit (it doesn't fail), and
with nothing left it answers 429. Narrow it with filters (by dataset, category or changedSince) or choose a bigger
plan. The portal's Export page shows the rows left before you start.
Exports in sync jobs
A nightly export plus changedSince is a simple way to keep a copy fresh: export once, then each night export only what
changed since the last run, with status=all: removed items come with removedAt set, so you can delete them from your
copy (without it, removals never reach you). For changes within minutes, use the change feed.