加拿大销售税QST计算器 API

API ID 14817

加拿大所有13个省和地区的GST/HST/PST/QST 从2013年以来的税率 反向(净从毛中计算)计算 发票行和哥斯达黎加IVA代码

API 文档

端点

请求
计算加拿大省的净金额上的GST HST PST QST(或哥斯达黎加IVA),带有日期费率和按组件细分
Endpoint ID: 38406
GET https://zylalabs.com/api/14817/canada+sales+tax+qst+calculator+api/38406/tax+from+a+net+amount
输入参数

从净金额中扣除税款 — 端点功能

对象 描述
code 可选 Costa Rica IVA code (GENERAL, R4, R2, R1, R0_5). Default GENERAL.
country 可选 CA = Canada GST/HST/PST/QST; CR = Costa Rica IVA. Default CA.
province 可选 Province/territory code (QC, ON, BC...) or English/French name. Required when country=CA.
amount 必需 Amount before tax. Number or string; French decimal comma and $ accepted.
date 可选 Transaction date YYYY-MM-DD (rate in force that day). Default: today (UTC).
tax 可选 Optional: return only this component (GST, HST, PST, QST, TPS, TVH, TVP, TVQ).

剩余免费测试请求:3 / 3。


输入参数

code
country
province
amount
date
tax
API 示例响应
JSON
{
    "country": "CA",
    "province": "QC",
    "province_name": "Quebec",
    "province_name_fr": "Québec",
    "date": "2026-11-10",
    "net": "100.00",
    "total_tax": "14.98",
    "gross": "114.98",
    "total_rate_pct": "14.975",
    "components": [
        {
            "tax": "GST",
            "name_fr": "TPS",
            "rate_pct": "5",
            "amount": "5.00",
            "effective_from": "2013-04-01",
            "effective_to": null,
            "source_url": "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses/charge-collect-which-rate/calculator.html",
            "source_urls": [
                "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses/charge-collect-which-rate/calculator.html"
            ]
        },
        {
            "tax": "QST",
            "name_fr": "TVQ",
            "rate_pct": "9.975",
            "amount": "9.98",
            "effective_from": "2013-04-01",
            "effective_to": null,
            "source_url": "https://www.revenuquebec.ca/fr/entreprises/taxes/tpstvh-et-tvq/perception-de-la-tps-et-de-la-tvq/calcul-des-taxes/",
            "source_urls": [
                "https://www.revenuquebec.ca/fr/entreprises/taxes/tpstvh-et-tvq/perception-de-la-tps-et-de-la-tvq/calcul-des-taxes/",
                "https://www.finances.gouv.qc.ca/documents/Communiques/en/COMEN_20110930-sheets.pdf"
            ]
        }
    ],
    "warnings": [],
    "table_version": "2026-11-02",
    "disclaimer": "Rate lookup and arithmetic only, not tax advice. You choose the province or IVA code; verify with the CRA, Revenu Québec, your province or Hacienda.",
    "docs": "https://steadyscrape.dev/tax-api"
}
从净金额中扣除税款 — 代码片段

curl --location --request GET 'https://zylalabs.com/api/14817/canada+sales+tax+qst+calculator+api/38406/tax+from+a+net+amount?country=CA&province=QC&amount=100.00' --header 'Authorization: Bearer YOUR_API_KEY' 


    
请求
发送一个包含省和金额的JSON请求体或最多100个发票行,以获取每行及总计的GST/HST/PST/QST(或哥斯达黎加IVA)
Endpoint ID: 38407
POST https://zylalabs.com/api/14817/canada+sales+tax+qst+calculator+api/38407/tax+from+a+net+amount+or+invoice+lines
输入参数

从净金额或发票行中征税 — 端点功能

对象 描述
请求体 必需 Json

剩余免费测试请求:3 / 3。


输入参数

