GET
/
v1
/
geo
/
geocode
import { JigsawStack } from "jigsawstack";

const jigsawstack = JigsawStack({
  apiKey: "your-api-key",
});

const result = await jigsawstack.geo.geocode({
  lat: 40.78337,
  lng: -73.96442,
});
{
  "success": true,
  "data": [
    {
      "type": "address",
      "full_address": "100 86th Street Transverse, New York City, New York 10000, United States",
      "name": "100 86th Street Transverse",
      "name_preferred": "100 86th Street Transverse",
      "place_formatted": "New York City, New York 10000, United States",
      "postcode": "10000",
      "district": "New York County",
      "place": "New York City",
      "region": {
        "name": "New York",
        "wikidata_id": "Q1384",
        "region_code": "NY",
        "region_code_full": "US-NY",
        "translations": {
          "en": {
            "language": "en",
            "name": "New York"
          }
        }
      },
      "country": {
        "name": "United States",
        "country_code": "US",
        "country_code_alpha_3": "USA",
        "translations": {
          "en": {
            "language": "en",
            "name": "United States"
          }
        }
      },
      "language": "en",
      "geoloc": {
        "type": "Point",
        "coordinates": [-73.96442, 40.78337]
      }
    }
  ]
}

Query

search_value
string

The search value. Not required if lat and lng are specified.

lat
string

The latitude of the address of interest. Not required if search_value is specified.

lng
string

The longitude of the address of interest. Not required if search_value is specified.

country_code
string

The ISO 3 country code to filter search results.

proximity_lat
string

The proximity latitude of the search value.

proximity_lng
string

The proximity longitude of the search value.

types
string
  • address
  • street
  • neighborhood
  • country
  • region
  • place
  • street
  • postcode
  • district
  • city
x-api-key
string
required

Your JigsawStack API key

Response

success
boolean

Indicates whether the call was successful.

import { JigsawStack } from "jigsawstack";

const jigsawstack = JigsawStack({
  apiKey: "your-api-key",
});

const result = await jigsawstack.geo.geocode({
  lat: 40.78337,
  lng: -73.96442,
});
{
  "success": true,
  "data": [
    {
      "type": "address",
      "full_address": "100 86th Street Transverse, New York City, New York 10000, United States",
      "name": "100 86th Street Transverse",
      "name_preferred": "100 86th Street Transverse",
      "place_formatted": "New York City, New York 10000, United States",
      "postcode": "10000",
      "district": "New York County",
      "place": "New York City",
      "region": {
        "name": "New York",
        "wikidata_id": "Q1384",
        "region_code": "NY",
        "region_code_full": "US-NY",
        "translations": {
          "en": {
            "language": "en",
            "name": "New York"
          }
        }
      },
      "country": {
        "name": "United States",
        "country_code": "US",
        "country_code_alpha_3": "USA",
        "translations": {
          "en": {
            "language": "en",
            "name": "United States"
          }
        }
      },
      "language": "en",
      "geoloc": {
        "type": "Point",
        "coordinates": [-73.96442, 40.78337]
      }
    }
  ]
}