The Retrieve Location Data from Geocode API allows you to obtain accurate and structured geographic information from latitude and longitude coordinates. When it receives a location, the API returns multiple levels of address data that allow you to accurately identify both specific points (such as an exact address) and broader areas (such as neighborhoods, cities, or counties).
The response includes a formatted_address field that represents the complete address in human-readable format. Address_components are also provided, detailing each element that makes up the address, including street number (street_number), street name (route), neighborhood (neighborhood), sublocality (sublocality), city (locality), county (administrative_area_level_2), state (administrative_area_level_1), country, and postal code. Each component comes with its long and short name, along with its corresponding type, which is useful for classification and visualization.
In addition, the API returns precise coordinates in the geometry.location field, including latitude and longitude values, along with the location_type indicating the level of accuracy (e.g., “ROOFTOP,” “APPROXIMATE,” or “GEOMETRIC_CENTER”). A viewport (display area) is also provided to facilitate geographic representation on maps.
In some cases, the response may include several hierarchical or alternative results, allowing access to nearby locations, associated buildings, intersections, or related points of interest. Plus codes (plus_code) with compound_code and global_code variants are also included, which are useful for representing locations without a formal address.
This API is ideal for geolocation applications, logistics, delivery services, territory analysis, address validation, map visualization, and geographic information systems (GIS). It supports multiple formats and levels of granularity, adapting to both precise needs and broader territorial analysis.
In short, the API delivers complete, structured, and reliable data to convert coordinates into geographic information that is understandable and usable by modern systems.
{
"plus_code" :
{
"compound_code" : "P27Q+MCM New York, NY, USA",
"global_code" : "87G8P27Q+MCM"
},
"results" :
[
{
"address_components" :
[
{
"long_name" : "277",
"short_name" : "277",
"types" :
[
"street_number"
]
},
{
"long_name" : "Bedford Avenue",
"short_name" : "Bedford Ave",
"types" :
[
"route"
]
},
{
"long_name" : "Williamsburg",
"short_name" : "Williamsburg",
"types" :
[
"neighborhood",
"political"
]
},
{
"long_name" : "Brooklyn",
"short_name" : "Brooklyn",
"types" :
[
"political",
"sublocality",
"sublocality_level_1"
]
},
{
"long_name" : "Kings County",
"short_name" : "Kings County",
"types" :
[
"administrative_area_level_2",
"political"
]
},
{
"long_name" : "New York",
"short_name" : "NY",
"types" :
[
"administrative_area_level_1",
"political"
]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" :
[
"country",
"political"
]
},
{
"long_name" : "11211",
"short_name" : "11211",
"types" :
[
"postal_code"
]
}
],
"formatted_address" : "277 Bedford Ave, Brooklyn, NY 11211, USA",
"geometry" :
{
"location" :
{
"lat" : 40.7142205,
"lng" : -73.9612903
},
"location_type" : "ROOFTOP",
"viewport" :
{
"northeast" :
{
"lat" : 40.71556948029149,
"lng" : -73.95994131970849
},
"southwest" :
{
"lat" : 40.7128715197085,
"lng" : -73.9626392802915
}
}
},
"navigation_points" :
[
{
"location" :
{
"latitude" : 40.7142498,
"longitude" : -73.9613696
}
}
],
"place_id" : "ChIJd8BlQ2BZwokRAFUEcm_qrcA",
"plus_code" :
{
"compound_code" : "P27Q+MF Brooklyn, NY, USA",
"global_code" : "87G8P27Q+MF"
},
"types" :
[
"street_address"
]
},
{
"address_components" :
[
{
"long_name" : "281",
"short_name" : "281",
"types" :
[
"street_number"
]
},
{
"long_name" : "Bedford Avenue",
"short_name" : "Bedford Ave",
"types" :
[
"route"
]
},
{
"long_name" : "Williamsburg",
"short_name" : "Williamsburg",
"types" :
[
"neighborhood",
"political"
]
},
{
"long_name" : "Brooklyn",
"short_name" : "Brooklyn",
"types" :
[
"political",
"sublocality",
"sublocality_level_1"
]
},
{
"long_name" : "Kings County",
"short_name" : "Kings County",
"types" :
[
"administrative_area_level_2",
"political"
]
},
{
"long_name" : "New York",
"short_name" : "NY",
"types" :
[
"administrative_area_level_1",
"political"
]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" :
[
"country",
"political"
]
},
{
"long_name" : "11211",
"short_name" : "11211",
"types" :
[
"postal_code"
]
},
{
"long_name" : "4230",
"short_name" : "4230",
"types" :
[
"postal_code_suffix"
]
}
],
"formatted_address" : "281 Bedford Ave, Brooklyn, NY 11211, USA",
"geometry" :
{
"bounds" :
{
"northeast" :
{
"lat" : 40.7142054,
"lng" : -73.9612142
},
"southwest" :
{
"lat" : 40.7140652,
"lng" : -73.9614433
}
},
"location" :
{
"lat" : 40.7141354,
"lng" : -73.9613287
},
"location_type" : "ROOFTOP",
"viewport" :
{
"northeast" :
{
"lat" : 40.71548428029149,
"lng" : -73.9599797697085
},
"southwest" :
{
"lat" : 40.7127863197085,
"lng" : -73.9626777302915
}
}
},
"navigation_points" :
[
{
"location" :
{
"latitude" : 40.7141769,
"longitude" : -73.9614164
}
}
],
"place_id" : "ChIJiYRKQWBZwokR10UtO7vMvr0",
"types" :
[
"premise",
"street_address"
]
},
{
"address_components" :
[
{
"long_name" : "277",
"short_name" : "277",
"types" :
[
"street_number"
]
},
{
"long_name" : "Bedford Avenue",
"short_name" : "Bedford Ave",
"types" :
[
"route"
]
},
{
"long_name" : "Williamsburg",
"short_name" : "Williamsburg",
"types" :
[
"neighborhood",
"political"
]
},
{
"long_name" : "Brooklyn",
"short_name" : "Brooklyn",
"types" :
[
"political",
"sublocality",
"sublocality_level_1"
]
},
{
"long_name" : "Kings County",
"short_name" : "Kings County",
"types" :
[
"administrative_area_level_2",
"political"
]
},
{
"long_name" : "New York",
"short_name" : "NY",
"types" :
[
"administrative_area_level_1",
"political"
]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" :
[
"country",
"political"
]
},
{
"long_name" : "11211",
"short_name" : "11211",
"types" :
[
"postal_code"
]
}
],
"formatted_address" : "277 Bedford Ave, Brooklyn, NY 11211, USA",
"geometry" :
{
"location" :
{
"lat" : 40.7142205,
"lng" : -73.9612903
},
"location_type" : "ROOFTOP",
"viewport" :
{
"northeast" :
{
"lat" : 40.71556948029149,
"lng" : -73.95994131970849
},
"southwest" :
{
"lat" : 40.7128715197085,
"lng" : -73.9626392802915
}
}
},
"navigation_points" :
[
{
"location" :
{
"latitude" : 40.7142199,
"longitude" : -73.9613932
}
}
],
"place_id" : "ChIJIdIK_DJZwokRImC6xolwWOM",
"plus_code" :
{
"compound_code" : "P27Q+MF Brooklyn, NY, USA",
"global_code" : "87G8P27Q+MF"
},
"types" :
[
"establishment",
"food",
"point_of_interest",
"restaurant"
]
},
{
"address_components" :
[
{
"long_name" : "294"}]}],"_note":"Response truncated for documentation purposes"}
curl --location --request GET 'https://pr197-testing.zylalabs.com/api/9141/retrieve+location+data+from+geocode+api/16530/reverse+geocoding?latlng=40.714222,-73.961442' --header 'Authorization: Bearer YOUR_API_KEY'
{
"results" :
[
{
"address_components" :
[
{
"long_name" : "Infinite Loop 1",
"short_name" : "Infinite Loop 1",
"types" :
[
"premise"
]
},
{
"long_name" : "1",
"short_name" : "1",
"types" :
[
"street_number"
]
},
{
"long_name" : "Infinite Loop",
"short_name" : "Infinite Loop",
"types" :
[
"route"
]
},
{
"long_name" : "Cupertino",
"short_name" : "Cupertino",
"types" :
[
"locality",
"political"
]
},
{
"long_name" : "Santa Clara County",
"short_name" : "Santa Clara County",
"types" :
[
"administrative_area_level_2",
"political"
]
},
{
"long_name" : "California",
"short_name" : "CA",
"types" :
[
"administrative_area_level_1",
"political"
]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" :
[
"country",
"political"
]
},
{
"long_name" : "95014",
"short_name" : "95014",
"types" :
[
"postal_code"
]
},
{
"long_name" : "2083",
"short_name" : "2083",
"types" :
[
"postal_code_suffix"
]
}
],
"formatted_address" : "Infinite Loop 1, 1 Infinite Loop, Cupertino, CA 95014, USA",
"geometry" :
{
"bounds" :
{
"northeast" :
{
"lat" : 37.3321786,
"lng" : -122.0297996
},
"southwest" :
{
"lat" : 37.3312158,
"lng" : -122.0305776
}
},
"location" :
{
"lat" : 37.3318598,
"lng" : -122.0302485
},
"location_type" : "ROOFTOP",
"viewport" :
{
"northeast" :
{
"lat" : 37.3330203302915,
"lng" : -122.0289492197085
},
"southwest" :
{
"lat" : 37.3303223697085,
"lng" : -122.0316471802915
}
}
},
"navigation_points" :
[
{
"location" :
{
"latitude" : 37.33116529999999,
"longitude" : -122.0307429
},
"restricted_travel_modes" :
[
"WALK"
]
},
{
"location" :
{
"latitude" : 37.3314215,
"longitude" : -122.030747
}
},
{
"location" :
{
"latitude" : 37.3317064,
"longitude" : -122.0307154
}
},
{
"location" :
{
"latitude" : 37.3319324,
"longitude" : -122.0307347
}
}
],
"place_id" : "ChIJAf9D3La1j4ARuwKZtGjgMXw",
"types" :
[
"premise",
"street_address"
]
}
],
"status" : "OK"
}
curl --location --request GET 'https://pr197-testing.zylalabs.com/api/9141/retrieve+location+data+from+geocode+api/16535/geocoding?address=1 Infinite Loop, Cupertino, CA 95014, USA' --header 'Authorization: Bearer YOUR_API_KEY'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
The Reverse Geocoding endpoint returns structured geographic information based on latitude and longitude coordinates. This includes a formatted address, address components (like street number, neighborhood, city, state, and postal code), precise coordinates, location type, viewport for mapping, and Plus codes.
Key fields in the response include `formatted_address`, `address_components`, `geometry.location` (with latitude and longitude), `location_type`, `viewport`, and `plus_code`. Each field provides specific geographic details for accurate location identification.
The response data is organized into a JSON structure. The main components include a `formatted_address` string, an array of `address_components` detailing each address part, a `geometry` object containing location coordinates, and a `plus_code` for alternative location representation.
The Geocoding endpoint provides information based on a specified address, returning structured data similar to the Reverse Geocoding endpoint. This includes the formatted address, address components, coordinates, and Plus codes, allowing users to convert addresses into geographic data.
Users can customize their requests by specifying latitude and longitude for the Reverse Geocoding endpoint or an address for the Geocoding endpoint. Additional parameters may include language preferences or specific data formats, depending on the API's capabilities.
The data is sourced from a combination of authoritative geographic databases, mapping services, and user-contributed information. This multi-source approach helps ensure comprehensive coverage and accuracy of geographic details.
Typical use cases include geolocation applications, logistics and delivery services, address validation, territory analysis, and geographic information systems (GIS). The API is useful for any application requiring precise location data and structured address information.
If the API returns partial or empty results, users should check the input coordinates for accuracy. Additionally, consider implementing fallback mechanisms, such as querying nearby locations or using alternative data sources to enhance result completeness.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
Service Level:
100%
Response Time:
125ms
Service Level:
100%
Response Time:
468ms
Service Level:
100%
Response Time:
140ms
Service Level:
100%
Response Time:
351ms
Service Level:
100%
Response Time:
630ms
Service Level:
100%
Response Time:
1,017ms
Service Level:
100%
Response Time:
14,431ms
Service Level:
100%
Response Time:
446ms
Service Level:
83%
Response Time:
564ms
Service Level:
100%
Response Time:
5,476ms
Service Level:
100%
Response Time:
3,976ms
Service Level:
100%
Response Time:
756ms
Service Level:
100%
Response Time:
538ms
Service Level:
100%
Response Time:
1,172ms
Service Level:
100%
Response Time:
840ms
Service Level:
100%
Response Time:
4,465ms
Service Level:
100%
Response Time:
1,453ms
Service Level:
100%
Response Time:
2,310ms
Service Level:
100%
Response Time:
2,010ms
Service Level:
100%
Response Time:
2,145ms