API 示例响应
JSON
{
    "country": "CA",
    "province": "QC",
    "province_name": "Quebec",
    "province_name_fr": "Québec",
    "date": "2026-11-10",
    "net": "62.49",
    "total_tax": "9.37",
    "gross": "71.86",
    "total_rate_pct": "14.975",
    "components": [
        {
            "tax": "GST",
            "name_fr": "TPS",
            "rate_pct": "5",
            "amount": "3.13",
            "effective_from": "2013-04-01",
            "effective_to": null,
            "source_url": "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses/charge-collect-which-rate/calculator.html",
            "source_urls": [
                "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses/charge-collect-which-rate/calculator.html"
            ]
        },
        {
            "tax": "QST",
            "name_fr": "TVQ",
            "rate_pct": "9.975",
            "amount": "6.24",
            "effective_from": "2013-04-01",
            "effective_to": null,
            "source_url": "https://www.revenuquebec.ca/fr/entreprises/taxes/tpstvh-et-tvq/perception-de-la-tps-et-de-la-tvq/calcul-des-taxes/",
            "source_urls": [
                "https://www.revenuquebec.ca/fr/entreprises/taxes/tpstvh-et-tvq/perception-de-la-tps-et-de-la-tvq/calcul-des-taxes/",
                "https://www.finances.gouv.qc.ca/documents/Communiques/en/COMEN_20110930-sheets.pdf"
            ]
        }
    ],
    "warnings": [],
    "rounding": "per_line",
    "lines": [
        {
            "line": 1,
            "description": "Plan",
            "net": "49.99",
            "total_tax": "7.49",
            "gross": "57.48",
            "components": [
                {
                    "tax": "GST",
                    "amount": "2.50"
                },
                {
                    "tax": "QST",
                    "amount": "4.99"
                }
            ]
        },
        {
            "line": 2,
            "net": "12.50",
            "total_tax": "1.88",
            "gross": "14.38",
            "components": [
                {
                    "tax": "GST",
                    "amount": "0.63"
                },
                {
                    "tax": "QST",
                    "amount": "1.25"
                }
            ]
        }
    ],
    "table_version": "2026-11-02",
    "disclaimer": "Rate lookup and arithmetic only, not tax advice. You choose the province or IVA code; verify with the CRA, Revenu Québec, your province or Hacienda.",
    "docs": "https://steadyscrape.dev/tax-api"
}
从净金额或发票行中征税 — 代码片段

curl --location --request POST 'https://zylalabs.com/api/14817/canada+sales+tax+qst+calculator+api/38407/tax+from+a+net+amount+or+invoice+lines' --header 'Authorization: Bearer YOUR_API_KEY' 

--data-raw '{"province":"QC","lines":[{"amount":49.99,"description":"Plan"},{"amount":12.5}]}'

    
请求
反向计算:将包含税的总额拆分为净金额和加拿大省(或哥斯达黎加IVA)的GST/HST/PST/QST成分
Endpoint ID: 38408
GET https://zylalabs.com/api/14817/canada+sales+tax+qst+calculator+api/38408/net+and+tax+from+a+tax-included+total
输入参数

含税总额的净额和税额 — 端点功能

对象 描述
country 可选 CA = Canada GST/HST/PST/QST; CR = Costa Rica IVA. Default CA.
province 可选 Province/territory code (QC, ON, BC...) or English/French name. Required when country=CA.
gross 必需 Tax-included total. Number or string; French decimal comma and $ accepted.
date 可选 Transaction date YYYY-MM-DD (rate in force that day). Default: today (UTC).
tax 可选 Optional: return only this component (GST, HST, PST, QST, TPS, TVH, TVP, TVQ).
code 可选 Costa Rica IVA code (GENERAL, R4, R2, R1, R0_5). Default GENERAL.

剩余免费测试请求:3 / 3。


输入参数

country
province
gross
date
tax
code
API 示例响应
JSON
{
    "country": "CA",
    "province": "QC",
    "province_name": "Quebec",
    "province_name_fr": "Québec",
    "date": "2026-11-10",
    "net": "86.97",
    "total_tax": "13.03",
    "gross": "100.00",
    "total_rate_pct": "14.975",
    "rounding_difference": "0.00",
    "components": [
        {
            "tax": "GST",
            "name_fr": "TPS",
            "rate_pct": "5",
            "amount": "4.35",
            "effective_from": "2013-04-01",
            "effective_to": null,
            "source_url": "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses/charge-collect-which-rate/calculator.html",
            "source_urls": [
                "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses/charge-collect-which-rate/calculator.html"
            ]
        },
        {
            "tax": "QST",
            "name_fr": "TVQ",
            "rate_pct": "9.975",
            "amount": "8.68",
            "effective_from": "2013-04-01",
            "effective_to": null,
            "source_url": "https://www.revenuquebec.ca/fr/entreprises/taxes/tpstvh-et-tvq/perception-de-la-tps-et-de-la-tvq/calcul-des-taxes/",
            "source_urls": [
                "https://www.revenuquebec.ca/fr/entreprises/taxes/tpstvh-et-tvq/perception-de-la-tps-et-de-la-tvq/calcul-des-taxes/",
                "https://www.finances.gouv.qc.ca/documents/Communiques/en/COMEN_20110930-sheets.pdf"
            ]
        }
    ],
    "warnings": [],
    "table_version": "2026-11-02",
    "disclaimer": "Rate lookup and arithmetic only, not tax advice. You choose the province or IVA code; verify with the CRA, Revenu Québec, your province or Hacienda.",
    "docs": "https://steadyscrape.dev/tax-api"
}
含税总额的净额和税额 — 代码片段

