Skip to main content

Important!

Due to the pandemic, our offices are closed to the public. Please visit our Contact page for support options.

COVID-19 business relief is available. El alivio comercial de COVID-19 está disponible.

Home
  • Laws & rules
  • Careers
  • Contact
  • About
  • Log in

Search Google Appliance

  • Home
  • Open a business
    • Get started
    • Apply for a license
    • Plan for taxes
  • Manage a business
    • Run
    • Grow
    • Close
  • Taxes & rates
    • Sales & use tax rates
    • Tax incentives
    • Business & occupation tax
    • Retail sales tax
    • Use tax
    • Property tax
    • Other taxes
    • Income tax
  • File & pay taxes
    • Filing frequencies & due dates
    • File or amend my return
    • Report no business activity
    • Late filing
    • Reviews and appeals
    • Apply for a tax refund
  • Education
    • Industry guides
    • Events & workshops
    • Watch a video
    • Audits
  • Forms & publications
    • Forms by name
    • Forms by subject
    • Publications by name
    • Publications by subject
Home / Find taxes & rates / Retail sales tax / Destination Based Sales Tax and Streamlined Sales Tax / WA Sales Tax Rate Lookup URL Interface
Print

WA Sales Tax Rate Lookup URL Interface

The URL Interface provides a direct access to the Washington Department of Revenue’s address based rate lookup technology platform.  Using the URL interface we provide, you can access sales and use tax rate data using address or ZIP + 4 code information and tie the data into your shopping cart checkout process or accounting system in real time.  The following information is the technical specifications to access the URL interface. 

For technical questions or assistance with these interfaces, please contact our GIS team at dordli.s.gisteam@dor.wa.gov

1. The rate lookup URL is designed to return the current sales tax rates for an address. It is designed for use by XMLHttpRequest, Msxml2.XMLHTTP, libcurl, wget, HttpRequest, or similar HTTP protocol client.  Requests can be made for ether XML or plain text responses.

2. The URL is formated as follows.

http: or https: //<servername>/webapi/AddressRates.aspx?output=&addr=&city=&zip

Where
<servername> ==> Host name where the service is running
<format>     ==> Either "xml" or "text".
<addr>       ==> The street address
<city>       ==> The city name
<zip>        ==> The 5 or 9 digit ZIP code.

Examples: 
http://webgis.dor.wa.gov/webapi/AddressRates.aspx?output=xml&addr=6500 Linderson way&city=&zip=98501
http://webgis.dor.wa.gov/webapi/AddressRates.aspx?output=text&addr=6500 Linderson way&city=&zip=985011001
http://webgis.dor.wa.gov/webapi/AddressRates.aspx?output=xml&addr=6500 Linderson way&city=&zip=98501-1001

or

https://webgis.dor.wa.gov/webapi/AddressRates.aspx?output=xml&addr=6500 Linderson way&city=&zip=98501
https://webgis.dor.wa.gov/webapi/AddressRates.aspx?output=text&addr=6500 Linderson way&city=&zip=985011001 
https://webgis.dor.wa.gov/webapi/AddressRates.aspx?output=xml&addr=6500 Linderson way&city=&zip=98501-1001

3. HTTP Status Codes

The service will normally return a HTTP status code of 200 OK.  On internal error, it will return a 500 internal server error.

4. Result Codes

A result code will be returned for both XML and text response formats.  The codes are defined as:

0: The address was found.   
1: The address was not found, but the ZIP+4 was located.
2: The address was updated and found, the user should validate the address record
3: The address was updated and Zip+4 located, the user should validate the address record
4: The address was corrected and found, the user should validate the address record
5: Neither the address or ZIP+4 was found, but the 5-digit ZIP was located.
6: The address, ZIP+4, and ZIP could not be found.
7: Invalid Latitude/Longitude
9: Internal error

5. Plain Text Response Format

If the format requested is "text", a simple text string will be returned with the following format.

LocationCode=<location code>  Rate=<rate>  ResultCode=<result code>
 
