Reverse Geocode API
Current version: 1.0.0, View Release Notes
The Reverse Geocode API provides comprehensive geocoding capabilities. This powerful service combines forward geocoding (text-to-coordinates) and reverse geocoding (coordinates-to-address) functionality, making it essential for location-based applications, delivery systems, store locators, and any service requiring precise geographic information.
View the complete Reverse Geocode API Reference for detailed request/response schemas, examples, and interactive documentation.
Endpoint: POST /revgeocode
Base URL: https://api.magiclane.net/api/v1
Key Features:
- Convert coordinates to detailed addresses
- Search around a point, within an area, or along a path
- Returns multiple address results with distance ranking
- Includes administrative hierarchy (settlement, city, county, state, country)
- Identifies nearby points of interest
Required Parameters:
At least one geographic filter is required
Optional Parameters:
at- Reverse geocode at a point coordinate[longitude, latitude]in- Reverse geocode within an area (polygon, circle, or bbox)polygon- Polygon area defined by coordinates or polylinecircle- Circle area with center[longitude, latitude]andradiusin metersbbox- Bounding box witheast,west,south,northcoordinates
along- Reverse geocode along a path with:polyline- Encoded polyline pathcoords- Array of coordinates defining the pathradius- Search radius around the path in meters
limit- Maximum number of results to return
Example Request - Reverse Geocode at Point
curl -X POST https://api.magiclane.net/api/v1/revgeocode \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"at": [13.388860, 52.517037],
"limit": 5
}'
This returns address information for the specified coordinates.
Example Request - Reverse Geocode in Area
curl -X POST https://api.magiclane.net/api/v1/revgeocode \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"in": {
"circle": {
"center": [6.85524, 50.951736],
"radius": 500
}
},
"limit": 10
}'
This finds all addresses and POIs within a 500m radius.
Example Request - Reverse Geocode Along Path
curl -X POST https://api.magiclane.net/api/v1/revgeocode \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"along": {
"coords": [
[13.388860, 52.517037],
[13.397634, 52.529407],
[13.428555, 52.523219]
],
"radius": 100
},
"limit": 20
}'
This finds addresses along the specified path within 100m.
Response Structure
The API returns a JSON object containing:
info- Copyright and attribution informationresults- Array of address objects, each containing:coordinates- Location as[longitude, latitude]name- Place or feature nameaddress- Detailed address components:street name- Street namestreet number- House/building numberpostal code- Postal/ZIP codesettlement- Settlement/neighborhoodcity- City namecounty- County namestate- State/province namecountry- Country namecountry code- ISO country code
distance- Distance from search point in meters (when applicable)