Example 1: Geocode and Boundary Request
Simple geocode an address and return Census geographies
ty=data&t=geo,bnd&geoa=821 Traction Ave.,90013&bt=4,6,7,23&md=1
Definition of parameters in string
- ty: The service type, which in this case is 'data': a JSON string.
- t: The data sub type. A single or comma delimited set of sub types. In this example; geo=geocoding an address and bnd=request boundary object.
- geoa: The geocode search string. A free-form string of an address to geocode. As with most geocoders, it can handle many different address formats.
- bt: The boundary type id. A single or comma delimited set of numbers. In this example; 4=county, 6=tracts, 7=Zip Code Tabulation Area, 23=117th Congressional District.
- md: Metadata only. Omits spatial data for boundary requests.
Results of the query string
{
"responseCode": 200,
"geo": {
"address": {
"zip": "90013",
"address": "821 Traction Ave<BR>Los Angeles CA 90013-1855",
"suite": "",
"address2": null,
"city": "Los Angeles",
"address1": "821 Traction Ave",
"plus4": "1855",
"state": "CA"
},
"lng": "-118.235240",
"level": "P4",
"success": true,
"acodes": "V44-I44-P7-100",
"lat": "34.045080",
"which": 3
},
"bnd": {
"boundaries": [
{
"boundary": {
"id": 696960970,
"identifier": "06037",
"name": "Los Angeles",
"type": {
"boundaryType": {
"id": 4,
"definitionId": 1252,
"type": "County"
}
}
}
},
{
"boundary": {
"id": 697048757,
"identifier": "06037206052",
"name": "06037206052",
"type": {
"boundaryType": {
"id": 6,
"definitionId": 1255,
"type": "Census Tract"
}
}
}
},
{
"boundary": {
"id": 697391059,
"identifier": "90013",
"name": "90013",
"type": {
"boundaryType": {
"id": 7,
"definitionId": 1257
}
}
}
},
{
"boundary": {
"id": 4645854,
"identifier": "0634",
"name": "California's 34th District",
"type": {
"boundaryType": {
"id": 23,
"definitionId": 696,
"type": "Congressional District"
}
}
}
}
]
},
"debug": {
"executionTime": "0.3475 seconds"
},
"versions": null,
"loginState": 4,
"userId": null
}
Description of the results
The geo returns the longitude of -118.235240 and latitude of 34.045080.
The bnd object returns
- County ID=06037,
- Census Tract ID=06037206052,
- Zip Code Tabulation Area ID=90013,
- 117th Congressional District ID=California's 34th District