/geocode : An api to convert address to lat long

This API helps you convert any address into GPS coordinates (latitude and longitude). It’s perfect if you’re building apps or tools that need to show maps, calculate distances, or tag locations.

What It Does

Just send an address like:

1600 Amphitheatre Parkway, Mountain View, CA

…and you’ll get back:

  • The exact location name (if available)
  • Latitude (north/south position)
  • Longitude (east/west position)

API Endpoint

  • URL: https://node.nodetrigger.com/api/geocode
  • Method: POST
  • Content Type: application/json

What You Send (Request)

You only need to send one field in the body:

FieldTypeRequiredDescription
addressString✅ YesThe address you want to convert

Example:

{
  "address": "1600 Amphitheatre Parkway, Mountain View, CA"
}

Response

If the address is found, you’ll receive:

FieldTypeDescription
latStringLatitude (north/south coordinate)
lonStringLongitude (east/west coordinate)
display_nameStringThe full, formatted location name

Example:

{
  "lat": "37.4224857",
  "lon": "-122.0855846",
  "display_name": "Google Building 41, 1600 Amphitheatre Parkway, Mountain View, Santa Clara County, California, 94043, United States"
}

Things to Know

  • You only need the address – no need to know anything about maps or coordinates.
  • If the address is not found, you’ll get a simple error.

Possible Errors

CodeMessageWhat it means
400“Invalid or missing address”You didn’t provide a proper address
404“Address not found”The address couldn’t be located
500“Failed to fetch coordinates”Something went wrong on our side