Data Sources
Configure API connectors · Set keys in .env.local on the server
DataSF works without a token — anonymous requests are rate-limited to ~1 req/s. Add
DATASF_APP_TOKEN for higher limits. Register free at data.sfgov.org.Connected Sources
| Source | Status | Env Key | Endpoint | Docs |
|---|---|---|---|---|
DataSF Business Registrations San Francisco open data — restaurant NAICS codes 722110–722410 | Anonymous | DATASF_APP_TOKEN | https://data.sfgov.org/resource/g8m3-pdis.json | Docs → |
DataSF Building Permits SF building permits — restaurant/kitchen/hood keyword filter | Anonymous | DATASF_APP_TOKEN | https://data.sfgov.org/resource/i98e-djp9.json | Docs → |
SF Health Permits SF Department of Public Health food facility permits | Planned | SF_HEALTH_API_KEY | — | — |
California ABC Licenses Alcoholic Beverage Control — pending/active restaurant liquor licenses | Mock Data | ABC_API_KEY | — | Docs → |
Google Places API Enrich leads with Maps listing status, rating, phone, website | Mock Data | GOOGLE_PLACES_API_KEY | — | Docs → |
LLM Classifier (OpenAI / compatible) AI classification — falls back to rule-based if key missing | Optional | OPENAI_API_KEY | — | — |
All API keys are read from server environment variables. Never hard-code secrets in source code.
.env.local Example
# DataSF (free, no key required for basic access) DATASF_APP_TOKEN=your_token_here # Google Maps enrichment GOOGLE_PLACES_API_KEY=your_key_here GOOGLE_GEOCODING_API_KEY=your_key_here # LLM Classification (optional — rule-based fallback) OPENAI_API_KEY=your_key_here LLM_MODEL=gpt-4o-mini # Database (optional — uses in-memory mock if not set) DATABASE_URL=postgresql://user:pass@host/db