Geocode
0.1 creditsConvert addresses to coordinates, or coordinates to addresses (reverse geocode), using Google's geocoding engine.
POST
/api/v1/tools/google/geocodeParameters
addressstring
Address to geocode. Required if latlng is not set. PO boxes and non-standard formats may return ZERO_RESULTS.
latlngstring
Coordinates to reverse geocode, e.g. "40.714,-74.006". Required if address is not set.
languagestring
Language code for results (e.g. "en", "ja"). Affects address formatting and component names.
Response Schema
dataobject
Geocode result
statusstring
Response status (OK, ZERO_RESULTS, etc.)
resultsobject[]
Array of geocoded locations
metaobject
Request metadata
toolstring
Tool name (geocode)
creditsUsednumber
Credits consumed (0.1)
requestIdstring
Unique request ID
Request
curl -X POST https://scraper.run/api/v1/tools/google/geocode \-H "Authorization: Bearer sc_live_..." \-H "Content-Type: application/json" \-d '{"address": "1600 Amphitheatre Parkway, Mountain View, CA"}'
Response Example
{"data": {"status": "OK","results": [{"address": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA","placeId": "ChIJj61dQgK6j4AR4GeTYWZsKWw","lat": 37.4224764,"lng": -122.0842499,"locationType": "ROOFTOP","types": ["street_address"],"components": {"streetNumber": "1600","street": "Amphitheatre Parkway","city": "Mountain View","state": "California","stateCode": "CA","country": "United States","countryCode": "US","postalCode": "94043"}}]},"meta": {"tool": "google-geocode","creditsUsed": 0.1,"requestId": "req_abc123"}}