- Print
- DarkLight
- PDF
Addresses Documentation
- Print
- DarkLight
- PDF
Purpose
When you have an address, adding a location to that address or enriching it with the LightBox Geocoding API is a critical function. But there are situations in which you have a location and would like to find an address, or addresses, based on that location.
- Broadband and telco users need to understand the location, and the number of addresses in that location, for planning purposes.
- Insurance and finance industry users need to understand each address that resides within a parcel, or even in a building, to help drive business decisions. The LightBox Address API provides the endpoints needed to help solve these challenges.
Swagger: OAS 3.1 Specification
Features
- Query addresses using a point to return the nearest address to that location.
- Pass in a LightBox parcel ID to return all addresses on a parcel.
- Pass in a LightBox structure ID to return all addresses on that parcel.
- Pass in a polygon, along with a buffer unit and buffer distance, to return all addresses that are within that buffer.
- Use the Address tile service to add addresses to a common map control.
Requirements
The LightBox APIs are hosted in the cloud and therefore have no platform requirements. Application requirements include:- A network connection to the LightBox API server
- Ability to parse JavaScript Object Notation (JSON) API responses
- Secure HTTPS connection
- LightBox authentication key
- LightBox authentication key
Connecting your account
When your LightBox user account is created, a unique API key is also generated. The API key should be kept secret at all times and can only be used for API requests. The key is required in all API calls.
To retrieve your unique API key:
- Log in to the LightBox Developer Portal
- Select Apps from the menu bar
- In your approved App, note your API key (under Consumer Key)
Performing API requests
All API requests must be made over secure HTTPS connections. Requests made over HTTP will fail.
The base URL of the API server that all API requests will be made to is: https://api.lightboxre.com/ followed by a version number https://api.lightboxre.com/v1
Authentication
LightBox APIs uses a token-based authentication. All requests to the LightBox APIs must be authenticated. The token to be passed via an HTTP header with key 'x-api-key' and value <Your authentication token>
Pass your unique API key in the authorization header of every LightBox API call. LightBox uses this information to authenticate your identify and determine whether you have sufficient permissions to complete the operation. curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/
API Requests
Get Addresses by Geometry
Return address records based on a geometry WKT (Well Known Text) string.
Note: Supports both US and Canada addresses
Examples:
- POINT(-122.40317865990883 45.585729937697515)
- LINESTRING (-122.40581795357949 45.58497908445598,-122.40325376176125 45.58627054581282)
- POLYGON ((-122.4032877944377 45.58629457984625,-122.40264406427413 45.585697658341736,-122.40184476598769 45.58610686936547,-122.40244558080703 45.586688769812724,-122.4032877944377 45.58629457984625))
GET /addresses/{countryCode}/geometry
Example requests
curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/addresses/us/geometry?wkt=POINT%28-117.852723%2033.63799%29&bufferDistance=50&bufferUnit=m
https://api.lightboxre.com/v1/addresses/us/geometry?wkt=POINT%28-117.852723%2033.63799%29&bufferDistance=50&bufferUnit=m
Parameters
Parameter | Type | Description | Usage |
---|---|---|---|
countryCode | path | ISO 3166 alpha-2 country code (e.g., 'US' for the United States). | required |
wkt | query | The geometry of the location expressed in WKT format. | required |
bufferDistance | query | Buffer distance expressed in 'bufferUnits'. | optional |
bufferUnit | query | The unit type to apply to the buffer (e.g., m, km, ft, mi) | optional |
nearest | query | Using the optional parameter 'nearest' will return the nearest address to the point location. Possible values (true, false). Note: LINESTRING and POLYGON are not accepted as WKT value when using nearest and bufferDistance and bufferUnit is ignored. | optional |
limit | query | A number of how many records you would like returned when using nearest. Default = 1 | optional |
offset | query | Offset within the dataset to start to pull records from. Used when pagination is activated. If paging is not activated then this value will be null. | optional |
Response
Media type: application/json
Get Address by ID
Return an address record using the LightBox Address ID or UAID.
Note: Supports both US and Canadian addresses.
GET /addresses/{countryCode/{id}
Example requests
curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/addresses/us/0606ZGPRLD5KGWFYRD7QH9
https://api.lightboxre.com/v1/addresses/us/0606ZGPRLD5KGWFYRD7QH9
Parameter | Type | Description | Usage |
---|---|---|---|
countryCode | path | ISO 3166 alpha-2 country code (e.g., 'us' for the United States). | required |
id | path | The LightBox Address ID. for US addresses either the UAID or the UAAID for Canadian addresses. | required |
Response
Media type: application/json
Get Addresses by Parcel ID
Return address records that are on a parcel using the LightBox Parcel ID.
GET /addresses/_on/parcel/{countryCode/{id}
Example requests
curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/addresses/_on/parcel/us/0606ZGPRLD5KGWFYRD7QH9
https://api.lightboxre.com/v1/addresses/_on/parcel/us/0606ZGPRLD5KGWFYRD7QH9
Parameter | Type | Description | Usage |
---|---|---|---|
id | path | The LightBox Parcel ID. | required |
Response
Media type: application/json
Get Addresses by Structure ID
Return address records that are on a structure using the LightBox Structure ID.
GET /addresses/_on/structure/us/{id}
Example requests
curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/addresses/_on/structure/us/0606ZGPRLD5KGWFYRD7QH9
https://api.lightboxre.com/v1/addresses/_on/structure/us/0606ZGPRLD5KGWFYRD7QH9
Parameter | Type | Description | Usage |
---|---|---|---|
id | path | The LightBox Structure ID. | required |
Response
Media type: application/json
Get Addresses by Assessment ID
Return address records that are on a structure using the LightBox Assessment ID.
GET /addresses/_on/assessment/us/{id}
Example requests
curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/addresses/_on/assessment/us/03029JH5KG17JF5Y10YBHT
https://api.lightboxre.com/v1/addresses/_on/assessment/us/03029JH5KG17JF5Y10YBHT
Parameter | Type | Description | Usage |
---|---|---|---|
id | path | The LightBox Structure ID. | required |
Response
Media type: application/json
Get Addresses by LocationInfo ID
Return address records that are on a structure using the LightBox LocationInfo ID.
GET /addresses/_on/locationinfo/us/{id}
Example requests
curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/addresses/_on/locationinfo/us/0703QF6CEZROTHV2Y37Z6F
https://api.lightboxre.com/v1/addresses/_on/locationinfo/us/0703QF6CEZROTHV2Y37Z6F
Parameter | Type | Description | Usage |
---|---|---|---|
id | path | The LightBox LocationInfo ID. | required |
Response
Media type: application/json
Addresses by LightBox Site ID
Return addresses that contain the site object identified by the LightBox Site 'ID.'
GET /addresses/_on/site/us/{id}
Example Requests
curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/addresses/_on/site/us/0904YD6NQEZ3DPCJJG3E6U
https://api.lightboxre.com/v1/addresses/_on/site/us/0904YD6NQEZ3DPCJJG3E6U
Parameter | Type | Description | Usage |
---|---|---|---|
id | path | Site LightBox ID | required |
Response
Media type: application/json
Address Tile Endpoint
Use within common map controls to show address points as a tile overlay.
GET /addresses/{countryCode}/tile/{zoom}/{x}/{y}
Example Requests
curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/addresses/us/tile/18/45050/104888
https://api.lightboxre.com/v1/addresses/us/tile/18/45050/104888
Parameters
Parameter | Type | Description | Usage |
---|---|---|---|
zoom | path | Tile zoom level, which can be a minimum of '13' and a maximum of '21.' | required |
x | path | Tile column. | required |
y | path | Tile row. | required |
color | query | Line color represented in RGB format. | optional |
size | query | Size of assessment points in displayed map, which can be a minimum of '0'. | optional |
symbol | query | Integer representation of symbol to display points as, which can be a minimum of '1' and a maximum of '20'. | optional |
opacity | query | Fill color opacity values 0-100 with 0 being transparent and 100 being opaque. | optional |
id | query | This parameter allows you to pass in a LightBox Parcel ID or ids separated by a comma so that only those parcels are displayed. | optional |
Response
Media type: image/png
Addresses Tile Bounding Box Endpoint
Use within common map controls to show address points as a bounding box overlay.
GET /addresses/us/tile
Example Requests
curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/addresses/us/tile?bbox=-83.0434660625,40.0198659375,-83.04070793749999,40.0226240625&width=600&height=600
https://api.lightboxre.com/v1/addresses/us/tile?bbox=-83.0434660625,40.0198659375,-83.04070793749999,40.0226240625&width=600&height=600
Parameters
bbox | path | A bounding box expressed in the NAD83 projected coordinate system. | required |
width | path | Width of the result image. | required |
height | path | Height of the result image. | required |
color | query | Line color represented in RGB format. | optional |
fill | query | Fill color represented in RGB format. | optional |
weight | query | Line weight represented in a number 1-10 with 1 being thin and 10 being thick. | optional |
opacity | query | Fill color opacity values 0-100 with 0 being transparent and 100 being opaque. | optional |
id | query | This parameter allows you to pass in a LightBox Parcel ID or ids separated by a comma so that only those parcels are displayed. | optional |
Response
Media type: image/png
API Response
For each endpoint other than the tile requests, the response will stay consistent.
{
"$ref": "string",
"$metadata": {
"geogcs": {
"epsg": 4326
},
"recordSet": {
"totalRecords": 99,
"limit": 100,
"offset": 0,
"bbox": {
"xMax": -105.250409,
"xMin": -105.251916,
"yMax": 40.023629,
"yMin": 40.022576
}
}
},
"addresses": [
{
"$ref": "string",
"id": "string",
"uaid": "0CECC2F1-E86E-D832-7D5C-8B819619FCD5",
"uuaid": "0CECC2F1-E86E-D832-7D5C-8B819619FCD5",
"$metadata": {
"geocode": {
"confidence": {
"streetNumber": 1,
"streetName": 1,
"locality": 1,
"postalCode": 1,
"score": 1
},
"changeFlag": {
"streetName": "Fuzzy",
"streetType": "Added",
"locality": "Changed",
"postalCode": "Removed"
},
"addressComponents": {
"prefixDirection": "string",
"prefixType": "string",
"streetNumber": "string",
"streetName": "string",
"suffixType": "string",
"suffixDirection": "string",
"unit": "string"
},
"precisionCode": 10
}
},
"label": "string",
"isPrimary": true,
"type": "Residential",
"postalCodeDerived": true,
"corroborationIndex": true,
"location": {
"streetAddress": "string",
"borough": "string",
"locality": "string",
"regionCode": "AL",
"postalCode": "string",
"postalCodeExt": "string",
"unit": "string",
"county": "Orange County",
"countryCode": "US",
"representativePoint": {
"longitude": 0,
"latitude": 0,
"geometry": {
"wkt": "string"
}
}
},
"parcels": [
{
"$ref": "string",
"id": "string"
}
],
"structures": [
{
"$ref": "string",
"id": "string"
}
],
"assessments": [
{
"$ref": "string",
"id": "string"
}
],
"locationInfos": [
{
"$ref": "string",
"id": "string"
}
]
}
]
}
Field Dictionary
Field | Type | Description |
---|---|---|
$ref | string | Reference API callback to this address object. |
id | string | LightBox Address ID. |
$metadata.geocode | object | Information about the geocoded address and how well it was matched to the matched address. Note: This only exists when a geocode operation is performed. (see the LightBox Geocoding API). |
$metadata.geocode.confidance | object | Information about the confidence score of the matched address. |
$metadata.geocode.confidance.streetNumber | integer | Confidence metric for the street number. The value is between 0 and 1, with 1 being the highest confidence match and 0 being the lowest confidence. |
$metadata.geocode.confidance.streetName | integer | Confidence metric for the street name. The value is between 0 and 1 with 1 being the highest confidence match and 0 being the lowest confidence. |
$metadata.geocode.confidance.localilty | integer | Confidence metric for the locality. The value is between 0 and 1, with 1 being the highest confidence match and 0 being the lowest confidence. |
$metadata.geocode.confidance.potalCode | integer | Confidence metric for the postal code. The value is between 0 and 1, with 1 being the highest confidence match and 0 being the lowest confidence. |
$metadata.geocode.changeFlag | object | Information about the differences between the input address and the matched address. |
$metadata.geocode.changeFlag.streetName | string | Change flag for the street name portion of the matched address. There are four possible values (Fuzzy, Added, Changed, Removed). Fuzzy: What we matched was close but not exact. Added: The value was not passed in, so it was added to the matched address. Changed: The value did not match what was passed in, so it was changed. Removed: The matched address did not contain this value, so it was removed. |
$metadata.geocode.changeFlag.streetType | string | Change flag for the street type portion of the matched address. There are four possible values (Fuzzy, Added, Changed, Removed). |
$metadata.geocode.changeFlag.locality | string | Change flag for the locality portion of the matched address. There are four possible values (Fuzzy, Added, Changed, Removed). |
$metadata.geocode.changeFlag.postalCode | string | Change flag for the postal code portion of the matched address. There are four possible values (Fuzzy, Added, Changed, Removed). |
$metadata.geocode.addressComponents | object | Information about the input address components. |
$metadata.geocode.addressComponents.prefixDirection | string | Prefix direction address component of the input address. |
$metadata.geocode.addressComponents.prefixType | string | Prefix type address component of the input address. |
$metadata.geocode.addressComponents.streetNumber | string | The street number address component of the input address. |
$metadata.geocode.addressComponents.streetName | string | The street name address component of the input address. |
$metadata.geocode.addressComponents.suffixType | string | The street suffix type address component of the input address. |
$metadata.geocode.addressComponents.suffixDirection | string | The street suffix direction address component of the input address. |
$metadata.geocode.addressComponents.unit | string | The unit address component of the input address. |
$metadata.geocode.precisionCode | integer | Latitude and longitude precision. |
label | string | Address label. |
isPrimary | boolean | True, if the address is the primary address. False, if it is not. |
type | string | Residential Business Indicator indicates if an address is a business, residential, mixed use, or unknown address type. |
corroborationIndex | See section below | |
postalCodeDerived | ||
location.streetAddress | string | Street address, which comprises street name, street directional prefix, street number, street suffix, unit type, and unit number (e.g., '125 Main Street S Unit 5'). |
location.borough | string | If applicable, the borough of the address. |
location.locality | string | The city portion of the address (e.g., CHICAGO, ATLANTA, DENVER, etc.). |
location.regionCode | string | Region code based on country code, including USPS Pub. 28 App. B for the United States and ISO 3166-2:CA for Canada. |
location.postalCode | string | 5-digit postal code. |
location.postalCodeExt | string | 4-digit postal code extension. |
location.unit | string | Unit portion of the address. |
location.county | string | County in which the address is located. |
locatoin.countryCode | string | ISO 3166 alpha-2 country code (e.g., 'US' for the United States). |
locatoin.representativePoint.longitude | double | A geographic coordinate that specifies the east-west position of a point on the Earth's surface, or the surface of a celestial body. |
location.representativePoint.latitude | double | A geographic coordinate that specifies the north-south position of a point on the Earth's surface, or the surface of a celestial body. |
location.representativePoint.wkt | string | Well Known Text representation of the point. |
Corroboration Index
What do the CI ranges represent?
Using our CI formula, we have definitions for CI values which can be used to help instruct your business processes.
0 | There is no evidence in support of the existence of the address. |
0 < x <= 0.3 | There is evidence that the address exists in a street segment range |
0.3 < x <= 0.5 | The address is likely to exist, more evidence will be collected when possible but this value is sufficient to believe the object is present. |
0.5 < x <= 0.95 | The address is very likely present |
x > 0.95 | The address is almost certain to be present based on one or more physical visits by a trusted and verified source |
HTTP Error Codes
200 | The request succeeded. |
201 | The object was created successfully |
202 | Accepted, no content |
204 | Successful, no content |
204 | The server has successfully fulfilled the request and that there is no additional content to send in the response payload body. Typically returned on a DELETE |
400 | One or more of the request parameters were invalid. |
401 | The client must authenticate itself to get the requested response. Note: This could also be due to your trial key has expired. |
404 | The server cannot find the requested resource. This can also mean that the endpoint is valid but the resource itself does not exist. |
429 | Too many requests were made in a short period of time, or you have exceeded your request-lot pool. |
500 | The server has encountered an error it does not know how to handle. |
503 | Service Unavailable. |