Map the Block › Data API
Map the Block Data API
The figures behind the map as plain JSON: census, reported crime, hazards, health, elections and nearby facilities for any U.S. county, state, congressional district or point. Every value comes from an official public source, with the source, period and licence included in the response.
Free to start: 1,000 calls a month with a free key. Paid plans add volume, bulk downloads and commercial use.
Quick start
- Log in or create a free account, then make a key in Your keys below.
- Call the API with the key in the
X-API-Keyheader.
curl -H "X-API-Key: YOUR_KEY" "https://maptheblock.com/api/v1/point?lat=43.0747&lng=-89.3841&near=health_centers"
That returns the county (Dane County, WI), state and congressional district for the point, every county and state dataset below, and the health centers within 5 miles.
Endpoints
| Call | What you get |
|---|---|
GET /api/v1/point?lat=&lng= | County, state and district for a point, with all their datasets. Add near=a,b, radius (miles, up to 25) and limit (up to 50) for nearby facilities. |
GET /api/v1/county/{fips} | All county datasets. Use the 5-digit FIPS code, e.g. 55025. |
GET /api/v1/state/{abbr} | All state datasets, e.g. WI or 55. |
GET /api/v1/district/{geoid} | Your U.S. House member and campaign money, e.g. 5502 (state FIPS + district). |
GET /api/v1/tribal/{geoid} | A tribal area (reservation, Alaska Native village area, Oklahoma tribal area, Hawaiian home land) with its census figures, e.g. 2430 for the Navajo Nation. Point lookups also say which tribal area a point is in. |
GET /api/v1/nearby?lat=&lng=&dataset= | The closest points from one dataset, with distance in miles. |
GET /api/v1/bulk/{dataset}.csv | A whole dataset in one file (.json or .csv for areas, .geojson or .csv for points). Developer plan and up. |
GET /api/v1/datasets | The dataset list with source, period, licence and last update. No key needed. |
GET /api/v1/usage | Your plan and calls this month. |
Every keyed response carries X-RateLimit-Remaining-Month. Errors come back as JSON with an error message. CORS is open, but keep keys on your server, not in public web pages.
Datasets
Not in the API, by design: letter grades, scores, rankings, race, ethnicity, religion, birthplace, language, disability, sex-offender and gang data. Datasets whose licence doesn't allow commercial reuse are left out too.
Plans
- 1,000 calls a month
- 30 calls a minute
- Personal, research, journalism and prototypes
- Credit “Data via Map the Block”
- 50,000 calls a month
- 120 calls a minute
- Bulk downloads
- Non-commercial and internal use
- 500,000 calls a month
- 300 calls a minute
- Bulk downloads
- Commercial use in your product
- 5,000,000 calls a month
- 600 calls a minute
- Commercial use, email support
- Ask about custom layers
Billed monthly by Stripe. Cancel any time; your plan runs to the end of the paid month, then drops to Free. Questions: maptheblock@gmail.com.
Your keys
Checking your login…
Rules that come with the data
- Not for screening people. Don't use the API for tenant, employment, credit, insurance or other decisions about a specific person. Map the Block is not a consumer reporting agency.
- No steering. Don't use it to rate, rank or market neighborhoods by who lives there, or in any way that breaks fair housing law.
- Credit the data. Show “Data via Map the Block, from official public sources” near anything you publish. Parks hours, phones and fees from OpenStreetMap also need “© OpenStreetMap contributors” (ODbL 1.0).
- Figures are as published. Sources have gaps and delays. Crime figures are incidents reported by police agencies and depend on how many agencies report.
Full terms: Data API terms.
Home · The map · About the data · Terms · Privacy