Where   
<location code> ==> The four digit DOR location code.  
<rate>          ==> The total state and local tax rate.   
<result code>   ==> The result code described above.  

Example 
LocationCode=3406  Rate=0.084  ResultCode=0

6. XML Response Format

Example
<?xml version="1.0" encoding="UTF-8" ?>
 <response
      loccode="3406"
      localrate="0.019"
      rate="0.084"
      code="0"
 >
      <addressline
            houselow="0"
            househigh="0"
            evenodd="0"
            street=""
            state="WA"
            zip="98501"
            plus4="0000"
            period="Q22008"
            code="3406"
            rta="N"
            ptba="Thurston PTBA"
            cez=""
      />
      <rate
            name="TUMWATER"
            code="3406"
            staterate="0.065"
            localrate="0.019"
      />
  </response>
Tags
  response    ==> The response package.
  addressline ==> The standardized address and attributes located.
                  If "short cut evaluation" is enabled on the server,
                  the address attributes may be blank or zero. 
  rate        ==> The tax rate information.
  <response>  Attributes
  loccode     ==> The four digit DOR location code. 
  localrate   ==> The local tax rate. 
  rate        ==> The combined local and state tax rate. 
  code        ==> The result code as defined above. 
  debughint   ==> If the code is invalid argument, this attribute may
                  contain information about the cause of the problem (like invalid ZIP).
  <addressline>   Attributes
  houselow    ==> Standardized address low house number. 
  househigh   ==> Standardized address high house number. 
  evenodd     ==> 'O' or 'E'
  street      ==> Standardized address street. 
  state       ==> "WA"
  zip         ==> Standardized address ZIP.
  plus4       ==> Standardized address ZIP plus four. 
  period      ==> Tax period in Q[1-4]YYYY format. 
  code        ==> The four digit DOR location code. 
  rta         ==> 'Y' or 'N'
  ptba        ==> Public transportation benefit area name. 
  cez         ==> Community empowerment zone name.

<rate> Attributes
  name        ==> DOR location code name. 
  code        ==> The four digit DOR location code. 
  staterate   ==> The state portion of the sales tax rate. 
  localrate   ==> The local portion of the sales tax rate.

7.  C# Example Call

WebClient wc = new WebClient()

string urlPrefix = protocol +
    "://" + server + ":" +
    port.ToString() +
    "/AddressRates.aspx?format=xml";

string uri = urlPrefix +
    "&addr=" + 
    UrlEncode(street) + 
    "&city=" + 
    UrlEncode(city) +
    "&zip=" + 
    zip.ToString();

StreamReader reader = new StreamReader(wc.OpenRead(uri));
  string xml = reader.ReadToEnd();
  reader.Close();

 // Now parse the XML
  // ...
Laws & rules | Careers | Contact | About

Home

About

Careers

Contact

Help us improve!

Join our mailing lists

Laws & rules

News releases

Statistics & reports

 

Open a business

Get started

Apply for a license

Plan for taxes

Manage a business

Run

Grow

Close

 

Taxes & rates

Sales & use tax rates

Tax incentives

Business & occupation tax

Retail sales tax

Use tax

Property tax

Other taxes

Income tax

File & pay taxes

Filing frequencies & due dates

File or amend my return

Report no business activity

Late filing

Reviews and appeals

Apply for a tax refund

Education

Industry guides

Events and workshops

Watch a video

Audits

Forms & publications

Forms by name

Forms by subject

Publications by name

Publications by subject

  • Department of Revenue Facebook page
  • Department of Revenue Twitter feed
  • Department of Revenue LinkedIn page.
  • Department of Revenue YouTube channel

Español | Русский | 한글 | Tagalog | Tiéng Viét | 漢語

  Subscribe to receive notifications | Taxpayer Rights and Responsibilities 
Your Privacy | Accessibility | DOR Staff only | © 2017 WASHINGTON STATE DEPARTMENT OF REVENUE AND ITS LICENSORS. ALL RIGHTS RESERVED.
Access Washington