curl --location --request GET 'https://zylalabs.com/api/14817/canada+sales+tax+qst+calculator+api/38408/net+and+tax+from+a+tax-included+total?country=CA&province=QC&gross=100.00' --header 'Authorization: Bearer YOUR_API_KEY' 


    
请求
发送包含税费总额(毛额)和省份的JSON主体以获取净额和GST/HST/PST/QST组件(或哥斯达黎加IVA)
Endpoint ID: 38409
POST https://zylalabs.com/api/14817/canada+sales+tax+qst+calculator+api/38409/net+and+tax+from+a+tax-included+total
输入参数

从含税总额中计算净额和税额 — 端点功能

对象 描述
请求体 必需 Json

剩余免费测试请求:3 / 3。


输入参数

API 示例响应
JSON
{
    "country": "CA",
    "province": "QC",
    "province_name": "Quebec",
    "province_name_fr": "Québec",
    "date": "2026-11-10",
    "net": "100.00",
    "total_tax": "14.98",
    "gross": "114.98",
    "total_rate_pct": "14.975",
    "rounding_difference": "0.00",
    "components": [
        {
            "tax": "GST",
            "name_fr": "TPS",
            "rate_pct": "5",
            "amount": "5.00",
            "effective_from": "2013-04-01",
            "effective_to": null,
            "source_url": "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses/charge-collect-which-rate/calculator.html",
            "source_urls": [
                "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses/charge-collect-which-rate/calculator.html"
            ]
        },
        {
            "tax": "QST",
            "name_fr": "TVQ",
            "rate_pct": "9.975",
            "amount": "9.98",
            "effective_from": "2013-04-01",
            "effective_to": null,
            "source_url": "https://www.revenuquebec.ca/fr/entreprises/taxes/tpstvh-et-tvq/perception-de-la-tps-et-de-la-tvq/calcul-des-taxes/",
            "source_urls": [
                "https://www.revenuquebec.ca/fr/entreprises/taxes/tpstvh-et-tvq/perception-de-la-tps-et-de-la-tvq/calcul-des-taxes/",
                "https://www.finances.gouv.qc.ca/documents/Communiques/en/COMEN_20110930-sheets.pdf"
            ]
        }
    ],
    "warnings": [],
    "table_version": "2026-11-02",
    "disclaimer": "Rate lookup and arithmetic only, not tax advice. You choose the province or IVA code; verify with the CRA, Revenu Québec, your province or Hacienda.",
    "docs": "https://steadyscrape.dev/tax-api"
}
从含税总额中计算净额和税额 — 代码片段

curl --location --request POST 'https://zylalabs.com/api/14817/canada+sales+tax+qst+calculator+api/38409/net+and+tax+from+a+tax-included+total' --header 'Authorization: Bearer YOUR_API_KEY' 

--data-raw '{"province":"QC","gross":114.98}'

    
请求
返回某一日期在加拿大省(或哥斯达黎加IVA税率)有效的GST/HST/PST/QST税率,附有官方来源
Endpoint ID: 38410
GET https://zylalabs.com/api/14817/canada+sales+tax+qst+calculator+api/38410/rates+in+force+on+a+date+with+sources
输入参数

根据日期生效的费率及来源 — 端点功能

对象 描述
country 可选 CA = Canada GST/HST/PST/QST; CR = Costa Rica IVA. Default CA.
province 可选 Province/territory code (QC, ON, BC...) or English/French name.
date 可选 Date YYYY-MM-DD for the rates in force. Default: today (UTC).
code 可选 Costa Rica IVA code (GENERAL, R4, R2, R1, R0_5). Used with country=CR.

剩余免费测试请求:3 / 3。


输入参数

