CrimeMetric

API reference

One endpoint returns modeled crime figures for the 2020 census block group at an address, a point or a block group id. The same lookup is available as an MCP tool. Base URL: https://api.crimemetric.com

Authentication

Send your key in the Authorization header as Bearer <key>. Keys start with vcs_. Get a free key by email; it is shown once, so store it somewhere safe.

GET /v1/index

Pass exactly one location: an address, a point, or a block group id.

addressA U.S. street address (up to 300 characters), geocoded with the Census Bureau geocoder. Also accepted as addr, street_address, streetAddress, full_address, fullAddress.
lat, lonA point in decimal degrees. Also accepted as latitude, Latitude; lng, long, longitude, Longitude.
bg_geoidA 12-digit 2020 census block group id (state, county, tract, block group). Also accepted as bgGeoid, geoid, GEOID, block_group, blockGroup, block_group_geoid, census_block_group.

Response

Top level:

releaseid of the model release that produced the numbers, and fake (true only for test data).
locationbg_geoid, matched_address (for address lookups), lat, lon, state, county_geoid, county_name, and the 2020 census place (place_geoid, place_name, place_type) holding at least half the block group's residents (or half its land where no one lives).
populationresidents (ACS 2020–2024, else the 2020 census); people_present (average over the week: residents, less those away at work, plus workers and visitors); workers_present; visitors_present.
index_publishedfalse when fewer than 100 people live in the block group. Then the per-resident index, its interval, rate, percentile and vs_city / vs_county are null; expected counts, their intervals and confidence are still published, exposure fields still appear where at least 100 people are present, and city_index / county_index describe the surrounding place.
local_incident_datatrue when the block group's main agency publishes incident records that shape where crime falls inside it.
summariestotal_major (persons + property crimes), persons, property and disorder, each a measure (below) plus the extra summary fields.
crimesthe 16 crime types, keyed murder, rape, robbery, aggravated_assault, burglary, shoplifting, theft_from_vehicle, other_larceny, motor_vehicle_theft, simple_assault, intimidation, vandalism, weapons, drugs_alcohol, disorderly_conduct and trespass; each a measure plus group (persons, property or disorder).
notesPlain-language notes about the numbers, including why an index is withheld.
usagemonth (UTC), calls used and limit for the key.

Each measure (a summary or a crime type):

labelName of the crime type or summary.
expectedExpected crimes a year in the block group, counted as the FBI does: victims for murder, rape, aggravated assault, simple assault and intimidation; offenses for the other types; modeled incidents for disorderly conduct and trespassing. Summaries add up their types.
expected_p10, expected_p9080% interval of the expected count (summaries only).
rateExpected crimes per 100,000 residents (crime types).
indexCrimes per resident against the U.S. rate: 100 is the U.S. rate, 200 is twice it.
index_p10, index_p9080% interval of the index.
confidencehigh (80% interval spans up to about 5x), medium (up to about 22x) or low.
percentileNational percentile of the index among U.S. residents (90: higher than where 90% of residents live).
exposure_indexCrimes per person present (residents, workers and visitors) against the U.S. rate; lower than the index in downtowns and other places many people visit. Null where fewer than 100 people are present.
exposure_percentileNational percentile of the exposure index among people present (not residents).
change_1yChange in the expected count from the year before, from the reporting agencies' year-to-date FBI data (0.1 is +10%).
change_5yProjected change in the expected count over five years (0.1 is +10%).
expected_2031, index_2031Projected expected count and index for 2031.

Summaries also carry:

city_index, county_indexThe index of the block group's city and county, 100 = U.S. rate.
vs_city, vs_countyThe block group's index divided by its city's or county's index (1.5 is 50% above it).
time_of_weekexpected and index for weekday_day (Monday–Friday, 6am–6pm), weekday_night (6pm–6am on nights starting Sunday–Thursday), weekend_day (Saturday–Sunday, 6am–6pm) and weekend_night (6pm–6am on nights starting Friday–Saturday); each index is against the U.S. rate for the same hours.

Fields can be null where the data doesn't support a value. New fields may be added; existing ones keep their meaning within a release. What each crime type counts.

Errors

Errors return JSON: {"error": {"code": "...", "message": "..."}}

400 bad_locationNot exactly one location, a point that isn't a valid number or is out of range, a malformed block group id, or an address over 300 characters.
401 missing_key / invalid_keyNo key, or a key that doesn't exist.
403 revoked_keyThe key was revoked.
404 no_matchThe address couldn't be geocoded, or the point isn't in a 2020 census block. Try a fuller address or another point.
404 not_coveredNo block group with that id in the release, which covers the 50 states and DC (239,780 block groups).
429 rate_limitedOver the key's per-second limit (retry after a second), or more than 30 requests a minute from one address with missing or invalid keys.
429 quota_exceededThe key has used its calls for the month; limits reset on the 1st (UTC).
502 geocoder_unavailableThe Census geocoder didn't answer. Retry, or pass bg_geoid.

Limits

Free10,000 lookups a month, 1 a second.
Developer, $49 a month100,000 lookups a month, 5 a second.
Business, $299 a month1,000,000 lookups a month, 25 a second.

Every successful lookup counts once, whether by REST or MCP; failed lookups aren't counted. Use is covered by the API terms.

MCP

Streamable HTTP at https://api.crimemetric.com/mcp, with the same key in the Authorization header. One tool, crime_index, takes address, lat and lon, or bg_geoid (with the same alternative names), and returns the same JSON as the REST endpoint as its structured result. Called with a valid key but no location, it answers {"needs_input": true, "message": ...} so an assistant can ask the user; that call isn't counted. Errors come back as tool errors whose text is code: message, with the same codes as REST.

claude mcp add --transport http crimemetric https://api.crimemetric.com/mcp \
  --header "Authorization: Bearer $CRIMEMETRIC_KEY"

Examples

cURL

curl -H "Authorization: Bearer $CRIMEMETRIC_KEY" \
  "https://api.crimemetric.com/v1/index?lat=41.7713&lon=-88.1530"

Python

import os, requests

r = requests.get(
    "https://api.crimemetric.com/v1/index",
    params={"address": "400 S Eagle St, Naperville, IL"},
    headers={"Authorization": f"Bearer {os.environ['CRIMEMETRIC_KEY']}"},
    timeout=30,
)
r.raise_for_status()
total = r.json()["summaries"]["total_major"]
print(total["index"], total["index_p10"], total["index_p90"], total["confidence"])

JavaScript

const r = await fetch("https://api.crimemetric.com/v1/index?bg_geoid=170438465042", {
  headers: { Authorization: `Bearer ${process.env.CRIMEMETRIC_KEY}` },
});
const data = await r.json();
console.log(data.crimes.burglary.index, data.usage);