DataSF open data portal · Search permits
data-sf-gov/building-permits/search_permitsSearch property, job and marketplace listings with DataSF open data portal · Search permits from Alexandria through one Spiral API key. Search permits. It runs in the background and returns structured JSON. Pay as you go, with no subscription.
Pricing
$0.00873 per call.
Limits
- Runs
- In the background
- Returns
- json
- Longest queue wait
- 1 hour
- Run deadline
- 5 minutes
- Longest run, end to end
- 225 minutes
- Largest inline input
- 1 MB
- Largest input file
- 2 GB
- Largest output
- 5 GB
Input
| Field | Kind | Default | Description |
|---|---|---|---|
zip | text | — | ZIP code of the address (94110). Pattern: ^[0-9]{5}$. |
sort | one of issued_desc, applied_desc, updated_desc, valuation_desc | issued_desc | issued_desc: newest issued first (unissued last); applied_desc: newest filed first; updated_desc: most recently added or changed first; valuation_desc: largest cost estimate first. |
limit | number 1 to 100 | 25 | Records per page. |
cursor | text | — | next_cursor from the previous page; repeat the same filters with it. Pattern: ^[0-9]{1,7}$. |
status | text | — | Case-insensitive substring of the status: issued, complete, filed, expired, cancelled. |
address | text | — | Case-insensitive substring of the site address, street number and name (1940 Broadway, 3865 19th St). Anything after a comma and units (#2, Unit 2) are ignored; Street, Avenue, Boulevard and similar become DBI's St, Av, Bl, and 3rd becomes 03rd. Searches every address of a permit. |
parcel_id | text | — | Assessor block and lot, exact: 3600/103, 3600-103 or the blklot 3600103 (block 4 digits plus optional letter, lot 3 digits plus optional letter). |
contractor | text | — | Case-insensitive substring of the firm or person name of any contact on the permit (contractor, architect, engineer, agent ...): Skyline, Stricklin. |
permit_type | text | — | Case-insensitive substring of the permit type or the building's proposed (else existing) use: new construction, demolition, otc alterations, sign, apartments, office. |
issued_since | text | — | Only permits issued on or after this day, YYYY-MM-DD. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$. |
issued_until | text | — | Only permits issued on or before this day, YYYY-MM-DD. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$. |
applied_since | text | — | Only permits filed on or after this day, YYYY-MM-DD. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$. |
applied_until | text | — | Only permits filed on or before this day, YYYY-MM-DD. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$. |
min_valuation | number 0 to … | — | Only permits whose DBI cost estimate is at least this many USD. |
updated_since | text | — | YYYY-MM-DD (midnight UTC) or RFC 3339 timestamp: only permits DataSF added or changed at or after it (Socrata :updated_at). Poll with the time of your last check and sort updated_desc. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}([Tt ][0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2}))?$. |
contractor_license | text | — | Exact licence number of a contact, as in contractors[].license_number or contractor_activity (a CSLB number such as 727637). Pattern: ^[A-Za-z0-9]+$. |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "alexandria",
"model": "data-sf-gov/building-permits/search_permits",
"input": {
"zip": "<zip>"
}
}'Frequently asked questions
How much does DataSF open data portal · Search permits cost?
$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.
How do I use DataSF open data portal · Search permits through an API?
Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "data-sf-gov/building-permits/search_permits"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.
Do I need an account with Alexandria to use DataSF open data portal · Search permits?
No. Spiral runs it on its own Alexandria account and charges your Spiral balance.
Can my AI agent use DataSF open data portal · Search permits?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.