For the complete documentation index, see llms.txt. This page is also available as Markdown.

Updating your Open Data Portal API Queries to data.sf.gov

To keep your tools working after the Open Data Portal migration, you’ll need to update any API queries that reference data.sfgov.org. The steps below walk you through the full update process using exa

Step-by-Step: Update Your API URLs

1. Update the base domain

Anywhere you have:

https://data.sfgov.org

change it to:

https://data.sf.gov

2. Find your dataset’s identifier

Each dataset has a unique 4x4 ID (for example ydr8-5enu). You can find this in the Open Data Portal:

  • Open the dataset

  • Click Export → SODA API

  • Your API endpoint and dataset ID appear there

Reference:

3. Update the API endpoint path

Most SODA API users will be using one of these:

SODA2-style:

SODA3-style:

Reference docs:

4. Test your updated queries

Use a browser, Postman, cURL, or your app to test the updated URLs. A successful request returns JSON data.

5. Update tokens or credentials

If you previously used an App Token, API key, or username/password, keep using them. Some SODA3 requests may require authentication.

6. Deploy your updates

Roll out updated URLs across all scripts, dashboards, apps, and integrations. Check for:

  • 404 errors → typo or wrong dataset ID

  • 401 errors → missing API token

  • Empty responses → incorrect endpoint type

7. Complete your migration by Nov 20, 2026

After this date, data.sfgov.org API endpoints will stop working.


Troubleshooting Tips

  • 404 Not Found: Check dataset ID and endpoint path.

  • Query errors: Confirm SoQL syntax.

  • Slow responses: Add filters or limits.

  • Auth problems: Check your App Token.


Last updated