Skip to main content

Mapbox Vector Tile Boundaries beta

GET 

/v4/boundaries/vector-tile/:x/:y/:z

This endpoint is in beta and not yet ready for production. Check out the LiveBy API Beta Endpoints Program for more information.

Get a mapbox vector tile. This endpoint is intended to be used by a map library that supports Mapbox Vector Tiles. For most map libraries, the base tile endpoint will be https://api.liveby.com/v4/boundaries/vector-tile/{x}/{y}/{z}

Currently, the vector tile API only supports at zoom level 7 and greater.

The query parameters are the same as the search-boundaries endpoint.

Each boundary is seperated into its own "layer-source" based on its layer. For instance, https://api.liveby.com/v4/boundaries/28/48/7?layer=neighborhood&layer=city will provide a source vector tile with 2 source-layers, one for the neighborhood source-layer, and one for the city layer. The ID provided from this API is a vector tile ID, and not the standard boundary ID. To get the standard boundary ID, use the _id field.

To keep this API as fast as possible, a small subset of data is returned. Only name, _id, boundingBox and layer are returned.

For more information about source-layers, see the Mapbox source-layers documentation.

Request

Path Parameters

    x numberrequired

    Mapbox Tile Layer X value. This value should be generated by your mapping library.

    y numberrequired

    Mapbox Tile Layer Y value. This value should be generated by your mapping library.

    z numberrequired

    Mapbox Tile Layer Z value. This value should be generated by your mapping library.

Query Parameters

    name string[]

    The name of the boundary you seek to obtain boundary information from. This can be a full state name (eg. Nebraska), city name, neighborhood name, postal code, etc.

    country string[]

    The country for which you seek to obtain boundary information from. Default is USA.

    city string[]

    The city used by the post office for which you seek to obtain boundary information from. Use the full name. All abbreviations should be spelt out entirely EG: St. Louis ⇒ Saint Louis, L.A. ⇒ Los Angeles, Coeur D'Alene ⇒ Coeur D Alene.

    Examples:

    Example: Denver

    layer string[]

    The layer or layers you seek to obtain boundary information from.

    LiveBy providers many layers of boundaries. We also provide virtual layers. Virtual layers are layers that are made from other layers. See our virtual layers guide for more information.

    The available boundary layers are as follows:

    LayerValueDescriptionVirtual
    Cities, Towns, or equivalentcityBoundaries of hamlets, villages, towns, cities, and census-designated places.No
    Postal Citypostal-city Boundaries the post office covers for a city. See Cities vs Postal Cities for more information on the differences between communities and postal cities. No
    MunicipalitiesmunicipalityOnly municipalities that have taxes, addresses, mayors, etc.Yes
    DistrictsdistrictLarger boundaries covering multiple smaller neighborhoods in metropolitan areas.No
    NeighborhoodsneighborhoodGeographically bound collections of residential or mixed-use parcels.No
    Micro Neighborhoodsmicro-neighborhoodSmaller polygons within broader neighborhood boundaries.No
    SubdivisionssubdivisionMulti-parcel allotments defined by local municipalities.No
    Postal Codespostal-codeService areas of postal codes across countries.No
    School Districtsschool-districtSingle-purpose governmental units operating schools at the local level.No
    School Attendance Areasschool-attendance-areaGeographic extent served by a local school for student assignment.No
    State, Province, or equivalentarea-level-1 First administrative subdivision of a country. These commonly have that name of State or Province or District. No
    County, Parish, or equivalentarea-level-2 Second administrative subdivision. These are commonly called counties. Not available in all countries. No
    area-level-1 string[]

    The first political subdivision of a country for which you seek to obtain boundary information from. Common equivalents are states or provinces. Use the full name.

    area-level-2 string[]

    The second political subdivision of a country which you seek to obtain boundary information from. Common equivalents are Counties or Parishes Use the full name. Not guaranteed in every country.

    Examples:

    Example: King

    mls string[]

    The MLS code you want associated boundary IDs from.

    Example: &mls=recolorado&mls=pikespeak
    latitude string

    The latitude for which you seek to obtain boundary information from. This will use a default radius of 10 miles. If you would like to change the radius, use the radius argument.

    longitude string

    The longitude for which you seek to obtain boundary information from. This will use a default radius of 10 miles. If you would like to change the radius, use the radius argument.

    radius number

    If you are using the coordinates argument, you may change the radius of your search. The default radius is 10 miles. You may use decimals as well. If you would like to get only boundaries that intersect the exact point, set the radius to 0.

    Default value: 10

    bounding-box-east string

    The east edge of a bounding box to return results from. All four directions (west, south, north, and east) are required if creating a bounding box. These are coordinates that will be used to search for boundaries. Only boundaries that touch this bounding box will be returned. If the coordinates parameter is used, this parameter is ignored.

    bounding-box-west string

    The west edge of a bounding box to return results from. All four directions (west, south, north, and east) are required if creating a bounding box. These are coordinates that will be used to search for boundaries. Only boundaries that touch this bounding box will be returned. If the coordinates parameter is used, this parameter is ignored.

    bounding-box-south string

    The south edge of a bounding box to return results from. All four directions (west, south, north, and east) are required if creating a bounding box. These are coordinates that will be used to search for boundaries. Only boundaries that touch this bounding box will be returned. If the coordinates parameter is used, this parameter is ignored.

    bounding-box-north string

    The north edge of a bounding box to return results from. All four directions (west, south, north, and east) are required if creating a bounding box. These are coordinates that will be used to search for boundaries. Only boundaries that touch this bounding box will be returned. If the coordinates parameter is used, this parameter is ignored.

    postal-code string[]

    The postal code for which you seek to obtain boundary information from.

    limit number

    The number of records you would like returned. The default is 20, the maximum is 500.

    Default value: 20

    offset number

    Used for pagination, the number of records for the collection to skip.

    Default value: 0

    sort-by string

    Sort by the following parameters.

    • name
    • layer
    • updated-at

    Possible values: [name, layer, updated-at]

    intersection-boundary-id string[]

    Filtering by intersection-boundary-id will return boundaries that intersect with that boundary. Example: Neighborhoods in Denver, Colorado could be found by using a intersection-boundary-id filter with the id for the city of Denver and layer filter of "neighborhood"

    include-geometry boolean

    Include the geometry of the boundary in the response. This will increase the response time and the size of the response.

    Default value: false

