Base 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 |
{
|
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 |
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:
|
Download NuGet package Sources at GitHub
Install directly in Visual Studio:
PM> Install-Package YAddressWebApiClient
YAddress.Client client = new YAddress.Client();
YAddress.Client.Address adr =
client.ProcessAddress("506 Fourth Avenue Unit 1", "Asbury Prk, NJ", null);
A User Defined Function (UDF) for SQL Server.
SELECT * FROM ProcessAddress('506 Fourth Avenue Unit 1', 'Asbury Prk, NJ')