Documentation menu
Export records
Getting a result set out of Placestack and into a spreadsheet, a warehouse or a GIS, without losing what the answer said about its own coverage.
Two routes out. A collection you can page through is rows over HTTP, which is the right answer for anything that fits in a few thousand records. Anything larger is an extract: a job you start, that writes files and tells you when they are ready.
In the console
Saved has an Exports tab listing your extract jobs. To start one, make the API call below.
Pricing a job first
POST /extract?dry_run=true returns the row estimate and the credits it will cost, one per row, and starts nothing. When the job runs, that estimate is set aside from your balance, and anything it does not use is returned when it finishes. Run it first: the coverage sidecar is what tells you how much of the scope the file will not be able to speak for.
curl -X POST 'http://localhost:8000/extract?dry_run=true' \
-H 'X-API-Key: $PLACESTACK_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"resource": "permission",
"scope": { "state": "NC" },
"filter": { "level": { "in": "by_right,conditional_use" } },
"format": "csv"
}'Drop dry_run to start the job. It comes back with an ext_ id and a state of queued, then moves through running to succeeded, failed, cancelled or, once its files age out, expired. Poll GET /extract/{extract}, or pass a webhook id in the request and be told.
What you can export
One resource per job, scoped and filtered the same way its collection is, and pinned to a date with as_of and known_as_of if you need the answer as it stood then. Narrow the columns with field.
jurisdictiondistrictpermissioncontrolordinancesectionmoratoriumcasepermitparcelpropertytransactioncoveragechange_event
Formats
jsonl- One record per line, the shape the API returns.
parquet- Columnar, for a warehouse.
csv- Flat, for a spreadsheet.
geojson- Features, where the resource has geometry.
gpkg- GeoPackage, for desktop GIS.
fgb- FlatGeobuf, for streaming geometry.
Files and sidecars
A finished extract carries a list of files, each with a role. There is the data file, and then a manifest, a layer file and a coverage file. Every file names its byte count and its SHA-256.
A flat format cannot carry the coverage block inside a row, so when you ask for CSV the job is marked derived: true and that block goes into a file beside it.