{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Government Tenders & Procurement Scraper in English",
    "description": "Japanese government tenders and procurement bid notices (入札公告) in English: project, buyer, prefecture, category, dates, document URL. English keyword search. Data via the search API of the Kankouju Joho Portal Site (官公需情報ポータルサイト, https://www.kkj.go.jp/); not endorsed by METI or any government body.",
    "version": "0.1",
    "x-build-id": "4hIqC6GPkmpPYZyf0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foreseeable_everglade~jp-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foreseeable_everglade-jp-tenders",
        "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/foreseeable_everglade~jp-tenders/runs": {
      "post": {
        "operationId": "runs-sync-foreseeable_everglade-jp-tenders",
        "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/foreseeable_everglade~jp-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-foreseeable_everglade-jp-tenders",
        "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": {
          "noticeType": {
            "title": "Notice type",
            "enum": [
              "all",
              "tenders",
              "awardResults"
            ],
            "type": "string",
            "description": "all = every notice the search finds. tenders = calls for tenders only. awardResults = published results only (入札結果, 落札者の決定, 契約結果 ...), with the winning companies listed in winners. The API has no result flag, so results are found by title; they are much rarer than tenders (a few dozen per month nationwide), so use a longer date range.",
            "default": "all"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words to search for, in English or Japanese, for example \"system maintenance\", \"cleaning\", \"cloud\", システム or 清掃. English words are converted to Japanese search terms with a built-in procurement glossary before the search (e.g. maintenance → 保守 OR 保守点検); words not in the glossary, such as product names, are searched as typed. Several keywords are combined with OR into a single API request. Inside one keyword you can use the API syntax: spaces or AND for \"all words\", OR, ANDNOT, and parentheses. A keyword must not contain a single kana character on its own (the API rejects it).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "translateEnglishKeywords": {
            "title": "Translate English keywords to Japanese",
            "type": "boolean",
            "description": "Convert English keywords to Japanese search terms before searching (the notices are in Japanese). Turn off to search English words exactly as typed. The run log shows each conversion.",
            "default": true
          },
          "searchIn": {
            "title": "Search keywords in",
            "enum": [
              "all",
              "projectName"
            ],
            "type": "string",
            "description": "all = the notice title and the full notice text (API parameter Query). projectName = the notice title only (Project_Name), fewer but more precise matches.",
            "default": "all"
          },
          "prefectures": {
            "title": "Prefectures (LgCode)",
            "type": "array",
            "description": "Only notices for these prefectures (JIS X 0401 codes). Leave empty for all of Japan. National agencies are assigned to the prefecture of the issuing office.",
            "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"
              ],
              "enumTitles": [
                "01 Hokkaido (北海道)",
                "02 Aomori (青森県)",
                "03 Iwate (岩手県)",
                "04 Miyagi (宮城県)",
                "05 Akita (秋田県)",
                "06 Yamagata (山形県)",
                "07 Fukushima (福島県)",
                "08 Ibaraki (茨城県)",
                "09 Tochigi (栃木県)",
                "10 Gunma (群馬県)",
                "11 Saitama (埼玉県)",
                "12 Chiba (千葉県)",
                "13 Tokyo (東京都)",
                "14 Kanagawa (神奈川県)",
                "15 Niigata (新潟県)",
                "16 Toyama (富山県)",
                "17 Ishikawa (石川県)",
                "18 Fukui (福井県)",
                "19 Yamanashi (山梨県)",
                "20 Nagano (長野県)",
                "21 Gifu (岐阜県)",
                "22 Shizuoka (静岡県)",
                "23 Aichi (愛知県)",
                "24 Mie (三重県)",
                "25 Shiga (滋賀県)",
                "26 Kyoto (京都府)",
                "27 Osaka (大阪府)",
                "28 Hyogo (兵庫県)",
                "29 Nara (奈良県)",
                "30 Wakayama (和歌山県)",
                "31 Tottori (鳥取県)",
                "32 Shimane (島根県)",
                "33 Okayama (岡山県)",
                "34 Hiroshima (広島県)",
                "35 Yamaguchi (山口県)",
                "36 Tokushima (徳島県)",
                "37 Kagawa (香川県)",
                "38 Ehime (愛媛県)",
                "39 Kochi (高知県)",
                "40 Fukuoka (福岡県)",
                "41 Saga (佐賀県)",
                "42 Nagasaki (長崎県)",
                "43 Kumamoto (熊本県)",
                "44 Oita (大分県)",
                "45 Miyazaki (宮崎県)",
                "46 Kagoshima (鹿児島県)",
                "47 Okinawa (沖縄県)"
              ]
            },
            "default": []
          },
          "category": {
            "title": "Category",
            "enum": [
              "1",
              "2",
              "3"
            ],
            "type": "string",
            "description": "Only notices in this category. Many notices have no category in the API and are excluded when you set one."
          },
          "procedureType": {
            "title": "Procedure type",
            "enum": [
              "1",
              "2",
              "3"
            ],
            "type": "string",
            "description": "Only notices with this tendering procedure."
          },
          "organizationName": {
            "title": "Ordering organization (Japanese name)",
            "type": "string",
            "description": "Only notices from organizations whose Japanese name contains this text, for example 国土交通省 (Ministry of Land, Infrastructure, Transport and Tourism) or 横浜市 (Yokohama City). The API only knows the Japanese names."
          },
          "daysBack": {
            "title": "Notices from the last N days",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Notice dates (公告日; the portal uses its retrieval date when the notice has none) from N days before the end date up to the end date, in Japan time. The portal registers notices about one day after the organization publishes them. Ignored when Date from is set.",
            "default": 7
          },
          "dateFrom": {
            "title": "Date from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Earliest notice date (YYYY-MM-DD). Overrides \"last N days\"."
          },
          "dateTo": {
            "title": "Date to",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Latest notice date (YYYY-MM-DD). Default: today in Japan."
          },
          "maxItems": {
            "title": "Max notices",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many notices, newest first. 0 means no limit other than the request cap below.",
            "default": 100
          },
          "onlyNewSinceLastRun": {
            "title": "Only notices not returned by earlier runs",
            "type": "boolean",
            "description": "Skip notices that earlier runs with the same search filters already returned (history is kept for 120 days in the named key-value store \"jp-tenders-state\"). Use with a daily schedule to get just the new tenders.",
            "default": false
          },
          "skipReposts": {
            "title": "Skip re-posted notices",
            "type": "boolean",
            "description": "The portal often registers the same notice again on later days. When on, a notice with the same document URL, title and organization is returned only once (the newest copy).",
            "default": true
          },
          "enrichAwardWinners": {
            "title": "Add corporate number, address and industry to award winners",
            "type": "boolean",
            "description": "Optional, award results only: look up each winning company's 法人番号 (corporate number) and registered address in the 国税庁 法人番号 Web-API, and 業種 (industry) in gBizINFO. Works only with your own application ID below; without it winners are listed by name only. Matching is automatic and name-based, and may contain errors.",
            "default": true
          },
          "houjinBangouAppId": {
            "title": "Corporate Number (法人番号) Web-API application ID",
            "type": "string",
            "description": "Your own application ID (アプリケーションID), issued to you by the National Tax Agency after your application at https://www.invoice-kohyo.nta.go.jp/web-api/index.html . Each user must use their own ID; the Web-API terms forbid transferring, lending or disclosing it to others (Article 9(1)(v)). Stored encrypted and never logged. Alternatively set the environment variable HOUJIN_BANGOU_APP_ID (marked secret). Leave empty to skip enrichment."
          },
          "gbizinfoApiToken": {
            "title": "gBizINFO API token (for industry)",
            "type": "string",
            "description": "Token for the gBizINFO REST API v2 (https://info.gbiz.go.jp/), used only to read 業種 (industry). Use it only within the purpose you declared when applying. Stored encrypted; alternatively set the environment variable GBIZINFO_API_TOKEN. Leave empty to keep industry null. Industry credit: Source: 「Gビズインフォ」（経済産業省）(gBizINFO, Ministry of Economy, Trade and Industry of Japan) (https://info.gbiz.go.jp/), REST API v2, accessed on the date in each item's fetch-timestamp field (scrapedAt; lookups are reused for up to 30 days, so the actual access date may be earlier); processed (field extraction and formatting) by Tidy Thunder. 出典：「Gビズインフォ」（経済産業省）（https://info.gbiz.go.jp/）を加工して作成 gBizINFO data is based on information from government ministries and listed companies and is not guaranteed by METI, those ministries or the companies. Industry values may include information registered by the companies themselves."
          },
          "maxCorporateLookups": {
            "title": "Max corporate lookups per run",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Upper bound on requests to each of the 法人番号 Web-API and gBizINFO per run (hard limit 100). Results are cached for 30 days in the named key-value store \"jp-tenders-corporate-cache\", so repeat winners cost no requests.",
            "default": 20
          },
          "enrichmentDelaySecs": {
            "title": "Delay between lookups",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Seconds between consecutive requests to the 法人番号 Web-API and to gBizINFO. Requests are never sent in parallel.",
            "default": 2
          },
          "maxRequests": {
            "title": "Max API requests per run",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Upper bound on API requests in one run, retries included. Most runs need one request; more are used only when the date range has over 1,000 matching notices. The API terms forbid continuous large-volume access, so the hard limit is 30.",
            "default": 10
          },
          "requestDelaySecs": {
            "title": "Delay between requests",
            "minimum": 3,
            "maximum": 60,
            "type": "integer",
            "description": "Seconds to wait between consecutive API requests. Requests are never sent in parallel.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}