country
province
date
code
API 示例响应
JSON
{
    "country": "CA",
    "province": "QC",
    "province_name": "Quebec",
    "province_name_fr": "Québec",
    "date": "2026-11-10",
    "total_rate_pct": "14.975",
    "components": [
        {
            "tax": "GST",
            "name_fr": "TPS",
            "rate_pct": "5",
            "effective_from": "2013-04-01",
            "effective_to": null,
            "source_url": "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses/charge-collect-which-rate/calculator.html",
            "source_urls": [
                "https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses/charge-collect-which-rate/calculator.html"
            ]
        },
        {
            "tax": "QST",
            "name_fr": "TVQ",
            "rate_pct": "9.975",
            "effective_from": "2013-04-01",
            "effective_to": null,
            "source_url": "https://www.revenuquebec.ca/fr/entreprises/taxes/tpstvh-et-tvq/perception-de-la-tps-et-de-la-tvq/calcul-des-taxes/",
            "source_urls": [
                "https://www.revenuquebec.ca/fr/entreprises/taxes/tpstvh-et-tvq/perception-de-la-tps-et-de-la-tvq/calcul-des-taxes/",
                "https://www.finances.gouv.qc.ca/documents/Communiques/en/COMEN_20110930-sheets.pdf"
            ]
        }
    ],
    "warnings": [],
    "table_version": "2026-11-02",
    "disclaimer": "Rate lookup and arithmetic only, not tax advice. You choose the province or IVA code; verify with the CRA, Revenu Québec, your province or Hacienda.",
    "docs": "https://steadyscrape.dev/tax-api"
}
根据日期生效的费率及来源 — 代码片段

curl --location --request GET 'https://zylalabs.com/api/14817/canada+sales+tax+qst+calculator+api/38410/rates+in+force+on+a+date+with+sources?country=CA&province=QC' --header 'Authorization: Bearer YOUR_API_KEY' 


    
请求
返回服务健康状态和当前使用的加拿大销售税率表版本
Endpoint ID: 38411
GET https://zylalabs.com/api/14817/canada+sales+tax+qst+calculator+api/38411/health+and+rate-table+version
输入参数

剩余免费测试请求:3 / 3。

此端点不需要任何输入参数。

API 示例响应
JSON
{
    "ok": true,
    "table_version": "2026-11-02",
    "disclaimer": "Rate lookup and arithmetic only, not tax advice. You choose the province or IVA code; verify with the CRA, Revenu Québec, your province or Hacienda.",
    "docs": "https://steadyscrape.dev/tax-api"
}
健康和费率表版本 — 代码片段

curl --location --request GET 'https://zylalabs.com/api/14817/canada+sales+tax+qst+calculator+api/38411/health+and+rate-table+version' --header 'Authorization: Bearer YOUR_API_KEY' 


    

API 访问密钥和身份验证

注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 加拿大销售税QST计算器 API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。

标头
标头 描述
授权 必需 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。

无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。

起价
$10,000/年


  • 自定义数量
  • 自定义速率限制
  • 专业客户支持
  • 实时 API 监控

概览

自2013年以来所有13个加拿大省和地区的GST/HST/PST/QST税率,反向(净从毛收入计算)计算,发票行,以及哥斯达黎加的IVA代码

加拿大销售税QST计算器 API FAQs

每个端点返回详细的税收计算,包括净额、总税额、毛额和GST/HST/PST/QST或哥斯达黎加IVA的税务组成细分数据。数据包括省级特定税率和生效日期

关键字段包括“国家”“省”“净额”“总税”“毛额”“总税率百分比”和“组成部分”,详细列出了各个税种、税率和金额。每个组件还包括生效日期和来源网址

参数包括省份(或IVA代码)和净金额或总金额。对于发票行,用户可以以JSON格式提交最多100行。每个端点都需要特定的参数以返回准确的税务计算

响应数据采用JSON格式结构,其中包含一个主要对象,包含总体税收信息,以及一个详细说明每种税类型的“组件”数组。这种组织结构便于解析和理解税收细目

数据来自加拿大官方政府网站,确保准确性和可靠性。每个税收组件都包含一个“source_url”,链接到相关官方文件以供验证

典型的用例包括计算发票的销售税、确定企业的税务责任以及验证税率以确保合规。用户还可以利用API进行基于生效日期的历史税率分析

用户可以通过提取“total_tax”用于财务报告,使用“components”进行详细的税务分解,并参考“source_urls”进行合规检查来利用返回的数据。这种结构化数据有助于准确的税务计算

数据准确性通过定期根据官方政府来源更新税率来维护。该API提供每个税率的生效日期,允许用户验证特定交易的税率适用性

一般常见问题

