Skip to content

Fare endpoint

GET /fare fetches a live Grab fare quote between two GPS points.

GET https://api.taxiscrape.com/fare

The coordinate parameters are required. format is optional and defaults to simple.

NameInTypeRequiredNotes
from_latquerynumber, doubleYesPickup latitude.
from_lonquerynumber, doubleYesPickup longitude.
to_latquerynumber, doubleYesDropoff latitude.
to_lonquerynumber, doubleYesDropoff longitude.
formatquerystringNosimple for normalized fare data, full for the original Grab payload wrapped under grab. simplified is accepted as an alias for simple.

Authenticated requests use your dashboard API key:

Authorization: Bearer <API key>

Requests without this header are still accepted, but they share a small global unauthenticated abuse limit.

Terminal window
curl -s \
-H 'Authorization: Bearer <API key>' \
'https://api.taxiscrape.com/fare?from_lat=1.3644&from_lon=103.9915&to_lat=1.3048&to_lon=103.8318&format=simple'
const params = new URLSearchParams({
from_lat: '1.3644',
from_lon: '103.9915',
to_lat: '1.3048',
to_lon: '103.8318',
format: 'simple',
});
const response = await fetch(`https://api.taxiscrape.com/fare?${params}`, {
headers: {
Authorization: 'Bearer <API key>',
},
});
if (!response.ok) {
throw new Error(`TaxiScrape request failed: ${response.status}`);
}
const data = await response.json();
const firstService = data.grab.services[0];
console.log(firstService.name, firstService.fare.display);

The 200 response is returned as application/json; charset=utf-8.

By default the endpoint returns the simple format. It keeps the generated geocoding metadata at the top level and puts normalized Grab services under grab.services:

{
"__api_geocoding_found": {
"from": {
"address": "Changi Airport, Changi",
"keywords": "Changi Airport"
},
"to": {
"address": "2 Orchard Turn, #B4-70, Ion Orchard, Singapore, 238801",
"keywords": "GoGo Franks - Ion Orchard"
}
},
"grab": {
"servicesListID": "1f14fa76-36f4-62aa-804e-909ac1b84895",
"ttl": 28,
"services": [
{
"id": 13804,
"name": "Standard: 4 seater (Car)",
"category": "Ride",
"group": "Airport",
"capacity": "4",
"description": "2x large luggage",
"eta": {
"displayText": "3 mins away",
"distance": 0,
"duration": 0
},
"paymentMethods": ["CASH", "CARD"],
"fare": {
"display": "S$27.30",
"currency": {
"code": "SGD",
"exponent": 2,
"symbol": "S$"
},
"lowerBound": 2730,
"upperBound": 2730,
"fixed": true,
"seatsRequested": 1
}
}
]
}
}

Use format=full when you need the complete upstream payload:

{
"__api_geocoding_found": {
"from": { "address": "Changi Airport, Changi", "keywords": "Changi Airport" },
"to": { "address": "2 Orchard Turn, #B4-70, Ion Orchard, Singapore, 238801", "keywords": "GoGo Franks - Ion Orchard" }
},
"grab": {
"categoryGroups": [
{
"groups": [
{
"name": "Airport",
"services": [
{
"ID": 13804,
"name": "Standard: 4 seater (Car)",
"display": { "capacity": "4", "description": "2x large luggage" },
"quote": { "lowerBound": 2730, "upperBound": 2730, "signature": "..." }
}
]
}
]
}
],
"ttl": 28
}
}

Fare values are returned in the smallest currency unit for the returned currency. Use quote.currency.exponent to format a display amount.

function formatFare(fare) {
const units = fare.finalFare ?? fare.lowerBound;
const amount = units / 10 ** fare.currency.exponent;
return new Intl.NumberFormat('en', {
style: 'currency',
currency: fare.currency.code,
}).format(amount);
}

The simple response also includes fare.display, which is preformatted for quick display.

FieldMeaning
__api_geocoding_found.fromPickup location resolved by TaxiScrape before requesting fares.
__api_geocoding_found.toDropoff location resolved by TaxiScrape before requesting fares.
grab.services[]Normalized ride products returned in format=simple.
grab.services[].nameDisplay name of a ride product.
grab.services[].eta.displayTextHuman-readable pickup wait time.
grab.services[].fare.displayPreformatted fare text.
grab.services[].fare.currencyCurrency metadata for the quote.
grab.services[].fare.lowerBoundLower fare bound in minor units.
grab.services[].fare.upperBoundUpper fare bound in minor units.
grab.services[].fare.finalFareFinal fare if the upstream response provides one.
grab.services[].fare.fixedWhether the quote is fixed.
grab.categoryGroups[].groups[].services[]Original Grab service list returned in format=full.
StatusMeaning
200Fare data returned.
400Query parameters are invalid, including an unsupported format.
401API key is malformed or invalid.
402Authenticated account has no credits left.
429Unauthenticated global rate limit exceeded.
502Upstream provider error.
503Service unavailable.

See Error responses for the error body format.