# Japan Invoice Registration (T-number) Checker (`ritomath/japan-invoice-registration-checker`) Actor

Check whether Japanese qualified invoice issuer registration numbers (T + 13 digits) are currently valid, cancelled or expired, using the National Tax Agency's official bulk data. No scraping, no API key.

- **URL**: https://apify.com/ritomath/japan-invoice-registration-checker.md
- **Developed by:** [タブラ ラサ](https://apify.com/ritomath) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Japan Invoice Registration (T-number) Checker

Check whether Japanese **qualified invoice issuer registration numbers** (適格請求書発行事業者登録番号, "T" + 13 digits) are currently valid, cancelled, expired or unknown. Results come from the **official bulk data files published by the National Tax Agency (NTA)**, applied up to the latest working day. No API key, no scraping of the NTA search screen.

Use it to validate supplier master data before paying invoices, to audit a vendor list once a month, or to confirm a counterparty's T-number and registered name and address in an automated workflow.

### Why this Actor

- **Official source, current data.** Every run loads the NTA month-end full data and applies the daily diff files published after it, so cancellations and new registrations from the last working day are reflected. Each result carries `dataAsOf`.
- **Bulk friendly.** Check one number or fifty thousand in a single run. Input is a plain list, output is a clean table with English field names, exportable as JSON, CSV or Excel.
- **No silent gaps.** If any source file cannot be downloaded or parsed, the run fails instead of reporting numbers as "not found". A number is only reported as `not_found` after the complete register has been scanned.
- **Sole proprietors included.** Registration status and dates are returned for sole proprietors too. Their names are withheld by the NTA in bulk data (flagged as `nameWithheld`).
- **Nothing to sign up for.** The NTA Web-API requires an application ID, a signed application form and audit obligations. This Actor uses the public download files instead, which are published under the Japanese Public Data License 1.0 (compatible with CC BY 4.0).

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `registrationNumbers` | string\[] | required | T-numbers to check. `T` prefix, spaces, hyphens and full-width digits are accepted. Up to 50,000 per run. |
| `includeIndividuals` | boolean | `true` | Also load the sole-proprietor files (about 30 MB extra download). |
| `includeHistory` | boolean | `false` | Attach all historical rows (registration, changes, cancellation) to each result. |
| `includeDiffFiles` | boolean | `true` | Apply the daily diff files published after the month-end full data. Disable for a reproducible month-end snapshot. |

Example:

```json
{
  "registrationNumbers": ["T1180301018771", "1011101040916", "T1234567890123"]
}
```

### Output

One dataset item per input number, in input order.

| Field | Meaning |
|---|---|
| `input` | The value you supplied |
| `registrationNumber` | Normalised `T` + 13 digits (`null` if the input was malformed) |
| `status` | `registered`, `cancelled`, `expired`, `removed`, `not_found`, `registered_from_future_date`, `invalid_input` |
| `isRegisteredNow` | `true` only when `status` is `registered` |
| `entityType` | `corporation`, `unincorporated_association`, `individual` |
| `country` | `domestic`, `specified_foreign`, `other_foreign` |
| `name`, `nameKana` | Registered name (kana only for foreign businesses) |
| `nameWithheld` | `true` for sole proprietors, whose names the NTA removes from bulk data |
| `address`, `prefectureCode`, `cityCode` | Head office address and JIS codes when published |
| `tradeName`, `popularOrPreviousName` | Optional items a sole proprietor asked to publish |
| `registrationDate`, `updateDate`, `cancellationDate`, `expiryDate` | ISO dates |
| `corporateCheckDigitValid` | Whether the 13 digits satisfy the corporate-number check digit (informational; not applicable to sole proprietors) |
| `dataAsOf`, `fullDataDate`, `diffFilesApplied` | Which snapshot and how many daily diffs were applied |
| `history` | Only when `includeHistory` is true |
| `source` | Attribution required by the NTA license |

A run summary (counts by status, rows scanned, bytes downloaded) is stored in the key-value store under `SUMMARY`.

Example record:

```json
{
  "input": "T1180301018771",
  "registrationNumber": "T1180301018771",
  "found": true,
  "status": "registered",
  "isRegisteredNow": true,
  "entityType": "corporation",
  "country": "domestic",
  "name": "トヨタ自動車株式会社",
  "address": "愛知県豊田市トヨタ町１番地",
  "prefectureCode": "23",
  "cityCode": "211",
  "registrationDate": "2023-10-01",
  "cancellationDate": null,
  "expiryDate": null,
  "corporateCheckDigitValid": true,
  "dataAsOf": "2026-09-11",
  "fullDataDate": "2026-08-31",
  "diffFilesApplied": 10
}
```

### How it works and what it costs

Each run downloads the NTA month-end full data (about 95 MB for corporations and associations, plus about 32 MB for sole proprietors) and the daily diff files newer than that snapshot, streams them, and keeps only the rows for the numbers you asked about. A typical run finishes in about one to three minutes regardless of how many numbers you check, so batching numbers into one run is the cheapest way to use it.

Pricing is per lookup (unique number checked) plus a small per-run start fee. Malformed inputs and duplicates are not charged.

### Limitations

- The NTA publishes bulk data once per working day (before 6:00 JST for the previous working day). Registrations made today are not visible until the next file.
- Sole-proprietor names, kana and optional addresses are withheld by the NTA in bulk data since September 2022. Only registration status and dates are available for them.
- Name search is not offered. Look-ups are by registration number only, which is also what the NTA site is designed for.
- This Actor reads download files only. It never queries the NTA search screen, whose terms prohibit programmatic access.

### 日本語

適格請求書発行事業者の登録番号（T＋13桁）が現在有効か、取消・失効済みかを、国税庁公表サイトの**全件データと日次差分データ**で確認します。1回の実行で最大5万件を照合でき、取引先マスタの一括チェックや月次監査に使えます。Web-APIのアプリケーションID申請は不要です。ソースファイルが1つでも取得できない場合は「該当なし」を返さず実行を失敗させます。

### Attribution

このサービスは国税庁適格請求書発行事業者公表サイト（国税庁）（https://www.invoice-kohyo.nta.go.jp/）のダウンロードデータを加工して作成しています。サービスの内容は国税庁によって保証されたものではありません。

This service is derived from the download data of the NTA Qualified Invoice Issuer Publication Site (National Tax Agency of Japan), used under the Public Data License 1.0. It is not endorsed by or affiliated with the National Tax Agency.

# Actor input Schema

## `registrationNumbers` (type: `array`):

T-numbers to check, one per item. 'T' prefix, spaces, hyphens and full-width digits are accepted (e.g. T1234567890123, 1234567890123). Up to 50,000 per run.

## `includeIndividuals` (type: `boolean`):

Also load the sole-proprietor (個人) files. Adds roughly 30 MB of download per run. Names of sole proprietors are withheld by the NTA in bulk data; only registration status and dates are available.

## `includeHistory` (type: `boolean`):

Attach every historical row (registration, changes, cancellation) for each number instead of only the latest state.

## `includeDiffFiles` (type: `boolean`):

Apply the NTA daily diff files published after the monthly full data so results reflect the latest working day. Disable only for reproducible month-end snapshots.

## Actor input object example

```json
{
  "registrationNumbers": [
    "T1180301018771",
    "T1011101040916"
  ],
  "includeIndividuals": true,
  "includeHistory": false,
  "includeDiffFiles": true
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset with one item per input number: status (registered, cancelled, expired, removed, not\_found, invalid\_input), name, address, dates and data snapshot info.

## `summary` (type: `string`):

Counts by status, rows scanned, bytes downloaded, full-data date and data-as-of date.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "registrationNumbers": [
        "T1180301018771",
        "T1011101040916"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ritomath/japan-invoice-registration-checker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "registrationNumbers": [
        "T1180301018771",
        "T1011101040916",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ritomath/japan-invoice-registration-checker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "registrationNumbers": [
    "T1180301018771",
    "T1011101040916"
  ]
}' |
apify call ritomath/japan-invoice-registration-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ritomath/japan-invoice-registration-checker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/I06qsuXHj7jIvR5f0/builds/oOI7ZeEfKDhJfoYkT/openapi.json
