reference API Reference USA Latest Data APIConnect to the Data APIs to access 5000+ location attributes, around any lat-long in the country at a granularity of radius as small as 100 meters to as large as 2 Kms.
Data API with Latitude & Longitude
POST
https://dataserving-us.geoiq.io/production/v1.0/getvariables
Request Body
Latitude co-ordinates should be between -90 to 90
Longitude co-ordinates should be between -180 to 180
(in meters) should be between 100 to 2000
Comma separated list of variables to be fetched. Maximum 50 variables can be fetched in a single call
200: OK Success 400: Bad Request Invalid input, object invalid 403: Forbidden Authorization Failure. Invalid key.
Copy {
"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
Copy headers = {
"x-api-key": "Authentication key",
"Content-Type": "application/json"
}
Copy body = {
"lat":40.0300971,
"lng":-75.648135,
"variables": "cen_10_bk_demo_tot_pop,cen_10_bk_tot_urb,cen_10_bk_tot_rur,acs5_19_pop_wht_blockgroup",
"radius": 500
}
Sample Response
Copy {
"status": 200,
"body": {
"data": {
"cen_10_bk_demo_tot_pop": 789,
"cen_10_bk_tot_urb": 388,
"cen_10_bk_tot_rur": 0,
"acs5_19_pop_wht_blockgroup": 432
},
"status": 200
}
}
Copy """ Sample Python Code """
import json
import requests
url = "https://dataserving-us.geoiq.io/production/v1.0/getvariables"
payload = json.dumps({
"lat": 40.0300971,
"lng": -75.648135,
"radius": 500,
"variables": "cen_10_bk_demo_tot_pop,cen_10_bk_tot_urb,cen_10_bk_tot_rur,acs5_19_pop_wht_blockgroup"
})
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-us.geoiq.io/production/v1.0/getvariables
Request Body
(in meters) should be between 100 to 2000
Comma separated list of variables to be fetched. Maximum 50 variables can be fetched in a single call
200: OK Success 400: Bad Request Invalid input, object invalid. 403: Forbidden Authorization failure. Invalid key.
Copy {
"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
Copy headers = {
"x-api-key": "Authentication key",
"Content-Type": "application/json"
}
Copy body = {
"address": "Manhattan, New York, NY, USA",
"variables": "cen_10_bk_demo_tot_pop,cen_10_bk_tot_urb,cen_10_bk_tot_rur,acs5_19_pop_wht_blockgroup",
"radius": 500
}
Sample Response
Copy {
"status": 200,
"body": {
"data": {
"cen_10_bk_demo_tot_pop": 15930,
"cen_10_bk_tot_urb": 9552,
"cen_10_bk_tot_rur": 0,
"acs5_19_pop_wht_blockgroup": 1565
},
"status": 200
}
}
Copy """ Sample Python Code """
import json
import requests
url = "https://dataserving-us.geoiq.io/production/v1.0/getvariables"
payload = json.dumps({
"address": "Manhattan, New York, NY, USA",
"radius": 500,
"variables": "cen_10_bk_demo_tot_pop,cen_10_bk_tot_urb,cen_10_bk_tot_rur,acs5_19_pop_wht_blockgroup"
})
headers = {
'x-api-key': '<Authentication key>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)