api-ninjas-com Sales Tax Calculator by API Ninjas API

The Sales Tax Calculator API provides accurate and detailed sales tax calculations for any purchase amount in the United States, including tax breakdowns and total amounts.

Operations 1

GET /v1/salestaxcalculator Calculates sales tax for a given amount and location #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/api-ninjas-com:api-ninjas-com-sales-tax-calculator-by-api-ninjas-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

api-ninjas-com-sales-tax-calculator-by-api-ninjas-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sales Tax Calculator by API Ninjas API
  description: 'Combined OpenAPI specification for every API Ninjas endpoint. Requests go to https://api.api-ninjas.com with an `X-Api-Key` header; get a free key at https://api-ninjas.com/register. Human-readable docs: https://api-ninjas.com/api. Index for LLMs: https://api-ninjas.com/llms.txt.'
  version: 1.0.0
  contact:
    name: API Ninjas
    url: https://api-ninjas.com
  license:
    name: Proprietary
servers:
- url: https://api.api-ninjas.com
  description: API Ninjas Production
security:
- ApiKeyAuth: []
tags:
- name: Sales Tax Calculator by API Ninjas
  description: The Sales Tax Calculator API provides accurate and detailed sales tax calculations for any purchase amount in the United States, including tax breakdowns and total amounts.
paths:
  /v1/salestaxcalculator:
    get:
      summary: Calculates sales tax for a given amount and location
      description: Calculates US sales tax on a purchase amount for a location given by ZIP code or by city and state, returning the tax breakdown and total. Requires `amount`.
      operationId: calculateSalesTax
      security:
      - ApiKeyAuth: []
      parameters:
      - name: amount
        in: query
        required: true
        schema:
          type: number
          format: float
        description: Purchase amount to calculate tax on.
      - name: zip_code
        in: query
        required: false
        schema:
          type: string
        description: Valid US ZIP code.
      - name: street_address
        in: query
        required: false
        schema:
          type: string
        description: Street address (e.g. 9641 Sunset Blvd). Used together with city and state for the most accurate lookup.
      - name: city
        in: query
        required: false
        schema:
          type: string
        description: City name.
      - name: state
        in: query
        required: false
        schema:
          type: string
        description: State name.
      responses:
        '200':
          description: Successful response with sales tax details.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SalesTaxCalculatorResponse'
        '400':
          description: Bad Request - Invalid request format or parameters.
        '401':
          description: Unauthorized - API key missing or invalid.
        '500':
          description: Internal Server Error - An error occurred on the server.
      tags:
      - Sales Tax Calculator by API Ninjas
components:
  schemas:
    SalesTaxCalculatorResponse:
      type: object
      properties:
        street_address:
          type: string
          description: The street address from the request. Only returned when the street_address parameter is provided.
        zip_code:
          type: string
          description: The ZIP code for which tax information is returned.
        pre_tax_amount:
          type: string
          description: The purchase amount the tax was calculated on.
        state_rate:
          type: number
          description: State sales tax rate as a decimal.
        city_rate:
          type:
          - number
          - 'null'
          description: City sales tax rate as a decimal.
        county_rate:
          type:
          - number
          - 'null'
          description: County sales tax rate as a decimal.
        additional_rate:
          type:
          - number
          - 'null'
          description: Additional special district sales tax rate as a decimal.
        total_rate:
          type:
          - number
          - 'null'
          description: Total combined sales tax rate of state, county, city, and additional rates as a decimal.
        state_tax:
          type: number
          description: The calculated state sales tax amount.
        city_tax:
          type:
          - number
          - 'null'
          description: The calculated city sales tax amount.
        county_tax:
          type:
          - number
          - 'null'
          description: The calculated county sales tax amount.
        additional_tax:
          type:
          - number
          - 'null'
          description: The calculated additional special district sales tax amount.
        total_tax:
          type:
          - number
          - 'null'
          description: The total calculated sales tax amount.
        total_price:
          type:
          - number
          - 'null'
          description: The total amount including tax.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
externalDocs:
  description: API Ninjas documentation
  url: https://api-ninjas.com/api