📂Data API

Connect to the Data APIs to access 3000+ of location attributes, around any lat-long in the country at a granularity of radius 200m, 500m and 1000m.

Data API with Latitude & Longitude

POST https://dataserving-in.geoiq.io/production/v1.0/getvariables

Headers

Request Body

{
    "status": 200,
    "body": {
        "data": {
            "w_pop_tt": 27950,
            "p_health_hp_np": 0.25045,
            "p_restaurant_rt_np": 1.39535,
            "p_retail_gc_np": 0.93023
        },
        "status": 200
    }
}

Sample Request

headers = {
    "x-api-key": "Authentication key",
    "Content-Type": "application/json"
}
body = {
    "lat": 24.966130,
    "lng": 77.592247,
    "variables": "p_retail_gc_np,w_pop_tt,p_health_hp_np,p_restaurant_rt_np",
    "radius": 500
}

Sample Response

{
    "data": {
        "w_pop_tt": 27950,
        "p_health_hp_np": 0.25045,
        "p_restaurant_rt_np": 1.39535,
        "p_retail_gc_np": 0.93023
    },
    "status": 200
}
""" Sample Python Code """

import json
import requests

url = "https://dataserving-in.geoiq.io/production/v1.0/getvariables"

payload = json.dumps({
  "lat": 12.909151,
  "lng": 77.6371584,
  "radius": 1000,
  "variables": "p_retail_gc_np,w_pop_tt,p_health_hp_np,p_restaurant_rt_np"
})

headers = {
  'x-api-key': '<Authentication key>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Data API with Address

POST https://dataserving-in.geoiq.io/production/v1.0/getvariables

Headers

Request Body

{
    "status": 200,
    "body": {
        "data": {
            "w_pop_tt": 27950,
            "p_health_hp_np": 0.25045,
            "p_restaurant_rt_np": 1.39535,
            "p_retail_gc_np": 0.93023
        },
        "status": 200
    }
}

Sample Request

headers = {
    "x-api-key": "Authentication key",
    "Content-Type": "application/json"
}
body = {
    "address": "35, Vajarahalli, 9th Mile, Kanakapura Road, Bangalore",
    "pincode": "560062",
    "variables": "p_retail_gc_np,w_pop_tt,p_health_hp_np,p_restaurant_rt_np",
    "radius": 500
}

Sample Response

{
    "data": {
        "w_pop_tt": 27950,
        "p_health_hp_np": 0.25045,
        "p_restaurant_rt_np": 1.39535,
        "p_retail_gc_np": 0.93023
    },
    "status": 200
}
""" Sample Python Code """

import json
import requests

url = "https://dataserving-in.geoiq.io/production/v1.0/getvariables"

payload = json.dumps({
  "address": "GeoIQ,Urbanvault 591, GF, 22nd cross, 15th Main Rd, HSR Layout, Bengaluru",
  "pincode": "560102",
  "radius": 1000,
  "variables": "p_retail_gc_np,w_pop_tt,p_health_hp_np,p_restaurant_rt_np"
})

headers = {
  'x-api-key': '<Authentication key>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Last updated