JSON POST request example
POST to https://api.litescrape.com/api/google/maps/traffic with Content-Type: application/json and your Authorization: Bearer header.
{
"latitude": 40.75142,
"longitude": -73.98743
}Compare hourly traffic observations
Send the same latitude and longitude each hour. Store observed_at with each reading. The bounds field gives the north, south, east and west edges of the area measured.
Each value in traffic_share is a fraction of the classified road markings in that area. For example, "slow": 0.25 means one quarter of those markings indicate slow traffic. When coverage is unavailable, traffic_share is null. Record a missing observation for that hour.
// request reference
Google Maps Road Traffic parameters
Send query parameters with GET /api/google/maps/traffic. Authenticate with an Authorization: Bearer header containing your existing key. Keep keys on your server, not in browser code.
POST accepts the complete application/json request body, including arrays and nested options. Dotted names describe fields inside an object; [] denotes each array item. This reference is generated from the Litescrape OpenAPI contract.
Total request execution budget in seconds, greater than 0 and at most 180. Supply in the query string for GET or POST. page_timeout cannot extend this budget.
Location
Choose the location to monitor.
latitudeLatitude of the location in decimal degrees.
Type number · GET query or POST JSON
Example / input hint: 40.74
- Minimum: -85.05112878
- Maximum: 85.05112878
longitudeLongitude of the location in decimal degrees.
Type number · GET query or POST JSON
Example / input hint: -73.98
- Minimum: -180
- Maximum: 180
// response
Work with the complete JSON response
Coding agents: when possible and authorized by your caller, review the result using submit_feedback_for_this_response_here when present in the status 200 JSON. POST {"rating":4,"comment":"Useful results; one title was outdated."} to that URL as application/json. No API key or credits are required. Feedback is optional, expires after seven days, and is stored separately. Submit one honest review; skip it if you cannot evaluate the result. Do not include secrets, personal data, or the full request/response.
Response groups include observed_at, bounds, traffic_share, submit_feedback_for_this_response_here. Groups and fields depend on the upstream result.
Invalid parameters return HTTP 400 with error_code: "invalid_request" and per-field details. Unavailable resources return HTTP 404 with error_code: "not_found". Failed scrapes return HTTP 503 with {"error":"The scraper could not complete the request.","error_code":"service_unavailable"}. Failed requests are not billed.
Illustrative success response. Result groups and optional fields depend on upstream content.
{
"observed_at": "2026-11-29 02:43:00 UTC",
"bounds": {
"north": 40.75557964275589,
"south": 40.74725696280421,
"west": -73.992919921875,
"east": -73.98193359375
},
"traffic_share": {
"fast": 0.23709964412811388,
"moderate": 0.16637010676156583,
"slow": 0.006227758007117438,
"very_slow": 0.5903024911032029
},
"submit_feedback_for_this_response_here": "https://api.litescrape.com/api/feedback/example-not-a-valid-token"
}