Firecrawl Alexandria

DataSF open data portal

San Francisco's open data portal (data.sf.gov, a Socrata site): typed Department of Building Inspection building permits (search by address, parcel, contractor, type, status and dates, poll for new and changed permits, read one permit with its contractors, architects and engineers, rank contractors by permits and valuation), plus search the dataset catalog, read a dataset's metadata and columns, query and count rows of any dataset with SoQL ($select/$where/$order/$group/$q and bare field filters, including spatial functions), and list the portal's category and tag facets.

1 Firecrawl tool uses DataSF open data portal

Try DataSF open data portal now.

Choose an example or ask your own question.

DataSF open data portal
TRY ASKING
1Request
stringRequired

4x4 id (for example `3i4a-hu95`) or a data.sf.gov / data.sfgov.org URL containing it.

string

Row offset to start from: the `next_cursor` of the previous page.

object

Bare equality filters sent as `field=value` query parameters (for example {"blklot": "3720009"}); keys must be column field names, values strings.

string

number

Rows per page. The portal caps a request at 50000; wide datasets with geometry should use far less.

string

Default: all columns.

string

5 credits
Codefollows the fields above
const result = await firecrawl.scrape({
  alexandria: {
    provider: "data-sf-gov",
    capability: "open-data/rows",
    options: {
      dataset_id: "3i4a-hu95",
      limit: 5,
      select: "zoning_sim,districtna,gen",
      where: "intersects(the_geom,'POINT(-122.3966 37.7897)')",
    },
  },
});
2Response example

This is a sample shape. Press Run to see live data from DataSF open data portal.

{
  "columns": [
    {
      "datatype": "text",
      "field_name": "zoning_sim"
    },
    {
      "datatype": "text",
      "field_name": "districtna"
    },
    {
      "datatype": "text",
      "field_name": "gen"
    }
  ],
  "count": 1,
  "data_last_modified": "Mon, 21 Sep 2026 11:24:25 GMT",
  "dataset_id": "3i4a-hu95",
  "limit": 5,
  "next_cursor": null,
  "observed_at_ms": 1790056202526,
  "offset": 0,
  "rows": [
    {
      "districtna": "DOWNTOWN- OFFICE (SPECIAL DEVELOPMENT)",
      "gen": "Commercial",
      "zoning_sim": "C-3-O(SD)"
    }
  ],
  "source_url": "https://data.sf.gov/resource/3i4a-hu95.json?%24select=zoning_sim%2Cdistrictna%2Cgen&%24where=intersects%28the_geom%2C%27POINT%28-122.3966+37.7897%29%27%29&%24order=%3Aid&%24limit=5"
}

City and County of San Francisco, Department of Building Inspection, via DataSF. Open Data Commons Public Domain Dedication and License (PDDL). (https://data.sf.gov/d/i98e-djp9)

Skills

Official skills using DataSF open data portal

Permit turnaround peer benchmarkUse when a city building official or permitting director must show council how long permits take versus peer cities. Finds building-permit datasets on Socrata and DataSF, computes issue times by permit type from the raw records, normalises by population and housing growth from Census data, and drafts a benchmark with method notes.

For one city and three to five peers that publish permit records. Turnaround claims are only fair when computed the same way from raw rows.

1. Find comparable datasets

  1. Search Search datasets (query "building permits") for each peer's portal domain. Keep dataset_id and portal.

  2. For San Francisco, find the permits table with Datasets (query "building permits").

  3. Read field names with Describe dataset and Dataset. Identify application date, issue date, permit type and valuation columns; never guess them.

2. Compute turnaround

  1. For each portal, pull the last 12 months of issued permits with Query dataset (select application and issue dates, permit type; where issue date in window). For San Francisco use Rows, sized first with Row count.

  2. Compute median and 90th percentile days from application to issue for new residential, alterations and commercial.

3. Normalise

  1. Pull population and housing units for each city with Data (acs/acs1 or acs5) to express permits per 1,000 units.

Write the benchmark

  • Table: city, permit type, permits issued, median days, P90 days, permits per 1,000 units.

  • Method notes: fields used per city, excluded records, any city whose dates are not comparable.

  • Where we stand: rank and gap to the best peer for each type.

  • Sources: dataset ids, query filters, ACS tables. Say which peers publish no usable dates and what could not be found.

View skill

Quality, speed and cost, last 24 hours, across every agent call to DataSF open data portal through Alexandria.

Fewer than 20 calls in the last 24 hours, so there is not enough to report yet.

Browse the library
//
Get started
//
Give your agent DataSF open data portal.
One API key for the live web and every provider in Alexandria.
Are you an AI agent? See setup options