YAddress API
for Address Validation and Geocoding
URL |
http://www.yaddress.net/api/address orhttps://www.yaddress.net/api/address
|
---|---|
HTTP Method | GET |
HTTP Headers |
Accept: application/json for JSON formatted response (default)Accept: application/xml for XML formatted response
|
Query String Fields |
|
Sample Request |
http://www.yaddress.net/api/address?
|
Sample Response |
{
|
Input Parameters
AddressLine1 |
First address line Contains street address ("123 Main St") and possible secondary designators ("Apt 5"). Can be omitted. |
---|---|
AddressLine2 |
Second address line Contains city, state and ZIP parts. These components are optional, but at least one of them must be specified. Cannot be blank. |
UserKey |
API user key |
Output Fields
ErrorCode |
Error code:
|
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ErrorMessage | Textual description of the error. Blank if no error occurred. | ||||||||||||||||||
AddressLine1 | First line of the parsed address. Includes secondary address designator if supplied in the original address. If the address failed to validate, this line is a copy of the input line. | ||||||||||||||||||
AddressLine2 | City-state-ZIP line of the parsed address. If the address failed to validate, this line is a copy of the input line. | ||||||||||||||||||
Number | House number of the parsed address. Blank if street address was not validated. | ||||||||||||||||||
PreDir | Street pre-direction of the parsed address. Blank if street address was not validated. | ||||||||||||||||||
Street | Street name of the parsed address, not including pre-direction, post-direction, and suffix. Blank if street address was not validated. | ||||||||||||||||||
Suffix | Street suffix of the parsed address. Blank if street address was not validated. | ||||||||||||||||||
PostDir | Street post-direction of the parsed address. Blank if street address was not validated. | ||||||||||||||||||
Sec | Secondary designator of the parsed address, such as apartment, suite, unit, etc. Blank if secondary designator was not validated. | ||||||||||||||||||
SecNumber | Secondary number of the parsed address, such as apartment, suite, unit, etc. Blank if secondary number was not validated. | ||||||||||||||||||
City | City of the parsed address. Blank if city was not validated. | ||||||||||||||||||
State | State of the parsed address. Blank if address was not validated. | ||||||||||||||||||
Zip | ZIP code of the parsed address. Blank if address was not validated. | ||||||||||||||||||
Zip4 | ZIP+4 code of the parsed address. Blank if address was not validated. | ||||||||||||||||||
County | County of the parsed address. Blank if county was not validated. | ||||||||||||||||||
StateFP | State FP number in two digits. Blank if state was not validated. | ||||||||||||||||||
CountyFP | County FP number in three digits. Blank if county was not validated. County FP’s are unique within a state. | ||||||||||||||||||
CensusTract | Census tract number in the format XXXX.XX. Blank if not determined. Census tract numbers are unique within a county. | ||||||||||||||||||
CensusBlock | Census block number in four digits. Blank if not determined. Census block numbers are unique within a census tract. | ||||||||||||||||||
Latitude | Latitude of the address location. 0 if address cannot be geocoded. | ||||||||||||||||||
Longitude | Longitude of the address location. 0 if address cannot be geocoded. | ||||||||||||||||||
GeoPrecision |
Precision with which coordinates of the location were determined. Possible values are:
|
||||||||||||||||||
TimeZoneOffset |
Time zone offset, i.e. the number of hours the time zone is ahead of or behind GMT.
Common US time zone offsets are:
|
||||||||||||||||||
DstObserved | Whether or not the Daylight Savings Time (DST) is observed at this location, i.e., clocks switch between standard time in winter and daylight savings time in summer. Boolean, true or false. | ||||||||||||||||||
PlaceFP | FIPS code of the Census Designated Place (CDP). | ||||||||||||||||||
CityMunicipality | Name of the city-level municipality the address is located within. | ||||||||||||||||||
SalesTaxRate | Local sales tax rate, percent. | ||||||||||||||||||
SalesTaxJurisdiction |
Jurisdiction imposing sales tax:
|
.NET Client
Download NuGet package Sources at GitHub
Install directly in Visual Studio:
PM> Install-Package YAddressWebApiClient
How to Use
YAddress.Client client = new YAddress.Client();
YAddress.Client.Address adr =
client.ProcessAddress("506 Fourth Avenue Unit 1", "Asbury Prk, NJ", null);