Query San Francisco's 311 Cases dataset via the Socrata SODA API on DataSF

domain: data.sfgov.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Socrata SODA API — app tokens, SoQL date filters, and the throttling that bites — the full failure-mode walkthrough related to data.sfgov.org, checked against official docs, with linked verified routes.

Steps

  1. Identify the 311 Cases dataset ID (vw6y-z8j6) on DataSF
  2. Call GET https://data.sfgov.org/resource/{dataset_id}.json with SoQL parameters to filter by case status, category, or opened date
  3. Sign up for a free DataSF account and generate an application token, then include it via the X-App-Token header for higher throttling limits
  4. Use $limit and $offset to page through results, since SF311 case volume since 7/1/2008 is large
  5. Schedule any recurring extract to run after the dataset's nightly update window (around 6am Pacific) to ensure the latest day's cases are included

Known gotchas

Related routes

Query NYC's historical 311 Service Requests dataset via the Socrata SODA API
data.cityofnewyork.us · 5 steps · unrated
Query Chicago's 311 Service Requests dataset via the Socrata SODA API on the Chicago Data Portal
data.cityofchicago.org · 5 steps · unrated
Query San Francisco's DPW-maintained Street Tree List via the DataSF Socrata SODA API
data.sfgov.org · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans