{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Government Tenders Scraper: KKJ 官公需 Bids to Excel",
    "description": "Export Japanese government tenders (入札公告) from ministries, agencies, universities, prefectures and cities via the official KKJ 官公需情報ポータルサイト API. Filter by keyword, prefecture, goods/works/services, date. English fields. Excel, CSV, JSON.",
    "version": "1.0",
    "x-build-id": "gb9l5FIbh5aWi1SGe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tenderfeed~japan-kkj-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tenderfeed-japan-kkj-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/tenderfeed~japan-kkj-tenders/runs": {
      "post": {
        "operationId": "runs-sync-tenderfeed-japan-kkj-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/tenderfeed~japan-kkj-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-tenderfeed-japan-kkj-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": {
          "keywords": {
            "title": "Keywords (Japanese)",
            "type": "array",
            "description": "Searched by the KKJ full-text search in the notice title and text. Use Japanese terms, e.g. [\"システム\", \"清掃\", \"工事\", \"ソフトウェア\"]. Empty = all notices.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Match ANY or ALL keywords.",
            "default": "any"
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices containing any of these words, e.g. [\"工事\"].",
            "items": {
              "type": "string"
            }
          },
          "projectName": {
            "title": "Project name contains",
            "type": "string",
            "description": "Only notices whose title (件名) contains this text."
          },
          "organizationName": {
            "title": "Organization name contains",
            "type": "string",
            "description": "Only notices from buyers whose name (機関名) contains this text, e.g. \"国土交通省\", \"東京都\", \"大学\"."
          },
          "prefectures": {
            "title": "Prefectures",
            "type": "array",
            "description": "Japanese prefectures (JIS X0401 codes). National bodies are listed under the prefecture of their office. Empty = all Japan.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "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": [
                "Hokkaido (1)",
                "Aomori (2)",
                "Iwate (3)",
                "Miyagi (4)",
                "Akita (5)",
                "Yamagata (6)",
                "Fukushima (7)",
                "Ibaraki (8)",
                "Tochigi (9)",
                "Gunma (10)",
                "Saitama (11)",
                "Chiba (12)",
                "Tokyo (13)",
                "Kanagawa (14)",
                "Niigata (15)",
                "Toyama (16)",
                "Ishikawa (17)",
                "Fukui (18)",
                "Yamanashi (19)",
                "Nagano (20)",
                "Gifu (21)",
                "Shizuoka (22)",
                "Aichi (23)",
                "Mie (24)",
                "Shiga (25)",
                "Kyoto (26)",
                "Osaka (27)",
                "Hyogo (28)",
                "Nara (29)",
                "Wakayama (30)",
                "Tottori (31)",
                "Shimane (32)",
                "Okayama (33)",
                "Hiroshima (34)",
                "Yamaguchi (35)",
                "Tokushima (36)",
                "Kagawa (37)",
                "Ehime (38)",
                "Kochi (39)",
                "Fukuoka (40)",
                "Saga (41)",
                "Nagasaki (42)",
                "Kumamoto (43)",
                "Oita (44)",
                "Miyazaki (45)",
                "Kagoshima (46)",
                "Okinawa (47)"
              ]
            }
          },
          "categories": {
            "title": "Category",
            "type": "array",
            "description": "Only part of the notices carry a category. Empty = all, including uncategorized notices.",
            "items": {
              "type": "string",
              "enum": [
                "goods",
                "works",
                "services"
              ],
              "enumTitles": [
                "Goods (物品)",
                "Works / construction (工事)",
                "Services (役務)"
              ]
            }
          },
          "procedureTypes": {
            "title": "Procedure type",
            "type": "array",
            "description": "Only part of the notices carry a procedure type. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "general-competitive",
                "simplified-open",
                "simplified-designated"
              ],
              "enumTitles": [
                "General competitive bidding (一般競争入札)",
                "Simplified open competitive (簡易公募型競争入札)",
                "Simplified open designated (簡易公募型指名競争入札)"
              ]
            }
          },
          "certificationGrades": {
            "title": "Qualification grades",
            "type": "array",
            "description": "Unified qualification grades (全省庁統一資格 A-D). Few notices carry this field.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D"
              ]
            }
          },
          "publishedFrom": {
            "title": "Notice date from",
            "type": "string",
            "description": "YYYY-MM-DD or relative (\"7 days\"). Notice date (公告日; the portal's collection date when no notice date). Empty = any (last 30 days when Max results = 0)."
          },
          "publishedTo": {
            "title": "Notice date to",
            "type": "string",
            "description": "YYYY-MM-DD. Empty = newest."
          },
          "tenderDateFrom": {
            "title": "Tender date from",
            "type": "string",
            "description": "Bid submission start date (入札開始日) from. Few notices carry it."
          },
          "tenderDateTo": {
            "title": "Tender date to",
            "type": "string",
            "description": "Bid submission start date (入札開始日) to."
          },
          "onlyWithFutureTenderDate": {
            "title": "Only notices with a future tender date",
            "type": "boolean",
            "description": "Keep only notices whose tender date is today or later (only notices that carry the date).",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit (reads the last 30 days unless you set Notice date from). Default 50, newest first. Around 300-1,000 new notices per working day.",
            "default": 50
          },
          "includeDescription": {
            "title": "Include notice text",
            "type": "boolean",
            "description": "Adds the full notice text (公告文) extracted by the portal.",
            "default": true
          },
          "descriptionMaxChars": {
            "title": "Notice text max characters",
            "minimum": 0,
            "type": "integer",
            "description": "Trim long notice texts. 0 = no trimming.",
            "default": 4000
          },
          "onlyNew": {
            "title": "Only new notices (monitoring mode)",
            "type": "boolean",
            "description": "Remember what earlier runs delivered and return (and charge for) only notices you have not received yet. Ideal for a daily schedule.",
            "default": false
          },
          "monitoringId": {
            "title": "Monitoring ID",
            "type": "string",
            "description": "Name of the watch-list memory used by 'Only new'. Use a different ID per saved search/schedule."
          },
          "includeBuyerContacts": {
            "title": "Include personal contact data",
            "type": "boolean",
            "description": "Off by default. Notice texts often name the officer in charge with phone and e-mail; when off, phone numbers and e-mail addresses in the text are masked.",
            "default": false
          },
          "includeRawData": {
            "title": "Include raw API record",
            "type": "boolean",
            "description": "Adds the original KKJ API fields under `raw`.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}