Getting Started with the Tax ID Validation API

The Tax ID Pro API makes it easy to validate over 200 different tax ID formats for over 100 countries. The API returns JSON-encoded responses, and uses standard HTTP response codes.


Step 1: Create an Account

Sign up for a trial account. No credit card is required, and you'll get 50 free tax ID validations to test your implementation. If you need more for testing, just contact us! Once you've created an account, navigate to your settings page and generate an API key. API keys are randomly generated. Treat your API key like a password and keep it secure.


Step 2: Validate a Tax ID Number
Using the testing tool of your choice (you may be interested in using Postman or VS Code REST Client for experimentation) set up your first request. Note that we are authorizing this request by including the API key in the Authorization header. There are a variety of ways to authorize your request, but setting the Authorization header is the recommended approach.

GET https://v3.api.taxid.pro/validate
Authorization: Bearer YOUR_API_KEY

Validation requests include the country, type (optional), and tin as query parameters. Let's validate a Canadian individual tax ID number (Social Insurance Number or SIN).

GET https://v3.api.taxid.pro/validate
?country=ca
&tin=36574261
&type=individual

Invalid Response

If you used the above request, you should get a response stating that it is not a valid Social Insurance Number because it was too short. Invalid responses will include a message highlighting the specific issues with the input. You may want to pass this message along to your users as a hint to correct their input.

{
  "is_valid": false,
  "message": "Input is too short.",
  "tin_compact": null,
  "tin_standard": null,
  "country_name": "Canada",
  "format_name": null
}

Corrected Input

Now the tax ID number has the correct number of digits, and it will also pass the checksum test.

GET https://v3.api.taxid.pro/validate
?country=ca
&tin=365742618
&type=individual

Valid Response

Whenever the tax ID number is valid, the message property will be null. The message property is only used to highlight problems with invalid tax ID numbers. Valid tax ID numbers also get a compact and standard string in the response. These can be helpful if you prefer to store just the significant characters (compact) or the number as it is customarily written on forms (standard). The format name is also provided.

{
  "is_valid": true,
  "message": null,
  "tin_compact": "365742618",
  "tin_standard": "365-742-618",
  "country_name": "Canada",
  "format_name": "Social Insurance Number"
}

Step 3: Build Your Implementation

Depending on your implementation, parts of your request may need to be static or dynamic. Building your implementation is just a matter of assembling the query string and making a request to the Tax ID Pro API. To learn about all of the available path components and optional query parameters, visit the Tax ID Validation page.

To protect your API key, you must proxy your requests through a private server. Embedding your API key in client-side JavaScript will expose it to the general public where it may be stolen and abused.

Check Tax IDs for Over 100 Countries

See all supported countries or search for a country here: