Real weather for 50 San Francisco neighborhoods. Free API. No key required.
🌐 Live API: microclimates.solofounders.com
Use with Claude Code, Clawdbot, or build into your apps.
Built by Solo Founders.
SF has the most dramatic microclimates of any US city.
Weather apps say "San Francisco: 58°F" — but that's useless. It can be 52°F and foggy in the Outer Sunset while it's 65°F and sunny in the Mission, just 3 miles apart.
This API aggregates 150+ outdoor sensors and groups them by neighborhood, so you get actual local temperatures — not some airport reading from SFO.
curl https://microclimates.solofounders.com/sf-weather/mission{
"neighborhood": "mission",
"name": "Mission District",
"temp_f": 58,
"humidity": 52,
"sensor_count": 8
}No API key. No signup. Just use it.
Copy and paste this into your skills folder:
# Create a new skill: sf-microclimates/SKILL.md
# SF Microclimates Skill
Get real-time SF neighborhood weather.
## Triggers
- "weather in [neighborhood]"
- "sf weather mission vs sunset"
- "is it foggy in the richmond?"
## Usage
curl https://microclimates.solofounders.com/sf-weather/marina
## Neighborhoods
mission, castro, marina, soma, haight, noe_valley,
outer_sunset, inner_sunset, outer_richmond, presidio,
north_beach, pacific_heights, potrero, twin_peaks...- AI agents — Give your agent real local weather context
- Home automation — Trigger based on your actual neighborhood temp
- Slack/Discord bots — Settle "is it foggy?" arguments
- Travel apps — Show tourists what to actually expect
- Personal dashboards — Finally, weather that matches your window
| Endpoint | Description |
|---|---|
GET /sf-weather |
All 50 neighborhoods |
GET /sf-weather/:neighborhood |
Single neighborhood |
GET /neighborhoods |
List all available |
From Marina to Noe Valley, Presidio to Twin Peaks — every SF neighborhood mapped.
curl https://microclimates.solofounders.com/neighborhoodsIncludes: mission, castro, marina, soma, haight, noe_valley, outer_sunset, inner_richmond, north_beach, pacific_heights, potrero, dogpatch, bayview, twin_peaks, presidio, tenderloin, chinatown, japantown, cole_valley, glen_park, and 30 more.
{
"updated": "2026-01-25T23:00:00.000Z",
"neighborhood": "outer_sunset",
"name": "Outer Sunset",
"temp_f": 52,
"humidity": 78,
"sensor_count": 15
}{
"updated": "2026-01-25T23:00:00.000Z",
"neighborhoods": {
"mission": { "temp_f": 58, "humidity": 52, "sensor_count": 8 },
"outer_sunset": { "temp_f": 52, "humidity": 78, "sensor_count": 15 },
"marina": { "temp_f": 55, "humidity": 65, "sensor_count": 6 }
}
}Want to run your own instance?
git clone https://github.com/solo-founders/sf-microclimates.git
cd sf-microclimates
npm installThis API uses PurpleAir sensors. Sign up at develop.purpleair.com — free for personal use.
wrangler kv:namespace create "CACHE"Add the output to wrangler.toml:
[[kv_namespaces]]
binding = "CACHE"
id = "your-kv-namespace-id"wrangler secret put PURPLEAIR_API_KEYecho "PURPLEAIR_API_KEY=your-key" > .dev.vars
wrangler dev| Variable | Default | Description |
|---|---|---|
CACHE_TTL_SECONDS |
3600 |
Cache duration (1 hour) |
RATE_LIMIT_PER_MINUTE |
60 |
Max requests per IP |
- Request comes in → rate limit check
- Check Cloudflare KV cache → return if fresh
- Cache miss → fetch outdoor sensors from PurpleAir (
location_type=0) - Group sensors by neighborhood GPS bounding boxes
- Calculate averages, cache for 1 hour
- Return JSON with CORS headers
LA, Seattle, NYC, Chicago, Austin — every city has microclimates.
The neighborhood bounding boxes are in src/index.ts. To adapt:
- Update
SF_NEIGHBORHOODSwith your city's areas + GPS coordinates - Change the PurpleAir bounding box to your city
- Update branding
- Deploy
PRs welcome! We'd love to see la-microclimates, nyc-microclimates, etc.
MIT — use it however you want.