Documentation menu
Pagination
Paginate, sort and filter lists, such as the counties in a state.
Lists return one page at a time. Filter with the list’s parameters, order with sort, and use next_cursor to get the next page.
Paginate a list
- 1
Request the first page
Setsize, and addtotal=trueif you want a count:Terminalcurl -G 'https://api.placestack.com/v1/jurisdiction' \ --data-urlencode 'state=MI' \ --data-urlencode 'tier=subregion' \ --data-urlencode 'size=2' \ --data-urlencode 'total=true' \ -H "Authorization: Bearer $PLACESTACK_API_KEY" - 2
Read the list
Items are indata. The other fields describe the page:JSON{ "object": "list", "data": [ ... ], "has_more": true, "next_cursor": "eyJ2IjoyLCJzIjoibmFtZSIsImsiOiJBbGdlciBDb3VudHkiLCJ0Ijoi...", "suppressed": 0, "total": { "value": 83, "relation": "eq" } } - 3
Request the next page
Send the same request withcursorset tonext_cursor. Repeat untilhas_moreis false.Terminalcurl -G 'https://api.placestack.com/v1/jurisdiction' \ --data-urlencode 'state=MI' \ --data-urlencode 'tier=subregion' \ --data-urlencode 'size=2' \ --data-urlencode 'cursor=eyJ2Ijoy...' \ -H "Authorization: Bearer $PLACESTACK_API_KEY"
Sorting
Set sort to a field, with a leading - for descending, and send the same sort on every page. Each list’s reference names its sort fields. Any other field returns field_unknown.
curl -G 'https://api.placestack.com/v1/parcel' \
--data-urlencode 'fips=37183' \
--data-urlencode 'min_acres=5' \
--data-urlencode 'sort=-market_value' \
-H "Authorization: Bearer $PLACESTACK_API_KEY"Results for address or owner are ordered by match quality and can’t be sorted. Jurisdiction lists are ordered by tier, largest first, then by name.
Filtering
Each list’s reference names its filters. Repeat a parameter to match any of its values. For a range, use min_ and max_, together or alone. This finds parcels of 5 to 50 acres in two North Carolina counties:
curl -G 'https://api.placestack.com/v1/parcel' \
--data-urlencode 'fips=37183' \
--data-urlencode 'fips=37135' \
--data-urlencode 'min_acres=5' \
--data-urlencode 'max_acres=50' \
-H "Authorization: Bearer $PLACESTACK_API_KEY"Items with no value for a range field are excluded. For example, a parcel with no area is excluded by min_acres.
List object
Errors
An invalid parameter, sort or cursor returns 422: