Canada’s sale taxes API

Here’s an API to get canadian sales tax informations. Simple as that.

If you see any discrepancies in actual data, missing future rates or want to contribute historical rates, please open an issue on the Github repository with the data and we’ll include it in the API.

Documentation

Rate limit

API usage is curently rate limited at 60 tries per minutes. The rate limit is subject to change upon API popularity.

Contributing

You know the drill: report bugs in issue, suggest features in issue and if you can, submit pull requests!

Meaning of accronyms

Usage

Prior version of the API

Parameters

Where it is needed, the only parameter this API uses is :province and the API expects a two letter canadian province postal abbreviation

Possible attributes returned

The attributes returned by the API are pretty standards all over. While some endpoints will have more or less attributes than another endpoint, it will always be one of the following:

URL to poll

URL to poll the API is http://api.salestaxapi.ca.

For example, sending a GET request to http://api.salestaxapi.ca/v2/federal/gst will retreive the currently applicable GST rate.

About historical rates

Any endpoint returning the history of a rate returns the values of rates that the API has ever been aware of.

This means that that this API does not strive to know every past rates, but will return any past values that has been seen since it’s inception. Any more is just bonus!

GST (Federal tax)

Get current GST

/v2/federal/gst

Example of successfull response
{
	"start": "2008-01-01 00:00:00",
	"type": "gst",
	"gst": 0.05,
	"applicable": 0.05,
	"source": "Wikipedia (https:\\/\\/en.wikipedia.org\\/wiki\\/Sales_taxes_in_Canada) , accessed May 28 2017",
	"updated_at": "2017-05-28 19:03:28",
	"incoming_changes": false,
}
Get the future GST rate

/v2/federal/gst/future

This endpoint will return a 404: There is no known future rate for GST. if there is no known future value for the GST.

Example of successfull response
{
	"start": "2100-01-01 00:00:00",
	"type": "gst",
	"gst": 0.20,
	"applicable": 0.25,
	"source": "We asked the question to a weird looking 8ball.",
	"updated_at": "2017-05-28 19:03:28"
}
Get the history of known GST rate

/v2/federal/gst/historical

Example of successfull response
[
	{
		"start": "2008-01-01 00:00:00",
		"type": "gst",
		"gst": 0.05,
		"applicable": 0.05,
		"source": "Wikipedia (https:\\/\\/en.wikipedia.org\\/wiki\\/Sales_taxes_in_Canada) , accessed May 28 2017",
		"updated_at": "2017-05-28 19:03:28"
	},
	{
		"start": "1990-01-01 00:00:00",
		"type": "gst",
		"gst": 0.01,
		"applicable": 0.01,
		"source": "A dusty old book.",
		"updated_at": "2017-05-28 19:03:28"
	}
]

PST (Provincial tax)

Get current PST for a province

/v2/province/:province

Example of successfull response
{
	"start": "2013-01-01 00:00:00",
	"type": "gst,pst",
	"pst": 0.09975,
	"hst": 0,
	"gst": 0.05,
	"applicable": 0.14975,
	"source": "Wikipedia (https:\\/\\/en.wikipedia.org\\/wiki\\/Sales_taxes_in_Canada) , accessed May 28 2017",
	"updated_at": "2017-05-28 15:30:37",
	"incoming_changes": "2019-07-01 00:00:00",
}
Get the future PST rate of a province

/v2/province/:province/future

This endpoint will return a 404: There is no known future rate for :province. if there is no known future value for the GST.

Example of successfull response
{
	"start": "1995-11-01 00:00:00",
	"type": "pst",
	"pst": 0.10,
	"hst": 0,
	"gst": 0.00,
	"applicable": 0.12,
	"source": "From a secret sovereignist thinktank document.",
	"updated_at": "2017-05-28 15:30:37"
}
Get the history of known GST rate for a province

/v2/province/:province/historical

Example of successfull response
[
	{
		"start": "2020-11-01 00:00:00",
		"type": "hst",
		"pst": 0.10,
		"hst": 0.13,
		"gst": 0.03,
		"applicable": 0.13,
		"source": "One of the government's website.",
		"updated_at": "2017-05-28 15:30:37"
	},
	{
		"start": "1995-11-01 00:00:00",
		"type": "pst",
		"pst": 0.10,
		"hst": 0,
		"gst": 0.00,
		"applicable": 0.12,
		"source": "From a secret sovereignist thinktank document.",
		"updated_at": "2017-05-28 15:30:37"
	}
]
Get current PST for all provinces

/v2/province/:province/all

Example of successfull response
{
	"ab": {
		"start": "2008-01-01 00:00:00",
		"type": "gst",
		"pst": 0,
		"hst": 0,
		"gst": 0.05,
		"applicable": 0.05,
		"source": "Wikipedia (https:\\/\\/en.wikipedia.org\\/wiki\\/Sales_taxes_in_Canada) , accessed May 28 2017",
		"updated_at": "2017-05-28 18:46:55"
	},
	"bc": {
		"start": "2013-04-01 00:00:00",
		"type": "gst,pst",
		"pst": 0.07,
		"hst": 0,
		"gst": 0.05,
		"applicable": 0.12,
		"source": "Wikipedia (https:\\/\\/en.wikipedia.org\\/wiki\\/Sales_taxes_in_Canada) , accessed May 28 2017",
		"updated_at": "2017-05-28 18:49:00"
	},
	"etc": {"and so on..."}
}

License

The Laravel framework is open-sourced software licensed under the MIT license.