{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Invoice Number Checker - T-Number Lookup",
    "description": "Bulk-check Japanese qualified invoice registration numbers (適格請求書発行事業者 登録番号, T + 13 digits) against official National Tax Agency data: registered, revoked or expired, name, address, dates. Search issuers by name and prefecture. No API key, no proxy. $1.50 per 1,000 results.",
    "version": "0.1",
    "x-build-id": "qkPO1La1Ob7ufGbLO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/1rrock~japan-invoice-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-1rrock-japan-invoice-lookup",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/1rrock~japan-invoice-lookup/runs": {
      "post": {
        "operationId": "runs-sync-1rrock-japan-invoice-lookup",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/1rrock~japan-invoice-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-1rrock-japan-invoice-lookup",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "registrationNumbers": {
            "title": "Registration numbers (T-numbers)",
            "type": "array",
            "description": "Qualified invoice issuer registration numbers (登録番号): 'T' + 13 digits. The leading T, hyphens, spaces and full-width digits are accepted. The check digit is validated. One output record per number (found, not_found or invalid).",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of dataset records (results). T-number lookups and name-search hits both count.",
            "default": 100
          },
          "nameQuery": {
            "title": "Name search (optional)",
            "type": "string",
            "description": "Search corporations and unincorporated associations by name (氏名又は名称), e.g. 'トヨタ自動車' or 'ソニー'. Matching is NFKC-normalized (full/half width), case- and space-insensitive. Individuals cannot be searched by name because the NTA removes sole-proprietor names from the bulk files. Minimum 2 characters."
          },
          "nameMatch": {
            "title": "Name match mode",
            "enum": [
              "contains",
              "startsWith",
              "exact"
            ],
            "type": "string",
            "description": "How nameQuery is matched.",
            "default": "contains"
          },
          "prefectures": {
            "title": "Prefectures (name search filter)",
            "type": "array",
            "description": "Restrict name-search results to these prefectures (head-office / published address). Also narrows which regional files are downloaded. Does not affect T-number lookups.",
            "items": {
              "type": "string",
              "enum": [
                "01",
                "02",
                "03",
                "04",
                "05",
                "06",
                "07",
                "08",
                "09",
                "10",
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19",
                "20",
                "21",
                "22",
                "23",
                "24",
                "25",
                "26",
                "27",
                "28",
                "29",
                "30",
                "31",
                "32",
                "33",
                "34",
                "35",
                "36",
                "37",
                "38",
                "39",
                "40",
                "41",
                "42",
                "43",
                "44",
                "45",
                "46",
                "47",
                "00"
              ],
              "enumTitles": [
                "01 北海道",
                "02 青森県",
                "03 岩手県",
                "04 宮城県",
                "05 秋田県",
                "06 山形県",
                "07 福島県",
                "08 茨城県",
                "09 栃木県",
                "10 群馬県",
                "11 埼玉県",
                "12 千葉県",
                "13 東京都",
                "14 神奈川県",
                "15 新潟県",
                "16 富山県",
                "17 石川県",
                "18 福井県",
                "19 山梨県",
                "20 長野県",
                "21 岐阜県",
                "22 静岡県",
                "23 愛知県",
                "24 三重県",
                "25 滋賀県",
                "26 京都府",
                "27 大阪府",
                "28 兵庫県",
                "29 奈良県",
                "30 和歌山県",
                "31 鳥取県",
                "32 島根県",
                "33 岡山県",
                "34 広島県",
                "35 山口県",
                "36 徳島県",
                "37 香川県",
                "38 愛媛県",
                "39 高知県",
                "40 福岡県",
                "41 佐賀県",
                "42 長崎県",
                "43 熊本県",
                "44 大分県",
                "45 宮崎県",
                "46 鹿児島県",
                "47 沖縄県",
                "00 国外 (foreign / no domestic address)"
              ]
            }
          },
          "onlyRegistered": {
            "title": "Only currently registered (name search)",
            "type": "boolean",
            "description": "Name search only: drop revoked / expired / deleted issuers from the results.",
            "default": false
          },
          "includeIndividuals": {
            "title": "Search individual (sole proprietor) files",
            "type": "boolean",
            "description": "If a T-number is not found among corporations/associations, also scan the individual issuer files (~35 MB more download). Individuals' names/addresses are withheld in the bulk data.",
            "default": true
          },
          "applyDailyDiffs": {
            "title": "Apply daily diff files",
            "type": "boolean",
            "description": "Apply the NTA daily diff files published since the month-end full data, so new registrations, revocations and changes from this month are included.",
            "default": true
          },
          "includeHistory": {
            "title": "Include history",
            "type": "boolean",
            "description": "Add the past-history entries (latest=0 rows: earlier registration / change events) for each issuer.",
            "default": false
          },
          "includeNotFound": {
            "title": "Output not-found / invalid numbers",
            "type": "boolean",
            "description": "Emit a record with found=false for numbers that are invalid or not in the NTA data (useful for invoice verification). Each such record counts as a result; turn this off to pay only for numbers that were found.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}