---
title: "Calculate distance from one origin to multiple destinations"
method: GET
path: "/distance"
tags: ["distance"]
---

# Calculate distance from one origin to multiple destinations

`GET /distance`

## Query parameters

- `origin` string, required
- `destinations[]` string[], required
- `mode` 'driving' | 'haversine' | 'straightline'
- `units` 'miles' | 'km'
- `max_results` integer
- `max_distance` number
- `max_duration` integer
- `order_by` 'distance' | 'duration'
- `min_distance` number
- `min_duration` integer
- `sort_order` 'asc' | 'desc'
- `country` string

## Response `200`

Successful response

- DistanceResponse
  - `origin` DistanceOrigin
    - `location` number[]
    - `geocode` NestedGeocodingResult
      - `stable_address_key` string
      - `address_components` AddressComponents
        - `number` string
        - `predirectional` string
        - `street` string
        - `suffix` string
        - `formatted_street` string
        - `city` string
        - `county` string
        - `state_province` string
        - `postal_code` string
        - `country` string
        - `building_name` string
        - `nation` string
        - `postdirectional` string
      - `address_lines` string[]
      - `formatted_address` string
      - `location` Location
        - `lat` number, float
        - `lng` number, float
      - `accuracy` number, float
      - `accuracy_type` string
      - `match_type` string
      - `source` string
  - `mode` string
  - `destinations` DistanceMatrixCell[]
    - `query` string
    - `location` number[]
    - `id` string, nullable
    - `distance_miles` number, float
    - `distance_km` number, float
    - `geocode` GeocodingResult
      - `stable_address_key` string, nullable
      - `address_components` AddressComponents
        - `number` string
        - `predirectional` string
        - `street` string
        - `suffix` string
        - `formatted_street` string
        - `city` string
        - `county` string
        - `state_province` string
        - `postal_code` string
        - `country` string
        - `building_name` string
        - `nation` string
        - `postdirectional` string
      - `address_lines` string[]
      - `formatted_address` string
      - `location` Location
        - `lat` number, float
        - `lng` number, float
      - `accuracy` number, float
      - `accuracy_type` string
      - `match_type` string, nullable
      - `source` string
      - `fields` FieldAppends
        - `congressional_districts` CongressionalDistricts[]
          - `name` string
          - `district_number` integer
          - `ocd_id` string
          - `congress_number` string
          - `congress_years` string
          - `proportion` integer
          - `current_legislators` CurrentLegislator[]
            - `type` string
            - `seniority` string, nullable
            - `bio` Bio
              - …
            - `contact` Contact
              - …
            - `social` LegislatorSocial
              - …
            - `references` References
              - …
            - `source` string
        - `timezone` Timezone
          - `name` string
          - `utc_offset` integer
          - `observes_dst` boolean
          - `abbreviation` string
          - `source` string
        - `census` Census
          - `2024` CensusGeography
            - `census_year` integer
            - `state_fips` string
            - `county_fips` string
            - `tract_code` string
            - `block_code` string
            - `block_group` string
            - `full_fips` string
            - `place` Place
              - …
            - `metro_micro_statistical_area` MetroMicroStatisticalArea
              - …
            - `combined_statistical_area` CombinedStatisticalArea
              - …
            - `metropolitan_division` CombinedStatisticalArea
              - …
            - `county_subdivision` CountySubdivision
              - …
            - `source` string
          - `2025` CensusGeography
            - `census_year` integer
            - `state_fips` string
            - `county_fips` string
            - `tract_code` string
            - `block_code` string
            - `block_group` string
            - `full_fips` string
            - `place` Place
              - …
            - `metro_micro_statistical_area` MetroMicroStatisticalArea
              - …
            - `combined_statistical_area` CombinedStatisticalArea
              - …
            - `metropolitan_division` CombinedStatisticalArea
              - …
            - `county_subdivision` CountySubdivision
              - …
            - `source` string
        - `acs` Acs
          - `meta` AcsAppendMeta
            - `source` string
            - `survey_years` string
            - `survey_duration_years` string
          - `demographics` Demographics
            - `Median age` GenderBreakdown
              - …
            - `Population by age range` PopulationByAgeRange
              - …
            - `Sex` GenderBreakdown
              - …
            - `Race and ethnicity` RaceAndEthnicity
              - …
            - `meta` AcsCategoryMeta
              - …
          - `economics` Economics
            - `Number of households` GenderBreakdown
              - …
            - `Median household income` GenderBreakdown
              - …
            - `Household income` HouseholdIncome
              - …
            - `Per capita income` GenderBreakdown
              - …
            - `meta` AcsCategoryMeta
              - …
          - `families` Families
            - `Household type by household` HouseholdTypeByHousehold
              - …
            - `Household type by population` HouseholdTypeByPopulation
              - …
            - `Marital status` MaritalStatus
              - …
            - `Family Type by Presence and Age of Own Children Under 18 Years` FamilyTypeByPresenceAndAgeOfOwnChildrenUnder18Years
              - …
            - `Average Household Size of Occupied Housing Units by Tenure` AverageHouseholdSizeOfOccupiedHousingUnitsByTenure
              - …
            - `Own Children Under 18 Years by Family Type and Age` OwnChildrenUnder18YearsByFamilyTypeAndAge
              - …
            - `meta` AcsCategoryMeta
              - …
          - `housing` Housing
            - `Number of housing units` GenderBreakdown
              - …
            - `Occupancy status` OccupancyStatus
              - …
            - `Ownership of occupied units` OwnershipOfOccupiedUnits
              - …
            - `Units in structure` UnitsInStructure
              - …
            - `Median value of owner-occupied housing units` GenderBreakdown
              - …
            - `Value of owner-occupied housing units` ValueOfOwnerOccupiedHousingUnits
              - …
            - `meta` AcsCategoryMeta
              - …
          - `social` AcsSocialData
            - `Population by minimum level of education` PopulationByMinimumLevelOfEducation
              - …
            - `Population with veteran status` PopulationWithVeteranStatus
              - …
            - `Period of military service for veterans` PeriodOfMilitaryServiceForVeterans
              - …
            - `meta` AcsCategoryMeta
              - …
        - `ffiec` Ffiec
          - `collection_year` integer
          - `msa_md_code` string
          - `fips_state_code` string
          - `fips_county_code` string
          - `census_tract` string
          - `principal_city` boolean
          - `small_county` SmallCounty
            - `flag` string
            - `description` string
          - `split_tract` SmallCounty
            - `flag` string
            - `description` string
          - `demographic_data` SmallCounty
            - `flag` string
            - `description` string
          - `urban_rural_flag` SmallCounty
            - `flag` string
            - `description` string
          - `msa_md_median_family_income` integer
          - `msa_md_median_household_income` integer
          - `tract_median_family_income_percentage` number, float
          - `ffiec_estimated_msa_md_median_family_income` integer
          - `income_indicator` string
          - `cra_poverty_criteria` boolean
          - `cra_unemployment_criteria` boolean
          - `cra_distressed_criteria` boolean
          - `cra_remote_rural_low_density_criteria` boolean
          - `previous_year_cra_distressed_criteria` boolean
          - `previous_year_cra_underserved_criterion` boolean
          - `meets_current_previous_criteria` boolean
          - `tract_minority_population_percentage` number, float
        - `school_districts` object
          - `unified` Unified
            - `name` string
            - `lea_code` string
            - `grade_low` string
            - `grade_high` string
        - `state_legislative_districts` StateLegislativeDistricts
          - `house` House[]
            - `name` string
            - `district_number` string
            - `ocd_id` string
            - `is_upcoming_state_legislative_district` boolean
            - `proportion` integer
            - `current_legislators` CurrentLegislator[]
              - …
          - `senate` House[]
            - `name` string
            - `district_number` string
            - `ocd_id` string
            - `is_upcoming_state_legislative_district` boolean
            - `proportion` integer
            - `current_legislators` CurrentLegislator[]
              - …
        - `uk_devolved` UKLegislativeDistrict[]
          - `district_type` string
          - `gss_code` string
          - `ocd_id` string
          - `name` string
          - `is_upcoming_district` boolean
          - `source` string
        - `uk_local` UKLegislativeDistrict[]
          - `district_type` string
          - `gss_code` string
          - `ocd_id` string
          - `name` string
          - `is_upcoming_district` boolean
          - `source` string
        - `uk_westminster` UKLegislativeDistrict[]
          - `district_type` string
          - `gss_code` string
          - `ocd_id` string
          - `name` string
          - `is_upcoming_district` boolean
          - `source` string
        - `zip4` Zip4
          - `record_type` RecordType
            - `code` string
            - `description` string
          - `residential` boolean
          - `carrier_route` CarrierRoute
            - `id` string
            - `description` string
          - `building_or_firm_name` string, nullable
          - `plus4` string[]
          - `zip9` string[]
          - `government_building` string, nullable
          - `facility_code` RecordType
            - `code` string
            - `description` string
          - `city_delivery` boolean
          - `valid_delivery_area` boolean
          - `exact_match` boolean
      - `destinations` DistanceDestination[]
        - `query` string
        - `location` number[]
        - `distance_miles` number
        - `distance_km` number, float
        - `duration_seconds` integer, nullable
        - `id` string, nullable
        - `geocode` GeocodingResult — recursive
    - `duration_seconds` integer

## Other responses

- `403` — Invalid API key, or feature not available.
- `422` — Validation error.

---

[API](https://skmtc.net/geocod/apis/geocodio.md) · [All operations](https://skmtc.net/geocod/apis/geocodio/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/geocod/geocodio/versions/cfb0f76c8af3/schema)
