# How to connect DataSF open data portal to ChatGPT

> Connect DataSF open data portal to ChatGPT with the Firecrawl plugin. Use DataSF open data portal as an MCP tool in ChatGPT via Firecrawl Alexandria.

To connect DataSF open data portal to ChatGPT, add the Firecrawl plugin to ChatGPT, sign in on a Firecrawl team with Alexandria enabled, and ask for DataSF open data portal data in plain language. The connection works in ChatGPT and Codex, and you set it up once.

ChatGPT uses DataSF open data portal as an MCP tool through Firecrawl's hosted MCP server, so you don't install or host a separate MCP server for DataSF open data portal.

ChatGPT is OpenAI's AI assistant. Plugins add tools from other services, and the Firecrawl plugin adds web search, scraping and every data provider in Firecrawl Alexandria.

## How do I connect DataSF open data portal to ChatGPT?

### 1. Install the Firecrawl plugin

Open the [Firecrawl listing in ChatGPT's plugin directory](https://chatgpt.com/plugins/plugin_asdk_app_6a314a73f8ac819195b0d55e36b9c609?q=firecrawl) and select Install plugin. You can also open Plugins in ChatGPT or Codex and search for Firecrawl.

[Add to ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6a314a73f8ac819195b0d55e36b9c609?q=firecrawl)

![The Firecrawl plugin page in ChatGPT with the Install plugin button](https://www.firecrawl.dev/images/alexandria/connect/chatgpt/install.webp)

### 2. Connect your Firecrawl account

ChatGPT opens Firecrawl in your browser. Sign in, choose a team with Alexandria enabled, and approve access. No account yet? You can create one for free in the same flow.

![Firecrawl's consent screen asking to connect chatgpt.com to Firecrawl](https://www.firecrawl.dev/images/alexandria/connect/chatgpt/authorize.webp)

### 3. Attach Firecrawl to a chat

Start a new chat so it loads the plugin, open the + menu and choose Firecrawl. You can also ask ChatGPT to use Firecrawl by name.

![ChatGPT's + menu with the Firecrawl plugin listed](https://www.firecrawl.dev/images/alexandria/connect/chatgpt/attach.webp)

### 4. Ask ChatGPT for the data

Ask in plain language and mention DataSF open data portal or Firecrawl Alexandria. ChatGPT finds the DataSF open data portal capability that fits and runs it. For example:

```text
Use Firecrawl to find up to five tabular DataSF datasets about zoning and show their IDs, descriptions and published column names.
```

## What can ChatGPT do with 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.

ChatGPT can run any of DataSF open data portal's 8 capabilities through Alexandria. Each call is billed in Firecrawl credits on your Firecrawl team.

- **Dataset**: Metadata and the column list of one DataSF asset from /api/views/<4x4>.json: name, description, category, tags, attribution, license, provenance, creation/update timestamps, publishing department and frequency, custom metadata fields, and every column with its SoQL field_name (which can differ from the display name and may be truncated to 10 characters on legacy imports), datatype (text, number, calendar_date, point, multipolygon ...), description and cached value statistics (counts and top values). Also returns the landing source_url and the SODA api_url. Unknown ids are not_found. Costs 5 Firecrawl credits per call.
- **Datasets**: Search the DataSF catalog through the Socrata Discovery API (search_context=data.sf.gov): free-text query, asset type, category, tags and sort order, or look up one asset by its 4x4 id. Each result carries the 4x4 dataset id, name, type (dataset, map, filter, href, chart, story ...), description, category, tags, timestamps, column field names and datatypes, download and view counts, the landing link, permalink and, for tabular datasets, the SODA api_url to pass to `rows`. Paged by `limit` and an opaque `cursor`. An unknown `dataset_id` is not_found; a query with no match is a successful empty result. Costs 5 Firecrawl credits per call.
- **Facets**: The DataSF portal's category or tag facets with asset counts, from the Discovery API domain_categories / domain_tags endpoints scoped to data.sf.gov. Use the values as `category` / `tags` inputs to `datasets`. Costs 5 Firecrawl credits per call.
- **Row count**: Number of rows of a DataSF dataset matching optional `where`, `q` and `filters`, from `$select=count(*)` on the SODA endpoint. Returns the integer count and the exact request URL. An unknown dataset id is not_found; a SoQL error is invalid_input. Costs 5 Firecrawl credits per call.
- **Rows**: Query rows of any DataSF dataset through the SODA 2.1 endpoint https://data.sf.gov/resource/<4x4>.json with SoQL: `select` (columns, aggregates such as count(*)), `where` (SoQL predicates incl. like, between, intersects(the_geom,'POINT(lon lat)'), within_circle(point, lat, lon, meters), within_box), `order`, `group`, `q` (full text) and `filters` (bare field=value equality parameters), paged with `limit` (1-50000, default 100) and `cursor` (row offset). Without `order` (and without `group`) the program orders by the row id `:id` so pages are stable. Rows come back exactly as published: numbers and dates are strings, geometry is GeoJSON; `columns` lists the returned field names and Socrata types from the X-SODA2-Fields/Types headers. An unknown dataset id is not_found; a SoQL error (unknown column, bad syntax) is invalid_input carrying the portal's message; an empty page is a successful result with count 0. Costs 5 Firecrawl credits per call.
- **Contractor activity**: Rank the contractors on San Francisco building permits issued in a date window by permit count, then total DBI cost estimate, in one grouped SODA request joining Building Permits (i98e-djp9) with Building Permits Contacts (3pee-9qhc). Contractors are grouped by CSLB licence number, each with the firm name, permits, total valuation, first and last issue date in the window and a source_url listing those permits. Owner-builders (licence OWN or OWNER) and contacts without a licence are left out. Optional permit type or use words and ZIP. A window without contractors is a successful result with count 0. Costs 5 Firecrawl credits per call.
- **Get permit**: One San Francisco building permit by DBI permit number, with the shared permit fields, every contact DBI lists (contractors with CSLB licence numbers, architects, engineers, agents) and raw: the permit's primary-address row with every Building Permits column exactly as published (block, lot, unit, stories, occupancy and construction types, estimated and revised cost, existing and proposed use and units, priority programs, supervisor district, neighborhood, site permit, ADU and reroof flags). Unknown numbers are not_found. Costs 5 Firecrawl credits per call.
- **Search permits**: Search San Francisco building permits from the Department of Building Inspection (DataSF dataset i98e-djp9, about 1.15 million permits, loaded daily) by street address, ZIP, Assessor block/lot, contractor or other contact name or licence number, permit type or building use, status, issue, filing and last-updated dates and minimum valuation. Newest issued first by default, or newest filed, most recently changed or largest valuation. Each record has the shared permit fields (number, type, use, description, status, filed, issued and completed dates, address, ZIP, coordinates, block/lot parcel_id, DBI cost estimate, net housing units) with every contact DBI lists (contractors with their CSLB licence numbers, architects, engineers, agents) from Building Permits Contacts (3pee-9qhc), a source_url and the PDDL licence. An empty page is a valid result. Costs 5 Firecrawl credits per call.

## What should I ask ChatGPT?

Name DataSF open data portal or Firecrawl Alexandria in the prompt so ChatGPT reaches for it.

- [Use Firecrawl to find up to five tabular DataSF datasets about zoning and show their IDs, descriptions and published column names.](https://chatgpt.com/?q=Use%20Firecrawl%20to%20find%20up%20to%20five%20tabular%20DataSF%20datasets%20about%20zoning%20and%20show%20their%20IDs%2C%20descriptions%20and%20published%20column%20names.)
- [Use Firecrawl to show the published description, update time and SoQL column names for DataSF zoning dataset 3i4a-hu95.](https://chatgpt.com/?q=Use%20Firecrawl%20to%20show%20the%20published%20description%2C%20update%20time%20and%20SoQL%20column%20names%20for%20DataSF%20zoning%20dataset%203i4a-hu95.)
- [Use Firecrawl to count rows in DataSF zoning dataset 3i4a-hu95 whose zoning_sim value starts with RH-1.](https://chatgpt.com/?q=Use%20Firecrawl%20to%20count%20rows%20in%20DataSF%20zoning%20dataset%203i4a-hu95%20whose%20zoning_sim%20value%20starts%20with%20RH-1.)
- [Use Firecrawl to group rows in DataSF zoning dataset 3i4a-hu95 by zoning_sim and show the ten most frequent zoning values with row counts.](https://chatgpt.com/?q=Use%20Firecrawl%20to%20group%20rows%20in%20DataSF%20zoning%20dataset%203i4a-hu95%20by%20zoning_sim%20and%20show%20the%20ten%20most%20frequent%20zoning%20values%20with%20row%20counts.)

### For agents

Start with the `data-sf-gov` provider. Use Firecrawl Alexandria first. With MCP, use firecrawl_search with sources: ["alexandria"] to discover relevant tools, firecrawl_find_tools to inspect the selected capability contracts, then firecrawl_scrape in alexandria mode to retrieve records. With the CLI, use firecrawl search alexandria, firecrawl list, then firecrawl scrape for the selected provider/capability. Follow the live tool schema and returned contract; never invent provider IDs or inputs. Ask for missing required details before execution, respect access and pricing, and inspect each result for errors. Cite retrieved records, distinguish missing data from failures, and explain gaps. If no suitable Alexandria capability exists, say so before using web sources. Do not treat a tool listing as retrieved data.

## Troubleshooting

### Why doesn't ChatGPT use DataSF open data portal?

Start a new chat after installing so ChatGPT loads the plugin, then attach Firecrawl from the + menu and name DataSF open data portal or Firecrawl Alexandria in the prompt.

### How do I switch the Firecrawl team ChatGPT uses?

Open the Firecrawl plugin page in ChatGPT, uninstall it from the menu next to Settings, then install it again and choose the other team on Firecrawl's consent screen.

### Why does ChatGPT say DataSF open data portal isn't available?

Alexandria needs a Firecrawl team with Alexandria enabled. Reinstall the plugin and pick that team when you approve access.

## Use DataSF open data portal in other AI apps

- [DataSF open data portal in Claude](https://alexandria.firecrawl.dev/providers/data-sf-gov/connect/claude)
- [DataSF open data portal in Cursor](https://alexandria.firecrawl.dev/providers/data-sf-gov/connect/cursor)
- [DataSF open data portal in Grok Bot](https://alexandria.firecrawl.dev/providers/data-sf-gov/connect/grok-bot)
- [DataSF open data portal in Muse](https://alexandria.firecrawl.dev/providers/data-sf-gov/connect/muse)

### Other data providers you can connect to ChatGPT

- [How to connect Connecticut Solar and Battery Installs (data.ct.gov) to ChatGPT](https://alexandria.firecrawl.dev/providers/data-ct-gov/connect/chatgpt)
- [How to connect National Weather Service API (api.weather.gov) to ChatGPT](https://alexandria.firecrawl.dev/providers/api-weather-gov/connect/chatgpt)
- [How to connect ArcGIS public GIS layers to ChatGPT](https://alexandria.firecrawl.dev/providers/arcgis-com/connect/chatgpt)
- [How to connect Auction.com to ChatGPT](https://alexandria.firecrawl.dev/providers/auction-com/connect/chatgpt)

Full setup guide: [Firecrawl in ChatGPT](https://www.firecrawl.dev/integrations/chatgpt)

## Frequently asked questions

### What is Firecrawl?

Firecrawl is the web data API to search, scrape and interact with the web at scale. It turns websites into clean, LLM-ready data for AI agents and apps. The Firecrawl plugin brings those tools into ChatGPT, along with every data provider in Firecrawl Alexandria.

### What is Firecrawl Alexandria?

Firecrawl Alexandria is Firecrawl's library of 550+ data providers for AI agents, DataSF open data portal among them. Each provider returns structured data through documented capabilities. ChatGPT finds the capability that fits your question and calls it through the Firecrawl plugin, so you don't write any integration code. Alexandria needs a Firecrawl account signed in on a team with Alexandria enabled, or an API key from such a team; keyless connections don't include it.

### Is there a DataSF open data portal MCP server for ChatGPT?

ChatGPT reaches DataSF open data portal through Firecrawl's hosted MCP server, which serves DataSF open data portal and every other Alexandria provider as tools. Add the Firecrawl plugin once and you don't install or host a separate MCP server for DataSF open data portal.

### What does connecting DataSF open data portal to ChatGPT unlock?

ChatGPT can run all 8 of DataSF open data portal's capabilities, including Dataset, Datasets and Facets, from any chat, with structured results it can sort, compare and summarize. For example, ask: "Use Firecrawl to find up to five tabular DataSF datasets about zoning and show their IDs, descriptions and published column names." In the same conversation, ChatGPT can combine DataSF open data portal with Firecrawl's web search and scraping and the other providers in Firecrawl Alexandria.

### Do I need my own DataSF open data portal account or API key to use it in ChatGPT?

No. ChatGPT calls DataSF open data portal through Firecrawl Alexandria and each call is billed in Firecrawl credits, so you don't need a separate DataSF open data portal account or API key.

### How much does it cost to use DataSF open data portal in ChatGPT?

Each DataSF open data portal call costs 5 Firecrawl credits. The capability list on this page shows each price and its unit. The credits come from the Firecrawl team you connect to ChatGPT, and finding the right capability is free.

### Can ChatGPT use other providers besides DataSF open data portal?

Yes. The same Firecrawl plugin reaches every provider in Firecrawl Alexandria, along with Firecrawl's web search and scraping, so you connect once.

### Can I use DataSF open data portal in other AI apps?

Yes. Connect Firecrawl to Claude, Cursor, Grok Bot, Muse signed in on a Firecrawl team with Alexandria enabled, or use the Firecrawl MCP server, CLI or API with an API key from that team, and the same DataSF open data portal capabilities are available there. Keyless connections don't include Alexandria.
