# Japan Government Tenders & Procurement Scraper in English (`foreseeable_everglade/jp-tenders`) Actor

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.

- **URL**: https://apify.com/foreseeable_everglade/jp-tenders.md
- **Developed by:** [Tidy Thunder](https://apify.com/foreseeable_everglade) (community)
- **Categories:** Lead generation, Other
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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 Government Tenders in English: New Bid Notices

Get new Japanese public-sector tender and bid notices as clean JSON. This Actor searches the official **[官公需情報ポータルサイト](https://www.kkj.go.jp/s/) search API** (Kankouju Joho Portal Site, run by Japan's Small and Medium Enterprise Agency), which collects tender notices published by national ministries, independent administrative agencies and local governments all over Japan.

Filter by keyword, prefecture, category (goods / construction / services), procedure type, ordering organization and notice date. Each notice becomes one dataset item with English field names and the original Japanese values: project name, ordering organization, prefecture and city, category, procedure type, notice date, link to the notice document, file type and attachments.

**Works in English:** type keywords in English (e.g. `system maintenance`, `cleaning`, `cloud`) — they are converted to Japanese search terms before the search — and every item carries English labels for the organization, prefecture, city, category, procedure type and subject. See [Using it in English](#using-it-in-english).

Published award results (入札結果) can be listed too; see [Award results](#award-results-and-winner-enrichment).

> **Source:** Tender data: obtained through the search API of the Kankouju Joho Portal Site (官公需情報ポータルサイト, Small and Medium Enterprise Agency of Japan).
> https://www.kkj.go.jp/s/ (API: https://www.kkj.go.jp/api/, terms: https://kkj.go.jp/s/?tc=1)
> This Actor processes the data (English field names, normalization, winner extraction, etc.).
>
> Every dataset item carries `dataSource` and `dataSourceUrl`, and every run log and run summary states the source with links. See [Sources and disclaimer](#sources-and-disclaimer--出典免責).

### What can you use it for?

- **B2B sales teams tracking government tenders:** a daily feed of new 入札公告 that match your products (システム, 保守, 清掃, 印刷 ...) in the prefectures you cover, straight into your CRM, spreadsheet or Slack.
- **Bid/no-bid pipelines:** filter by category and procedure type, then route each notice document to the right sales owner.
- **Market research:** which organizations buy what, in which regions and how often.
- **Competitor and partner research:** who wins which public contracts, from published award results.
- **Alerts:** schedule the Actor once a day with *Only notices not returned by earlier runs* to receive just the new notices.

### What data do you get?

| Field | What it contains | Example |
|---|---|---|
| `noticeId` | Unique key of the notice in the portal | `dG9reW8vc2V0YWdheWFf...` |
| `noticeType`, `noticeTypeEn` | `tender` / `Call for tenders`, or `award_result` / `Award result` for published results (classified from the title) | `tender`, `Call for tenders` |
| `projectName` | Project name (件名), in Japanese as published | `クラウド型ネットワークサービス等に係る調達` |
| `subjectTagsEn` | English subject tags matched from the title with the built-in glossary | `["cloud", "network", "purchase"]` |
| `organizationName` | Ordering organization (機関名) | `東京都世田谷区` |
| `organizationNameEn`, `organizationTypeEn` | Organization in English and its type (see below) | `Setagaya City, Tokyo`, `Municipal government` |
| `prefectureCode`, `prefectureName`, `prefectureNameEn` | Prefecture (JIS X 0401) | `13`, `東京都`, `Tokyo` |
| `cityCode`, `cityName`, `cityNameEn` | Municipality (JIS X 0402), when known; English for major cities | `131121`, `世田谷区`, `Setagaya` |
| `category`, `categoryEn` | `物品` / `Goods`, `工事` / `Construction` or `役務` / `Services`, when known | `役務`, `Services` |
| `procedureType`, `procedureTypeEn` | Procedure (公示種別), when known | `一般競争入札`, `Open competitive tendering` |
| `certification` | Accepted bidder qualification grades (入札資格) | `["A", "B", "C"]` |
| `noticeDate` | Notice date (公告日), YYYY-MM-DD in Japan time | `2026-10-30` |
| `tenderSubmissionDate`, `openingDate`, `deliveryDeadline` | 入札開始日, 開札日, 納入期限日, when published | `2026-11-20` |
| `location`, `itemCode` | Place of performance (履行場所), item classification (品目分類番号) | |
| `documentUrl`, `fileType`, `fileSizeBytes` | Notice document published by the organization | `https://www.city.setagaya.lg.jp/documents/27758/koukoku.pdf`, `pdf`, `408787` |
| `attachments` | Attached documents: `{ name, url }` | `[{"name": "入札説明書類", "url": "https://..."}]` |
| `winners` | Award results only: winning companies with `winnerName`, `corporateNumber`, `corporateName`, `corporateAddress`, `corporatePostCode`, `industry`, `corporateLookup`, `industryLookup` (see below) | `[]` for tenders |
| `matchedKeywords` | Which of your keywords appear in the notice (useful when you search several at once) | `["システム"]` |
| `portalRetrievedAt` | When the portal crawled the notice | `2026-10-30T19:10:24+09:00` |
| `dataSource`, `dataSourceUrl` | Source of the item (see [Sources and disclaimer](#sources-and-disclaimer--出典免責)), `https://www.kkj.go.jp/api/` | |
| `enrichmentSources` | Source texts for the optional winner enrichment used in this item (法人番号 Web-API, gBizINFO) | `[]` when not enriched |
| `scrapedAt` | When this Actor fetched the notice | `2026-11-02T14:28:05.793Z` |

`null` means the API does not provide that value for the notice; the optional fields (category, procedure type, dates other than the notice date, place, item code) are often missing because the portal has not structured them for every source. You can download the data as JSON, CSV, Excel, XML or HTML, or read it through the Apify API.

#### What is deliberately left out

The API also returns the full notice text (`ProjectDescription`). It routinely names the officials responsible and lists their phone numbers and e-mail addresses, so **this Actor never stores it** (it is used in memory only to fill `matchedKeywords` and to find the winning companies of award results). In the fields that are kept, e-mail addresses and phone numbers are replaced with `[redacted]`, and `mailto:`/`tel:` attachment links are dropped. Open `documentUrl` to read the full notice from the issuing organization.

### How to use it

1. Click **Try for free**.
2. Enter one or more **Keywords** (English such as `system maintenance`, or Japanese such as `システム`), and/or pick **Prefectures**, a **Category** or an **Ordering organization**. At least one of keyword, organization or prefecture is required by the API.
3. Choose the date range (default: the last 7 days) and **Max notices**.
4. Click **Start**, then open the **Output** tab.

The prefilled input (keyword `system`, Tokyo, last 3 days, 20 notices) finishes in a few seconds with one API request. Open the **English overview** view of the dataset for English labels.

### Input

| Field | Default | Description |
|---|---|---|
| `noticeType` | `all` | `all`, `tenders` (calls for tenders only) or `awardResults` (published results only, with `winners`). |
| `keywords` | – | Search words in English or Japanese. English words are converted to Japanese (see below). Several keywords are combined with OR in one request. API syntax works inside a keyword: spaces/AND, OR, ANDNOT, parentheses. A lone kana character is rejected by the API. |
| `translateEnglishKeywords` | `true` | Convert English keywords to Japanese search terms. Off = search English words as typed. |
| `searchIn` | `all` | `all` = title and notice text (API `Query`); `projectName` = title only (`Project_Name`). |
| `prefectures` | all of Japan | Two-digit prefecture codes (`LG_Code`), e.g. `["13", "14"]`. |
| `category` | any | `1` 物品, `2` 工事, `3` 役務. |
| `procedureType` | any | `1` 一般競争入札, `2` 簡易公募型競争入札, `3` 簡易公募型指名競争入札. |
| `organizationName` | – | Organization name contains this text. |
| `daysBack` | `7` | Notice dates from N days before the end date up to the end date (Japan time). |
| `dateFrom`, `dateTo` | – / today | Explicit notice-date range, YYYY-MM-DD (max 365 days). |
| `maxItems` | `100` | Stop after this many notices, newest first. `0` = no limit except the request cap. |
| `onlyNewSinceLastRun` | `false` | Skip notices that earlier runs with the same filters returned (history: named key-value store `jp-tenders-state`, 120 days). |
| `skipReposts` | `true` | The portal often registers the same notice again on later days; return it once. |
| `enrichAwardWinners` | `true` | Look up the winners of award results (needs `houjinBangouAppId`). |
| `houjinBangouAppId` | – | Your 法人番号 Web-API application ID (secret input). Or set the environment variable `HOUJIN_BANGOU_APP_ID`. |
| `gbizinfoApiToken` | – | Your gBizINFO API token, for `industry` (secret input). Or set `GBIZINFO_API_TOKEN`. |
| `maxCorporateLookups` | `20` | Max requests to each enrichment API per run (hard limit 100); results are cached for 30 days. |
| `enrichmentDelaySecs` | `2` | Seconds between enrichment requests (1 to 60). |
| `maxRequests` | `10` | Max API requests per run, retries included (hard limit 30). |
| `requestDelaySecs` | `5` | Seconds between requests (3 to 60). |

Example input:

```json
{
    "keywords": ["システム", "クラウド"],
    "prefectures": ["13", "14"],
    "category": "3",
    "daysBack": 3,
    "maxItems": 200,
    "onlyNewSinceLastRun": true
}
```

### Output example

One item from a real run on 2 November 2026:

```json
{
    "noticeId": "dG9reW8vc2V0YWdheWFfY2l0eS8yMDI2LzIwMjYxMDMwXzAwMDY2Cg==",
    "noticeType": "tender",
    "projectName": "「都市計画道路補助第217号線（成城一、二、三丁目）用地取得方策検討及び土地区画整理事業化支援業務委託」プロポーザルの実施について",
    "organizationName": "東京都世田谷区",
    "prefectureCode": "13",
    "prefectureName": "東京都",
    "cityCode": "131121",
    "cityName": "世田谷区",
    "category": "役務",
    "procedureType": null,
    "certification": [],
    "noticeDate": "2026-10-30",
    "tenderSubmissionDate": null,
    "openingDate": null,
    "deliveryDeadline": null,
    "location": null,
    "itemCode": null,
    "documentUrl": "https://www.city.setagaya.lg.jp/documents/27758/koukoku.pdf",
    "fileType": "pdf",
    "fileSizeBytes": 408787,
    "attachments": [],
    "winners": [],
    "matchedKeywords": ["システム"],
    "portalRetrievedAt": "2026-10-30T19:10:24+09:00",
    "dataSource": "Tender data: obtained through the search API of the Kankouju Joho Portal Site (官公需情報ポータルサイト, Small and Medium Enterprise Agency of Japan).",
    "dataSourceUrl": "https://www.kkj.go.jp/api/",
    "enrichmentSources": [],
    "scrapedAt": "2026-11-02T14:28:05.793Z"
}
```

The key-value store record `RUN_SUMMARY` lists the source and disclaimer texts, every API request made (date window, matches, returned), skipped duplicates and re-posts, and whether the run stopped at `maxItems` or the request cap.

### Using it in English

The notices themselves are Japanese, so the Actor bridges the language gap in both directions without any translation service or extra data source — only fixed glossaries shipped in the code (`src/english.js`):

- **English input form.** All fields have English labels and descriptions; prefectures, categories and procedure types are listed in English with the Japanese name in brackets (e.g. `13 Tokyo (東京都)`, `Services (役務)`).
- **English keywords.** Each English keyword is converted to Japanese search terms with a procurement glossary of 120 entries (about 190 English words and phrases) (longest phrase first, plural-insensitive): `cleaning` → `清掃`, `system maintenance` → `システム (保守 OR 保守点検)`, `medical equipment lease` → `医療機器 (賃貸借 OR リース)`, `security guard` → `警備`, `AI` → `(ＡＩ OR AI OR 人工知能)`. Words not in the glossary (product names such as `Microsoft`, acronyms) are searched as typed. API operators (`AND`, `OR`, `ANDNOT`, parentheses) keep working. The run log prints every conversion, e.g. `English keyword "cleaning" → API search terms: 清掃`, and `matchedKeywords` reports your English keyword when it matched. Japanese keywords are used unchanged.
- **English output.** Field names are English; the Japanese values are kept and English companion fields are added: `noticeTypeEn`, `organizationNameEn`, `organizationTypeEn`, `prefectureNameEn`, `cityNameEn`, `categoryEn`, `procedureTypeEn` and `subjectTagsEn`. The dataset view **English overview** shows them as a table.
  - `organizationNameEn` uses fixed English names of ministries, agencies, courts, prosecutors, police, regional bureaus and the National Hospital Organization etc., prefectural governments (`Saga Prefectural Government`) and major cities (`Setagaya City, Tokyo`). Other municipalities get their type and prefecture (`御殿場市 (city in Shizuoka)`), and parts without an established English name stay in Japanese (`National Hospital Organization, 東京医療センター`).
  - `organizationTypeEn` is always filled: National government, Prefectural government, Municipal government, Independent administrative agency, National university corporation, Police, Court or Other public organization.
  - Project titles are not machine-translated; `subjectTagsEn` gives English tags for the subject instead (e.g. `["system", "network", "outsourcing"]`).

### Award results and winner enrichment

Award data, like everything else, comes **only from the 官公需情報ポータルサイト API**. That API has no "result" flag and no winner field, so:

- **Finding results:** with `noticeType: "awardResults"` the Actor asks the API for notices whose title contains 入札結果, 落札結果, 開札結果, 契約結果, 選定結果, 落札者, 契約の相手方, 随意契約 ..., then re-checks each title (for example 落札者決定基準 and calls for quotations are dropped). Results are much rarer than tenders: a check on 2 November 2026 found 22 matching notices in 45 days across Japan, 16 of them real results. Use a longer date range.
- **Finding winners:** the winning companies are read from the notice text the API returns (best effort). Only names with a legal form (株式会社, ㈱, 有限会社, 合同会社, 一般社団法人 ...) placed next to a winner marker are taken — for example 「落札者の氏名及び住所 ○○株式会社」, 「契約業者名 株式会社○○」 or a bid table row 「○○㈱ 1,100,000 決定」. Sole proprietors (no legal form) and the representatives' names printed next to companies are never captured. Some result documents (scanned images, tables whose layout is lost) yield no winner; `winners` is then empty and `documentUrl` has the original.
- **Corporate number and address (法人番号・所在地), optional:** only when you enter **your own** 法人番号 Web-API application ID (see below), each winner is searched by name in the **国税庁 法人番号システム Web-API** (registered corporations only, closed ones excluded). A winner gets a `corporateNumber` only when exactly one corporation has the same name — if several do, the one in the notice's prefecture is taken, otherwise `corporateLookup` is `ambiguous`. `corporateAddress` is the registered head-office address (本店又は主たる事務所の所在地) as published by the National Tax Agency. The match is automatic and name-based, and may contain errors.
- **Industry (業種):** the 法人番号 Web-API has no industry field. The only official API that has one is **gBizINFO** (経済産業省, REST API v2, field `industry`), queried by corporate number. Only that field is read; the response also contains the representative's name, which is ignored. Many corporations have no industry in gBizINFO (`industryLookup: "no_data"`).
- **Lookup status:** `corporateLookup` is `matched`, `ambiguous`, `not_found`, `skipped_no_app_id`, `skipped_lookup_cap`, `error` or `disabled`; `industryLookup` is `matched`, `no_data`, `not_found`, `skipped_no_token`, `skipped_no_corporate_number`, `skipped_lookup_cap`, `error` or `disabled`.

The dataset view **Award results with winners** shows one row per winning company.

#### Optional: your own 法人番号 Web-API application ID

This enrichment is optional and works only with **your own application ID (アプリケーションID)**. The Actor does not include an ID, and **each user must apply for and use their own**: the Web-API terms forbid transferring, lending or disclosing an ID to anyone else (Article 9(1)(v)), so never share yours or use someone else's. The National Tax Agency issues IDs free of charge after an **application (利用申請 / 発行届出)**:

1. Open https://www.invoice-kohyo.nta.go.jp/web-api/index.html and choose **発行届出** for a **法人番号用アプリケーションID** (the ID for the 法人番号システムWeb-API only).
2. Register your e-mail address (仮登録), then fill in the form sent to you (本登録). The ID arrives by e-mail, usually within about a month. One ID per e-mail address.
3. Give the ID to the Actor, either as the **法人番号 Web-API application ID** input (`houjinBangouAppId`, stored encrypted as a secret input) or as an Actor environment variable `HOUJIN_BANGOU_APP_ID` marked **Secret** in the Actor's settings. The ID is never written to the log, the dataset or `RUN_SUMMARY`.

Without an ID the Actor still runs: it lists award results and winner names, logs `Award-winner enrichment skipped: no 法人番号 Web-API application ID ...`, and leaves `corporateNumber`, `corporateAddress` and `industry` as `null` (`corporateLookup: "skipped_no_app_id"`).

**Required notice.** The 法人番号システムWeb-API機能利用規約 (Article 6, https://www.houjin-bangou.nta.go.jp/webapi/riyokiyaku.html) requires services built on the API to show its wording; the Actor uses the lines in [Sources and disclaimer](#sources-and-disclaimer--出典免責) and puts them in `enrichmentSources` of every enriched item, in the run log and in `RUN_SUMMARY`. Keep them when you publish or share the data.

#### Optional: gBizINFO API token (for industry)

gBizINFO (https://info.gbiz.go.jp/) issues API tokens after an application to the Ministry of Economy, Trade and Industry. Its API terms (https://help.info.gbiz.go.jp/hc/ja/articles/4999421139102) limit use to the **purpose you declared when applying**, and may rate-limit or block excessive access. Give the token as the `gbizinfoApiToken` secret input or the `GBIZINFO_API_TOKEN` secret environment variable. Without it, `industry` stays `null`. gBizINFO content may be reused with credit; enriched items carry the industry credit lines from [Sources and disclaimer](#sources-and-disclaimer--出典免責) in `enrichmentSources`, and the access date is each item's fetch timestamp (`scrapedAt`).

#### Enrichment etiquette

Requests to each enrichment API are strictly sequential, at least `enrichmentDelaySecs` (default 2 s) apart, capped at `maxCorporateLookups` per run (hard limit 100), and stop after three consecutive errors (for example a wrong ID). Results are cached for 30 days in the named key-value store `jp-tenders-corporate-cache`, so a company that wins often is looked up once.

### How it works and API etiquette

- **API only.** The Actor calls only `https://www.kkj.go.jp/api/`. It never requests portal HTML pages (the site's robots.txt disallows crawling them) and never follows redirects.
- **One request at a time.** Requests are strictly sequential with a pause of at least `requestDelaySecs` (default 5 s) between them, including retries.
- **Few requests.** The API returns up to 1,000 notices per request, newest first, and has no paging offset. A run first asks for the whole date range at once; most runs need a single request. Only when more than 1,000 notices match does it continue with a second request that ends on the oldest date already received. If a single day has more than 1,000 matches, the rest of that day is skipped and reported in the log and `RUN_SUMMARY.truncatedDays`; add filters to narrow the search.
- **Capped volume.** At most `maxRequests` requests per run (hard limit 30), as the API terms forbid continuous large-volume access. Schedule the Actor daily rather than running it in a loop.
- **Honest User-Agent** identifying the Actor.
- **No other sources.** Besides the kkj API, the only hosts contacted are the 法人番号 Web-API and gBizINFO, and only for award winners when you configure their credentials. No web pages are scraped.

The portal registers notices about one day after the organization publishes them and does not guarantee to cover every tender. Document URLs point to the issuing organization's site and may expire.

### Sources and disclaimer / 出典・免責

The English text is a reference translation; the Japanese text is authoritative. Corporate number, address and industry appear only on award results, and only when you enter your own 法人番号 Web-API application ID (and gBizINFO token). Each user must apply for and use their own ID; never share it.

```
Sources
- Tender data: obtained through the search API of the Kankouju Joho Portal Site (官公需情報ポータルサイト, Small and Medium Enterprise Agency of Japan).
  https://www.kkj.go.jp/s/ (API: https://www.kkj.go.jp/api/, terms: https://kkj.go.jp/s/?tc=1)
  This Actor processes the data (English field names, normalization, winner extraction, etc.).
- Corporate number and address of award winners:
  このサービスは、国税庁法人番号システムWeb-API 機能を利用して取得した情報をもとに作成しているが、サービスの内容は国税庁によって保証されたものではない
  (This service is built on information obtained through the Web-API of the National Tax Agency's Corporate Number System, but the National Tax Agency does not guarantee its content.)
  Source: 国税庁法人番号公表サイト (National Tax Agency) (https://www.houjin-bangou.nta.go.jp/), processed by Tidy Thunder.
- Industry of award winners: 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.

Disclaimer
- This Actor is not provided, operated or endorsed by the Small and Medium Enterprise Agency, the National Tax Agency, the Ministry of Economy, Trade and Industry or any other government body.
- The original notice published by each procuring organization is authoritative. Ask that organization about individual tenders. Notice and attachment URLs may no longer be valid.
- The portal does not cover every tender.
- Winner-to-corporate-number matching is automatic and name-based, and may contain errors.
- Notice texts and attachments may be protected by rights of the procuring organizations. Check before you reuse them.
```

```
【出典】
・入札公告データ：官公需情報ポータルサイト（中小企業庁）の検索APIを利用して取得しています。
  https://www.kkj.go.jp/s/ （API: https://www.kkj.go.jp/api/ 、利用規約: https://kkj.go.jp/s/?tc=1 ）
  本Actorは、取得したデータを項目名の英語化・正規化・落札者の抽出などの形で加工して出力します。
・落札者の法人番号・所在地：
  このサービスは、国税庁法人番号システムWeb-API 機能を利用して取得した情報をもとに作成しているが、サービスの内容は国税庁によって保証されたものではない
  出典：国税庁法人番号公表サイト（国税庁）（https://www.houjin-bangou.nta.go.jp/）を加工して作成
・業種：出典：「Gビズインフォ」（経済産業省）（https://info.gbiz.go.jp/）のREST API v2で取得した情報（利用日は各アイテムの取得日時の欄 scrapedAt に記載。照会結果は最大30日間再利用するため、実際の利用日はそれより前の場合があります）をもとにTidy Thunder作成（項目の抽出・整形などの加工をしています）
  Gビズインフォの情報は各省庁又は掲載企業から取得した情報等をもとにしており、その内容は経済産業省・各省庁・掲載企業によって保証されたものではありません。業種には掲載企業自身が登録した情報が含まれる場合があります。

【免責】
・本Actorは中小企業庁・国税庁・経済産業省その他の行政機関が提供・運営・保証するものではありません。
・入札情報の内容は各発注機関の公告が正となります。個別の内容は各発注機関にご確認ください。公告URL・添付ファイルURLは現在有効でない場合があります。
・ポータルサイトはすべての入札情報を網羅するものではありません。
・落札者と法人番号の対応は名称による自動照合で、誤りを含む場合があります。
・公告本文・添付資料の権利は各発注機関等に帰属する場合があります。再利用の際はご自身で確認してください。
```

***

### 日本語での説明

**官公需情報ポータルサイトの検索API**（https://www.kkj.go.jp/api/ 、中小企業庁）から、国・独立行政法人・地方公共団体の新着の入札公告を取得し、1件ずつきれいな JSON で出力します。キーワード、都道府県（LgCode）、カテゴリー（物品・工事・役務）、公示種別、機関名、公告日の期間で絞り込めます。項目名は英語、値は原文（日本語）のままです。

- **用途：** 入札案件を探す営業チーム（IT・建設・物品・役務の中小企業など）が、担当地域・担当分野の新着案件を毎日受け取る。「前回までに返した案件を除く」をオンにして毎日スケジュール実行すると、新着だけが届きます。
- **出典・免責：** 上の「Sources and disclaimer / 出典・免責」の【出典】【免責】のとおりです。各出力アイテムの `dataSource`・`dataSourceUrl`、実行ログ、`RUN_SUMMARY` にも出典を記載しています。
- **英語での利用：** 入力画面は英語表記（都道府県・カテゴリー・公示種別は英語＋日本語）です。英語のキーワード（例: `system maintenance`、`cleaning`）は内蔵の用語集で日本語の検索語（`システム (保守 OR 保守点検)`、`清掃`）に変換してから API に渡します。出力には機関名・種別・都道府県・カテゴリー・公示種別・件名タグの英語欄（`organizationNameEn` など）を追加します。翻訳サービスなど外部への通信はありません。
- **API の使い方：** API のみを利用し、サイトの画面（HTML）は取得しません。リクエストは常に1本ずつ、間隔を空けて送り、1回の実行あたりのリクエスト数に上限（最大30）を設けています。
- **落札結果と落札者：** 「落札結果のみ」（`noticeType: "awardResults"`）を選ぶと、件名から入札結果・落札者決定などの公告だけを取り出し、公告文に書かれた落札者（株式会社・㈱などの法人格がある名称のみ）を `winners` に出力します。kkj API には落札者の項目がないため、抽出はベストエフォートです。
- **法人番号・所在地・業種（任意）：** 落札結果についてのみ、利用者が**ご自身の**アプリケーションIDを入力した場合に、落札者の法人番号と所在地（本店所在地）を国税庁 法人番号システム Web-API から、業種を gBizINFO API から補完します。本Actorには ID は含まれていません。ID は\*\*利用者ごとに各自で利用申請（発行届出、無料・約1か月）\*\*して取得し（https://www.invoice-kohyo.nta.go.jp/web-api/index.html ）、他人と共有しないでください（規約第9条1項5号で第三者への譲渡・貸与・開示は禁止）。取得した ID は入力 `houjinBangouAppId`（秘密入力）または環境変数 `HOUJIN_BANGOU_APP_ID`（Secret）に設定してください。照合は名称による自動照合で、誤りを含む場合があります。ID がない場合も Actor は動作し、補完をスキップした旨をログに出します。gBizINFO はトークンの申請が必要で、申請時の利用目的の範囲内でのみ利用できます。
- **出典表示（法人番号）：** 補完した各アイテムの `enrichmentSources`、実行ログ、`RUN_SUMMARY` に、【出典】の法人番号・所在地の表示（規約第6条の文言）を記載します。gBizINFO を使った場合は業種の出典も記載します。
- **個人情報：** 公告文（ProjectDescription）には担当者名・電話番号・メールアドレスが含まれるため出力しません。落札者は法人格のある名称だけを取り出し、個人事業主や代表者の氏名は取得しません。gBizINFO の代表者名も読み込みません。残す項目でもメールアドレスと電話番号は `[redacted]` に置き換えます。公告の全文は `documentUrl` から発注機関のページでご確認ください。

# Actor input Schema

## `noticeType` (type: `string`):

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.

## `keywords` (type: `array`):

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

## `translateEnglishKeywords` (type: `boolean`):

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.

## `searchIn` (type: `string`):

all = the notice title and the full notice text (API parameter Query). projectName = the notice title only (Project_Name), fewer but more precise matches.

## `prefectures` (type: `array`):

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.

## `category` (type: `string`):

Only notices in this category. Many notices have no category in the API and are excluded when you set one.

## `procedureType` (type: `string`):

Only notices with this tendering procedure.

## `organizationName` (type: `string`):

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` (type: `integer`):

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.

## `dateFrom` (type: `string`):

Earliest notice date (YYYY-MM-DD). Overrides "last N days".

## `dateTo` (type: `string`):

Latest notice date (YYYY-MM-DD). Default: today in Japan.

## `maxItems` (type: `integer`):

Stop after this many notices, newest first. 0 means no limit other than the request cap below.

## `onlyNewSinceLastRun` (type: `boolean`):

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.

## `skipReposts` (type: `boolean`):

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

## `enrichAwardWinners` (type: `boolean`):

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.

## `houjinBangouAppId` (type: `string`):

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` (type: `string`):

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` (type: `integer`):

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.

## `enrichmentDelaySecs` (type: `integer`):

Seconds between consecutive requests to the 法人番号 Web-API and to gBizINFO. Requests are never sent in parallel.

## `maxRequests` (type: `integer`):

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.

## `requestDelaySecs` (type: `integer`):

Seconds to wait between consecutive API requests. Requests are never sent in parallel.

## Actor input object example

```json
{
  "noticeType": "all",
  "keywords": [
    "system"
  ],
  "translateEnglishKeywords": true,
  "searchIn": "all",
  "prefectures": [
    "13"
  ],
  "daysBack": 3,
  "maxItems": 20,
  "onlyNewSinceLastRun": false,
  "skipReposts": true,
  "enrichAwardWinners": true,
  "maxCorporateLookups": 20,
  "enrichmentDelaySecs": 2,
  "maxRequests": 10,
  "requestDelaySecs": 5
}
```

# Actor output Schema

## `notices` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# 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 = {
    "keywords": [
        "system"
    ],
    "prefectures": [
        "13"
    ],
    "daysBack": 3,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("foreseeable_everglade/jp-tenders").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 = {
    "keywords": ["system"],
    "prefectures": ["13"],
    "daysBack": 3,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("foreseeable_everglade/jp-tenders").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 '{
  "keywords": [
    "system"
  ],
  "prefectures": [
    "13"
  ],
  "daysBack": 3,
  "maxItems": 20
}' |
apify call foreseeable_everglade/jp-tenders --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,foreseeable_everglade/jp-tenders"
        }
    }
}
```

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/X9Py4eqM5QJKGRWty/builds/4hIqC6GPkmpPYZyf0/openapi.json
