# Japan Corporate Number (法人番号) Lookup (`wesales_jp/japan-corporate-number-lookup`) Actor

Verify Japanese 13-digit corporate numbers / invoice registration numbers (T+13) and get the official company name, kana, address, English name and change history from the National Tax Agency. Open government data.

- **URL**: https://apify.com/wesales_jp/japan-corporate-number-lookup.md
- **Developed by:** [WeSales](https://apify.com/wesales_jp) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 corporate records

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Japan Corporate Number (法人番号) Lookup

Verify Japanese companies by their **13-digit corporate number** (法人番号, also used in invoice registration numbers `T` + 13 digits) and get the official data published by Japan's **National Tax Agency (NTA)**: registered name, kana reading, head-office address, English name and address (when registered), entity type, last update date and the full change history (name changes, relocations, mergers, closure).

This is open government data published under the Public Data License (公共データ利用規約 第1.0版).

### What can you use it for?

- **KYB / vendor onboarding**: confirm that a Japanese supplier or customer exists, is still active, and that the name and address match.
- **Invoice (インボイス) checks**: strip the `T` from a qualified invoice number and validate the company behind it.
- **CRM cleanup**: normalise Japanese company names and addresses, add kana and English names.
- **M\&A / due diligence**: see mergers, renames and relocations in the change history.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `corporateNumbers` | string\[] | | 13-digit numbers. `T7000012050002`, hyphens and full-width digits are accepted. |
| `includeHistory` | boolean | `true` | Return the change history. |
| `names` | string\[] | `[]` | Optional company-name search (needs `applicationId`). |
| `applicationId` | string (secret) | | Free NTA Web-API application ID, only for name search. Apply at https://www.houjin-bangou.nta.go.jp/webapi/ |
| `maxResultsPerName` | integer | `20` | Results per name. |
| `maxConcurrency` | integer | `2` | Parallel requests (kept low on purpose). |
| `delayMs` | integer | `500` | Pause between requests. |

#### Example input

```json
{
  "corporateNumbers": ["7010001034964", "T5010501005434", "1180301018771"],
  "includeHistory": true
}
```

### Output

Real example:

```json
{
  "corporateNumber": "7010001034964",
  "checkDigitValid": true,
  "found": true,
  "name": "ヤマトホールディングス株式会社",
  "nameKana": "ヤマトホールディングス",
  "address": "東京都中央区銀座２丁目１６番１０号",
  "nameEn": "YAMATO HOLDINGS CO., LTD.",
  "addressEn": "2-16-10,Ginza, Chuo ku, Tokyo",
  "corporateType": "株式会社 / Kabushiki Kaisha (stock company)",
  "closed": false,
  "lastUpdated": "2024-02-15",
  "lastUpdatedRaw": "令和6年2月15日",
  "history": [{ "no": 1, "isNew": true, "assignedDate": "2015-10-05" }],
  "sourceUrl": "https://www.houjin-bangou.nta.go.jp/henkorireki-johoto.html?selHouzinNo=7010001034964",
  "attribution": "出典：国税庁法人番号公表サイト（国税庁） / Source: National Tax Agency Corporate Number Publication Site",
  "scrapedAt": "2026-11-04T06:23:03.925Z"
}
```

A history entry with a change looks like this:

```json
{ "no": 2, "isNew": false, "eventDate": "2019-01-28", "reason": "本店又は主たる事務所の所在地の変更", "previousValue": "東京都台東区上野５丁目８番５号" }
```

- Japanese era dates (令和・平成・昭和) are converted to ISO dates.
- `checkDigitValid` uses the official check-digit formula, so typos are caught before any request is made.
- Inputs that are not 13 digits come back as `{ "found": false, "error": "not a 13-digit corporate number" }`.
- `corporateType` is derived from the registered name (株式会社, 合同会社, 一般社団法人 and so on).

### Pricing (pay per event)

| Event | Price | When |
|---|---|---|
| `apify-actor-start` | $0.01 | Once per run |
| `corporate-record` | $0.005 (= $5 per 1,000) | Each company found |
| `lookup-miss` | $0.001 | Number not found / name with no hits |

### Data and attribution

- Source: National Tax Agency Corporate Number Publication Site. When you publish or redistribute the data, cite the source as shown in the `attribution` field and state if you edited it. This Actor is not provided or endorsed by the NTA.
- Corporate numbers are assigned to legal entities only. Sole proprietors have no corporate number, so the output contains company data only.

### FAQ

**Do I need an API key?** No, not for lookups by number. Name search uses the official NTA Web-API and needs a free application ID.

**Can I check thousands of numbers?** Yes. Runs are sequential and polite (about 2 requests per second); 25 numbers took about 11 seconds in our tests.

# Changelog

This Actor's version history is a separate document: https://apify.com/wesales_jp/japan-corporate-number-lookup/changelog.md

# Actor input Schema

## `corporateNumbers` (type: `array`):

13-digit Japanese corporate numbers (法人番号). Invoice registration numbers with a leading T (T7000012050002), hyphens and full-width digits are accepted.

## `names` (type: `array`):

Company names to search (partial match, Japanese). Uses the official NTA Web-API, so you must also fill in applicationId.

## `applicationId` (type: `string`):

Free application ID issued by the National Tax Agency (https://www.houjin-bangou.nta.go.jp/webapi/). Only needed for name search.

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

Also return the list of registered changes (name / address changes, closure) for each corporate number.

## `maxResultsPerName` (type: `integer`):

Maximum number of companies returned for each company name you search.

## `maxConcurrency` (type: `integer`):

Parallel requests to the NTA site. Keep it low; this is a government site.

## `delayMs` (type: `integer`):

Wait time between requests in milliseconds. Raise it if the site starts refusing requests.

## Actor input object example

```json
{
  "corporateNumbers": [
    "7000012050002",
    "T4000012090001",
    "1180301018771"
  ],
  "includeHistory": true,
  "maxResultsPerName": 20,
  "maxConcurrency": 2,
  "delayMs": 500
}
```

# Actor output Schema

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

All records produced by the run (default dataset).

# 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 = {
    "corporateNumbers": [
        "7000012050002",
        "T4000012090001",
        "1180301018771"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("wesales_jp/japan-corporate-number-lookup").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 = { "corporateNumbers": [
        "7000012050002",
        "T4000012090001",
        "1180301018771",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("wesales_jp/japan-corporate-number-lookup").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 '{
  "corporateNumbers": [
    "7000012050002",
    "T4000012090001",
    "1180301018771"
  ]
}' |
apify call wesales_jp/japan-corporate-number-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wesales_jp/japan-corporate-number-lookup"
        }
    }
}
```

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/h9HOFmzmhP5xFZp15/builds/wrpch6TleOO9YqWd9/openapi.json