Zyla API Hub 就像一个大型 API 商店,您可以在一个地方找到数千个 API。我们还为所有 API 提供专门支持和实时监控。注册后,您可以选择要使用的 API。请记住,每个 API 都需要自己的订阅。但如果您订阅多个 API,您将为所有这些 API 使用相同的密钥,使事情变得更简单。
价格以 USD(美元)、EUR(欧元)、CAD(加元)、AUD(澳元)和 GBP(英镑)列出。我们接受所有主要的借记卡和信用卡。我们的支付系统使用最新的安全技术,由 Stripe 提供支持,Stripe 是世界上最可靠的支付公司之一。如果您在使用卡片付款时遇到任何问题,请通过 [email protected]

此外,如果您已经以这些货币中的任何一种(USD、EUR、CAD、AUD、GBP)拥有有效订阅,该货币将保留用于后续订阅。只要您没有任何有效订阅,您可以随时更改货币。
定价页面上显示的本地货币基于您 IP 地址的国家/地区,仅供参考。实际价格以 USD(美元)为单位。当您付款时,即使您在我们的网站上看到以本地货币显示的等值金额,您的卡片对账单上也会以美元显示费用。这意味着您不能直接使用本地货币付款。
有时,银行可能会因其欺诈保护设置而拒绝收费。我们建议您首先联系您的银行,检查他们是否阻止了我们的收费。此外,您可以访问账单门户并更改关联的卡片以进行付款。如果这些方法不起作用并且您需要进一步帮助,请通过 [email protected]
价格由月度或年度订阅决定,具体取决于所选计划。
API 调用根据成功请求从您的计划中扣除。每个计划都包含您每月可以进行的特定数量的调用。只有成功的调用(由状态 200 响应指示)才会计入您的总数。这确保失败或不完整的请求不会影响您的月度配额。
Zyla API Hub 采用月度订阅系统。您的计费周期将从您购买付费计划的那一天开始,并在下个月的同一日期续订。因此,如果您想避免未来的费用,请提前取消订阅。
要升级您当前的订阅计划,只需转到 API 的定价页面并选择您要升级到的计划。升级将立即生效,让您立即享受新计划的功能。请注意,您之前计划中的任何剩余调用都不会转移到新计划,因此在升级时请注意这一点。您将被收取新计划的全部金额。
要检查您本月剩余多少 API 调用,请参考响应标头中的 "X-Zyla-API-Calls-Monthly-Remaining" 字段。例如,如果您的计划允许每月 1,000 个请求,而您已使用 100 个,则响应标头中的此字段将显示 900 个剩余调用。
要查看您的计划允许的最大 API 请求数,请检查 "X-Zyla-RateLimit-Limit" 响应标头。例如,如果您的计划包括每月 1,000 个请求,此标头将显示 1,000。
"X-Zyla-RateLimit-Reset" 标头显示您的速率限制重置之前的秒数。这告诉您何时您的请求计数将重新开始。例如,如果它显示 3,600,则意味着还有 3,600 秒直到限制重置。
是的,您可以随时通过访问您的账户并在账单页面上选择取消选项来取消您的计划。请注意,升级、降级和取消会立即生效。此外,取消后,您将不再有权访问该服务,即使您的配额中还有剩余调用。
为了让您有机会在没有任何承诺的情况下体验我们的 API,我们提供 7 天免费试用,允许您免费进行最多 50 次 API 调用。此试用只能使用一次,因此我们建议将其应用于您最感兴趣的 API。虽然我们的大多数 API 都提供免费试用,但有些可能不提供。试用在 7 天后或您进行了 50 次请求后结束,以先发生者为准。如果您在试用期间达到 50 次请求限制,您需要"开始您的付费计划"以继续发出请求。您可以在个人资料中的订阅 -> 选择您订阅的 API -> 定价标签下找到"开始您的付费计划"按钮。或者,如果您在第 7 天之前不取消订阅,您的免费试用将结束,您的计划将自动计费,授予您访问计划中指定的所有 API 调用的权限。请记住这一点以避免不必要的费用。
7 天后,您将被收取试用期间订阅的计划的全额费用。因此,在试用期结束前取消很重要。因忘记及时取消而提出的退款请求不被接受。
当您订阅 API 免费试用时,您可以进行最多 50 次 API 调用。如果您希望超出此限制进行额外的 API 调用,API 将提示您执行"开始您的付费计划"。您可以在个人资料中的订阅 -> 选择您订阅的 API -> 定价标签下找到"开始您的付费计划"按钮。
付款订单在每月 20 日至 30 日之间处理。如果您在 20 日之前提交请求,您的付款将在此时间范围内处理。
您可以通过我们的聊天渠道联系我们以获得即时帮助。我们始终在线,时间为上午 8 点至下午 5 点(EST)。如果您在该时间之后联系我们,我们将尽快回复您。此外,您可以通过 [email protected]

相关 API