Quick Start
curl "https://api.routexio.com/v1/geocode?address=Makati%20City" \ -H "X-API-Key: om_your_api_key_here"
Authentication
All API requests require authentication via the X-API-Key header.
Request Headers
| X-API-Key | Your API key (required) |
| Content-Type | application/json (for POST requests) |
Keep your API key secure
Never expose your API key in client-side code. Always make API calls from your server.
Quotas & Rate Limits
API requests are limited by your plan. Usage resets on the 1st of each month.
Free Plan
₱0/mo- Requests50,000/month
- Rate Limit60/min
Premium
₱1,499/mo- Requests100,000/month
- Rate Limit300/min
Response Headers
| X-Quota-Limit | Monthly quota for your plan |
| X-Quota-Used | Requests used this month |
| X-Quota-Remaining | Remaining requests |
| X-Quota-Reset | When quota resets (ISO date) |
Road Blocks (Premium)
Premium users can create saved avoidance zones that are automatically applied to route calculations. Perfect for avoiding construction zones, flooding areas, or any custom regions.
Avoid Types
tollsAvoid toll roads and expresswayshighwaysAvoid highways and major roadsferriesAvoid ferry crossingsunpavedAvoid unpaved/gravel roadsPolygon Avoidance
Define custom polygons to avoid specific areas in your routes:
curl -X POST "https://api.routexio.com/v1/route" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"origin": "14.5995,120.9842",
"destination": "14.5547,121.0244",
"avoid": {
"types": ["tolls"],
"polygons": [{
"coordinates": [
[121.0, 14.5], [121.1, 14.5],
[121.1, 14.6], [121.0, 14.6]
]
}]
}
}'Schedule-based Blocks
Road blocks can be scheduled for specific days and times. Configure schedules in your dashboard under Road Blocks.
API Reference
Geocoding
Convert addresses to coordinates (forward geocoding) or coordinates to addresses (reverse geocoding).
/v1/geocodeConvert an address to coordinates
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| address | string | Required | The address to geocode |
| limit | number | Optional | Max results (default: 5) |
Example Request
curl "https://api.routexio.com/v1/geocode?address=Makati%20City" \ -H "X-API-Key: your-api-key"
Example Response
{
"success": true,
"data": {
"lat": 14.5547,
"lng": 121.0244,
"display_name": "Makati, Metro Manila, Philippines",
"type": "city"
}
}/v1/geocode/reverseConvert coordinates to an address
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| lat | number | Required | Latitude |
| lng | number | Required | Longitude |
Example Request
curl "https://api.routexio.com/v1/geocode/reverse?lat=14.5547&lng=121.0244" \ -H "X-API-Key: your-api-key"
Example Response
{
"success": true,
"data": {
"display_name": "Ayala Avenue, Makati, Metro Manila, Philippines",
"address": {
"road": "Ayala Avenue",
"city": "Makati",
"region": "Metro Manila",
"country": "Philippines"
}
}
}Routing
Calculate driving routes between two points with distance, duration, and optional avoidance.
/v1/routeGet driving directions between two points
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| origin | string | Required | Origin coordinates (lat,lng) |
| destination | string | Required | Destination coordinates (lat,lng) |
| avoid | string | Optional | Comma-separated: tolls, highways, ferries, unpaved (Premium) |
| mode | string | Optional | Travel mode: driving, walking, cycling (default: driving) |
Example Request
curl "https://api.routexio.com/v1/route?origin=14.5995,120.9842&destination=14.5547,121.0244&avoid=tolls,highways" \ -H "X-API-Key: your-api-key"
Example Response
{
"success": true,
"data": {
"distance": 8542,
"duration": 1245,
"distance_text": "8.5 km",
"duration_text": "21 mins",
"geometry": "encoded_polyline_here"
},
"meta": {
"engine": "valhalla"
}
}Distance Matrix
Calculate distances and durations between multiple origin-destination pairs.
/v1/matrixCalculate distance matrix
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| origins | array | Required | Array of origin coordinates |
| destinations | array | Required | Array of destination coordinates |
Example Request
curl -X POST "https://api.routexio.com/v1/matrix" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"origins": ["14.5995,120.9842", "14.5547,121.0244"],
"destinations": ["14.6091,121.0223", "14.5896,120.9812"]
}'Example Response
{
"success": true,
"data": {
"distances": [[5234, 3421], [2156, 4532]],
"durations": [[845, 612], [423, 756]]
}
}Places Search
Search for places, points of interest, and get autocomplete suggestions.
/v1/places/searchSearch for places by query
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| q | string | Required | Search query |
| lat | number | Optional | Latitude for proximity bias |
| lng | number | Optional | Longitude for proximity bias |
| limit | number | Optional | Max results (default: 10) |
Example Request
curl "https://api.routexio.com/v1/places/search?q=coffee%20shop&lat=14.5547&lng=121.0244" \ -H "X-API-Key: your-api-key"
Example Response
{
"success": true,
"data": [
{
"name": "Starbucks Glorietta",
"lat": 14.5510,
"lng": 121.0245,
"type": "cafe",
"address": "Glorietta 4, Makati"
}
]
}Need Help?
Can't find what you're looking for? Our team is here to help you integrate RouteXio into your application.