{
    "api": "BrandShyp San Antonio Crime Data API",
    "version": "v1",
    "status": "stable",
    "description": "A read-only, versioned public API over 42+ months of SAPD NIBRS Group A offenses, cleaned and aggregated to ZIP code. This is the same reconciled cube that powers https:\/\/brandshyp.org\/san-antonio-crime-map\/.",
    "generated": "2026-09-06",
    "coverage": {
        "first_month": "2023-01",
        "last_month": "2026-08",
        "n_months": 44,
        "n_zips": 62,
        "n_cells": 52409,
        "geography": "ZIP code, the finest geography the open data publishes. The source has no latitude\/longitude and no street address.",
        "measure": "Reported offenses (NIBRS Group A). Reports, not convictions; some are later unfounded. Excludes crimes never reported and non-Group-A offenses (DUI, disorderly conduct, trespass, and others)."
    },
    "integrity": {
        "method": "reconcile-or-refuse",
        "note": "The aggregate is checked against an independent COUNT(*) of the source table at build time; the dataset is not published if the two disagree, because the source datastore silently truncates large responses.",
        "rows_source": 538978,
        "rows_mapped": 533521,
        "rows_excluded": 5457,
        "note_excluded": "Excluded rows carry a blank or unmappable ZIP code and are dropped rather than assigned somewhere false."
    },
    "source": {
        "name": "City of San Antonio open data: SAPD Offenses",
        "url": "https:\/\/data.sanantonio.gov\/dataset\/sapd-offenses",
        "license": "CC-BY (City of San Antonio)",
        "scope": "NIBRS Group A offenses only",
        "population": "U.S. Census ACS 5-year (2023), table B01003",
        "min_pop_for_rate": 5000,
        "rows_source": 538978,
        "rows_mapped": 533521,
        "rows_excluded": 5457,
        "incidents": 493052
    },
    "license": {
        "name": "Creative Commons Attribution 4.0 International (CC BY 4.0)",
        "url": "https:\/\/creativecommons.org\/licenses\/by\/4.0\/",
        "attribution": "Contains information from the City of San Antonio, licensed under CC BY 4.0. Cleaning, ZIP aggregation, and analysis by BrandShyp."
    },
    "endpoints": [
        {
            "method": "GET",
            "path": "\/api\/v1\/crime",
            "summary": "This discovery document."
        },
        {
            "method": "GET",
            "path": "\/api\/v1\/crime\/offenses",
            "summary": "The full offenses cube (JSON): counts by ZIP x month x offense type, category trees, and the analysis series."
        },
        {
            "method": "GET",
            "path": "\/api\/v1\/crime\/offenses.csv",
            "summary": "The same cube as tidy CSV."
        },
        {
            "method": "GET",
            "path": "\/api\/v1\/crime\/geo",
            "summary": "Pre-projected ZIP boundary SVG paths and area in square miles."
        },
        {
            "method": "GET",
            "path": "\/api\/v1\/crime\/zips",
            "summary": "ZIP directory: code, area name, population, area in square miles."
        },
        {
            "method": "GET",
            "path": "\/api\/v1\/crime\/openapi.json",
            "summary": "OpenAPI 3.1 description of this API. \/api\/v1\/openapi.json is a legacy alias for the same document; the PLATFORM index is \/api\/v1\/."
        }
    ],
    "documentation": "https:\/\/brandshyp.org\/crime-data-api\/",
    "openapi": "https:\/\/brandshyp.org\/api\/v1\/crime\/openapi.json",
    "methodology": "https:\/\/brandshyp.org\/san-antonio-crime-map\/",
    "contact": {
        "name": "BrandShyp",
        "url": "https:\/\/brandshyp.org\/contact-us\/"
    },
    "versioning": "Breaking changes ship under a new path prefix (\/api\/v2\/). The v1 response shape is additive-only."
}