# Tax ID Validator API

> Tax ID Validator checks US tax identification numbers including SSNs, EINs, and ITINs for structural validity. It accepts formatted or unformatted strings and returns validation results, normalized formatting, masked numbers, and the last four digits.

**Endpoint:** `GET https://api.apiverve.com/v1/taxidvalidator`  
**Category:** Text Processing  
**Cost:** 10 credits per call  
**Canonical page:** https://apiverve.com/marketplace/taxidvalidator

## Overview

A tax ID validation API for US SSNs, EINs and ITINs, for checking numbers at signup, payroll and vendor onboarding. Tax ID Validator checks each number against the SSA and IRS numbering rules (SSN area, group and serial numbers, assigned EIN prefixes, ITIN middle-digit ranges) and returns formatted and masked versions, the digits alone and the last four digits, ready to store or display safely.

It catches typos and impossible numbers before they reach a payroll run, a 1099 filing or a KYC review, and the masked output lets support screens show a number without exposing it. It validates format only: it is not EIN or SSN verification against IRS or SSA records, so a well-formed number that was never issued still passes.

The Free plan returns the valid flag, normalized, digits-only, masked and last-four forms, and the EIN prefix or ITIN range check. Paid plans add the detected ID type, the SSN component checks, placeholder detection for filler like 123-45-6789, and a risk score with a low, medium or high band.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/taxidvalidator?taxid=123-45-6789&type=ein" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `taxid` | string | Yes | The US Tax ID to validate (SSN, EIN, or ITIN format) |
| `type` | string | No | Optional: skip auto-detection and validate as this type (ssn, ein or itin). Use it for unformatted EINs, which otherwise read as SSNs. One of: ssn, ein, itin |

## Response fields

- `valid` — boolean · Whether the Tax ID passed validation checks
- `taxid` — string · The formatted Tax ID with standard formatting applied
- `type` — string · Abbreviated Tax ID type: SSN, EIN, or ITIN · (premium)
- `type_full` — string · Full name of Tax ID type like Social Security Number · (premium)
- `format` — string · Expected format pattern for the Tax ID type · (premium)
- `normalized` — string · Tax ID normalized to standard format with hyphens
- `digits_only` — string · Tax ID with all non-numeric characters removed
- `masked` — string · Tax ID with sensitive digits masked for privacy protection
- `last4` — string · Last four digits of the Tax ID only
- `is_placeholder` — boolean · Whether the number is obvious filler (all-identical digits or a simple sequence like 123-45-6789) — true even when it structurally validates · (premium)
- `validation_details` — object
  - `validation_details.format_valid` — boolean · Whether the Tax ID matches the expected format · (premium)
  - `validation_details.area_number_valid` — boolean · Whether SSN area number is valid (first three digits) · (premium)
  - `validation_details.group_number_valid` — boolean · Whether SSN group number is valid (middle two digits) · (premium)
  - `validation_details.serial_number_valid` — boolean · Whether SSN serial number is valid (last four digits) · (premium)
- `risk_score` — number · Composite 0-100 risk score combining structural validity and placeholder detection (higher is riskier) · (premium)
- `risk_level` — string · Risk band derived from the score: low, medium or high · (premium)
- `error` — object · Error message if validation failed, otherwise null

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "valid": true,
    "taxid": "123-45-6789",
    "type": "SSN",
    "type_full": "Social Security Number",
    "format": "XXX-XX-XXXX",
    "normalized": "123-45-6789",
    "digits_only": "123456789",
    "masked": "***-**-6789",
    "last4": "6789",
    "is_placeholder": true,
    "validation_details": {
      "format_valid": true,
      "area_number_valid": true,
      "group_number_valid": true,
      "serial_number_valid": true
    },
    "risk_score": 35,
    "risk_level": "medium",
    "error": null
  }
}
```

## Use cases

- **Form Validation** — Validate Tax IDs in online forms and applications to ensure correct format before submission
- **Compliance** — Verify Tax ID format compliance for tax reporting, payroll processing, and financial services
- **Data Quality** — Validate Tax IDs in databases during data cleaning and migration to identify invalid entries
- **Identity Verification** — Check Tax ID format as part of identity verification processes while maintaining privacy with masking

## SDKs

- **npm** — `npm install @apiverve/taxidvalidator` (https://www.npmjs.com/package/@apiverve/taxidvalidator)
- **NuGet** — `dotnet add package APIVerve.API.TaxIDValidator` (https://www.nuget.org/packages/APIVerve.API.TaxIDValidator)
- **Source** — https://github.com/apiverve/taxidvalidator-api

## More

- Full reference: https://docs.apiverve.com/ref/taxidvalidator
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
