API Documentation
Chibigeo is a geocoding and reverse geocoding API based on OpenStreetMap data, built upon Photon. It provides a simple and efficient way to convert addresses into geographic coordinates (latitude and longitude) and vice versa.
Features
- Geocoding: Convert addresses into geographic coordinates.
- Reverse Geocoding: Convert geographic coordinates into human-readable addresses.
Authentication
To use the Chibigeo API, you need to sign up for an API key. This key must be included in the headers of your requests for authentication. Include your API key in the request headers as follows:
Authorization: Bearer YOUR_API_KEY
Geocoding
Geocoding is the process of converting a human-readable address into geographic coordinates. With Chibigeo, you can easily obtain the latitude and longitude of any address worldwide.
Example Request
GET https://app.chibigeo.com/api/v1/geocode?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA
Example Response
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"osm_type": "N",
"osm_id": 2192620021,
"osm_key": "office",
"osm_value": "it",
"type": "house",
"postcode": "94043",
"housenumber": "1600",
"countrycode": "US",
"name": "Google Headquarters",
"country": "United States",
"city": "Mountain View",
"street": "Amphitheatre Parkway",
"state": "CA",
"county": "Santa Clara"
},
"geometry": {
"type": "Point",
"coordinates": [
-122.084614,
37.4217636
]
}
},
{
"type": "Feature",
"properties": {
"osm_type": "W",
"osm_id": 23733659,
"osm_key": "building",
"osm_value": "commercial",
"type": "house",
"postcode": "94043",
"housenumber": "1600",
"countrycode": "US",
"name": "Google Building 41",
"country": "United States",
"city": "Mountain View",
"street": "Amphitheatre Parkway",
"state": "CA",
"county": "Santa Clara",
"extent": [
-122.0859868,
37.4228508,
-122.0851511,
37.4221124
]
},
"geometry": {
"type": "Point",
"coordinates": [
-122.08558456613565,
37.42248575
]
}
}
]
}
Reverse Geocoding
Reverse geocoding is the process of converting geographic coordinates into a human-readable address. Chibigeo allows you to retrieve the address information for any location by simply providing its latitude and longitude.
Example Request
GET https://app.chibigeo.com/api/v1/geocode/reverse?lat=37.4217636&lon=-122.084614
Example Response
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"osm_type": "N",
"osm_id": 2192620021,
"osm_key": "office",
"osm_value": "it",
"type": "house",
"postcode": "94043",
"housenumber": "1600",
"countrycode": "US",
"name": "Google Headquarters",
"country": "United States",
"city": "Mountain View",
"street": "Amphitheatre Parkway",
"state": "CA",
"county": "Santa Clara"
},
"geometry": {
"type": "Point",
"coordinates": [
-122.084614,
37.4217636
]
}
}
]
}
Simple as that.