Spiral gives your agent every tool with one account. Browse the tools →

AlexandriaListingsAvailable now

DataSF open data portal · Search permits

data-sf-gov/building-permits/search_permits

Search 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

FieldKindDefaultDescription
ziptext—

ZIP code of the address (94110). Pattern: ^[0-9]{5}$.

sortone 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.

limitnumber
1 to 100
25

Records per page.

cursortext—

next_cursor from the previous page; repeat the same filters with it. Pattern: ^[0-9]{1,7}$.

statustext—

Case-insensitive substring of the status: issued, complete, filed, expired, cancelled.

addresstext—

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_idtext—

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).

contractortext—

Case-insensitive substring of the firm or person name of any contact on the permit (contractor, architect, engineer, agent ...): Skyline, Stricklin.

permit_typetext—

Case-insensitive substring of the permit type or the building's proposed (else existing) use: new construction, demolition, otc alterations, sign, apartments, office.

issued_sincetext—

Only permits issued on or after this day, YYYY-MM-DD. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

issued_untiltext—

Only permits issued on or before this day, YYYY-MM-DD. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

applied_sincetext—

Only permits filed on or after this day, YYYY-MM-DD. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

applied_untiltext—

Only permits filed on or before this day, YYYY-MM-DD. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

min_valuationnumber
0 to …
—

Only permits whose DBI cost estimate is at least this many USD.

updated_sincetext—

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_licensetext—

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.