Responses

Schema

    success booleanrequired

    pagination

    object

    required

    pageTotal numberrequired
    limit numberrequired
    offset numberrequired

    data

    object[]

  • Array [

  • id stringrequired

    The LiveBy Boundary ID.

    address

    object

    required

    This is a geocoded point near the center of the shape. While the query parameters specify area-level-1 as a standard field, this address uses the local name for area names E.G. state, county, province, village.

    postcode string
    city string
    municipality string
    village string
    district string
    subdistrict string
    archipelago string
    territory string
    island string
    province string
    state string
    county string
    township string
    region string
    town string
    locality string
    layer stringrequired
    private booleanrequired
    status stringrequired
    osmLevel numbernullablerequired

    Possible values: >= 1 and <= 11

    name stringrequired
    virtualLayers string[]required

    labelLocation

    object

    required

    type stringrequired
    coordinates number[]required

    Possible values: >= 2, <= 2

    boundingBox

    object

    required

    type stringrequired

    coordinates

    object

    required

    oneOf

  • Array [

  • type
    items number[]

    Possible values: >= 2, <= 2

  • ]

  • geometry

    object

    The geometry for the boundary. This propertye is only included when includeGeometries is set to true when calling the /v4/boundaries endpoint. It is always returned when calling the /v4/boundaries/:id endpoint.

    type stringrequired

    coordinates

    object

    required

    oneOf

  • Array [

  • type
    items array[]

    Possible values: >= 2, <= 2

  • ]

  • censusId stringnullablerequired
    createdAt date-timerequired
    updatedAt date-timerequired
  • ]

Loading...