Docs
  • đź‘‹Welcome
    • Overview
    • Placekey Design
    • Placekey Types
  • API Overview
    • Authentication
    • Usage Limits
    • Error Codes
    • Supported Countries
  • Placekey API
    • Quick Start
    • Input Parameters
      • Minimum Inputs
      • Optional Parameters
    • Response
      • Optional Responses
    • Bulk API
    • Example Queries
    • Placekey Lineage File
  • Geocoder
    • Introduction
    • Usage Limit
    • Status Descriptions
    • Example
  • Join Data Product
    • Join Data
  • Libraries
    • Python
    • Javascript
  • Integrations
    • Google Sheets Add On
Powered by GitBook
On this page
  • Request
  • Response
  1. Geocoder

Example

PreviousStatus DescriptionsNextJoin Data

Last updated 10 months ago

You can request Geocodes from the Placekey API the same way you request like address_placekey, building_placekey, and confidence score. Simply add “geocode” to the fields

Request

curl --location 'https://api.placekey.io/v1/placekey' \
--header 'apikey: {{apikey}}' \
--header 'Content-Type: application/json' \
--data '{
  "query": {
    "street_address": "1201 Grand Street",
    "city": "Hoboken",
    "region": "NJ",
    "postal_code": "07030",
    "iso_country_code": "US"
  },
  "options": {
    "fields": ["geocode"]
  }
}

Response

Note in the response, besides the lat and long, the location_type

{
  "query_id" : "0",
  "placekey" : "222@627-wbk-cwk",
  "geocode" : {
    "location" : {
      "lat" : 40.7525146656441,
      "lng" : -74.032666814035
    },
    "location_type" : "ROOFTOP"
  }
}
optional responses