# Japan Subsidy Monitor (jGrants): changes and attachments (`northgrain-lab/jgrants-subsidy-monitor`) Actor

Japanese subsidy (hojokin) programs from the official jGrants public API, with change detection and attachment fingerprints.

- **URL**: https://apify.com/northgrain-lab/jgrants-subsidy-monitor.md
- **Developed by:** [northgrain-lab](https://apify.com/northgrain-lab) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 program rows

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 Subsidy Monitor (jGrants): changes and attachment fingerprints

Pulls Japanese national and local subsidy (hojokin) programs from the official **jGrants public API** run by Japan's Digital Agency, and turns them into one clean row per program. On top of the usual fields it adds three things: **per-round application windows in UTC and JST, a change-only mode that tells you what changed and what the previous value was, and size + SHA-256 fingerprints of the attached guideline files** (the API sends each file inside its response; the Actor hashes it and discards it).

This is an independent, unofficial tool. It is not affiliated with or endorsed by the Digital Agency or by any issuing body. The text of each program is the issuing body's text from jGrants, reformatted, with contact sections and e-mail / phone patterns removed (see below). The content is not guaranteed by the Government of Japan or by local governments.

### Read this first

- **Attribution**: every output row carries an `attribution` field. It says the source is jGrants ("出典：Jグランツ"), that the content was edited and processed by this Actor, that it was not created by the Digital Agency or any government body, and that its content is not guaranteed by the Government of Japan or by local governments. When you pass the data on or publish it, keep that text with the data (see "Source and attribution").
- **Price**: USD 0.004 per result row (USD 0.20 for 50 rows). On a free plan the rows returned are capped: at most 10 rows in `all` mode, and in `changes_only` mode at most 10 new or changed rows plus at most 10 `no_longer_listed` rows (see "How it behaves"). Not yet confirmed on Apify.
- **Usage**: enter search words and run. You get one row per counted program from the results of the official search, up to the `maxItems` cap (see "How it behaves"; by default the search is limited to programs inside an application period). The Actor waits at least 7 seconds between requests to the official API. In the test of 2026-10-12, 170 programs with details took about 21 minutes.
- **Terms**: the table "jGrants Web-API terms of use and this Actor" lists the clauses of the jGrants Web-API terms of use and what the Actor does for each. When you run the Actor, your run uses the Web-API too. Read the original terms yourself.

### What you get

- One row per program (a "subsidy" in jGrants), keyed by `subsidy_id`.
- Application window as UTC and as JST (+09:00) timestamps, a computed `status`, and `days_left`.
- Maximum amount, subsidy rate (as the issuer wrote it), target areas, employee-size class, purposes, industries.
- Every application round with its own window and project end date.
- Attachments listed by category with file name, size in bytes and SHA-256. A different SHA-256 means the file content differs.
- A plain-text summary with the HTML removed, plus the links found in it.
- In `changes_only` mode: `change_type` (`new`, `changed`, `no_longer_listed`), `changed_fields`, and `previous_values`.

### Input

| Field | Default | Meaning |
| --- | --- | --- |
| `keywords` | `["補助金"]` | Search words sent to jGrants (2 to 255 characters; the Actor checks this before the run). The only keyword used in the tests described in this README (the 170-program test and the sample run) was "補助金"; results for English or other keywords have not been checked. Several keywords are merged and de-duplicated by program ID. |
| `area`, `employees`, `industry`, `purpose` | empty | Optional filters, one value each. They are passed to the official jGrants search as they are; how the API narrows the results is up to the API (not tested in this Actor). |
| `onlyAcceptingNow` | `true` | On: the official search is asked only for programs inside an application period. Off: the search is not limited that way. What the API returns when this is off was not tested. |
| `sortBy` | `deadline` | `deadline`, `start_newest` or `amount_desc`. Sorting is done inside the Actor. |
| `maxItems` | `10` (the input definition allows up to 5000) | The cap for one run, on the programs counted and on the rows returned. A program is counted once its detail has been fetched; a program without a usable detail is skipped and not counted. Details are in "How it behaves". |
| `includeDetail` | `true` | One extra request per program for summary, rate, rounds and attachments. Off = list fields only. |
| `mode` | `all` | `all` returns one row per counted program, so at most `maxItems` rows. `changes_only` returns only new, changed or no-longer-listed programs. |
| `stateKey` | `default` | Name of the memory used by `changes_only`. Use one name per watch list. |
| `requestIntervalSeconds` | `7` | Pause between requests to the official API, in whole seconds (7 to 60). Values outside that range (below 7 or above 60) are rejected before the run starts. |

### Output

Trimmed real row (here, some fields inside `rounds`, the second item of `summary_links`, the end of `summary_text` and the English part of `attribution` are cut; the dataset has them in full):

```json
{
  "subsidy_id": "a0W2x000007Cos5EAC",
  "subsidy_number": "S-00003073",
  "title": "［第六回以降］事業再構築補助金（共同申請者）",
  "scheme_name": "事業再構築補助金",
  "status": "open",
  "days_left": 0,
  "acceptance_start_utc": "2022-09-15T09:00:00Z",
  "acceptance_end_utc": "2026-10-12T14:59:00Z",
  "acceptance_end_jst": "2026-10-12T23:59:00+09:00",
  "max_amount_jpy": 150000000,
  "subsidy_rate_text": "公募要領をご確認ください。",
  "areas": ["全国"],
  "employee_limit": "従業員数の制約なし",
  "purposes": ["新たな事業を行いたい", "販路拡大・海外展開をしたい", "設備整備・IT導入をしたい"],
  "accepting_applications": true,
  "rounds": [{ "round_id": "a0X2x000003guGwEAI", "acceptance_end_jst": "2026-10-12T23:59:00+09:00", "project_end_deadline_jst": "2026-10-12T23:59:00+09:00" }],
  "attachments": [],
  "summary_text": "第六回以降の共同申請者専用サイトです。\n\n■目的・概要\n本事業は、新型コロナウイルス感染症の影響が長期化し、 …",
  "summary_links": [{ "text": "https://jigyou-saikouchiku.go.jp/documents.html", "url": "https://jigyou-saikouchiku.go.jp/documents.html" }],
  "contact_sections_removed": 1,
  "portal_url": "https://www.jgrants-portal.go.jp/subsidy/a0W2x000007Cos5EAC",
  "source": "jGrants public API (Digital Agency, Japan)",
  "attribution": "出典：Jグランツ（https://www.jgrants-portal.go.jp）。このコンテンツは、政府公式の補助金申請システム jGrants の Web-API 機能を利用して取得した情報をもとに、本 Actor が編集・加工して作成したものです。国・自治体・デジタル庁が作成したものではありません。コンテンツの内容は日本国政府及び自治体によって保証されたものではありません。 / Source: jGrants (https://www.jgrants-portal.go.jp). … (the same statements in English)",
  "fetched_at": "2026-10-11T17:20:40Z"
}
```

Other fields: `acceptance_start_jst`, `catch_phrase`, `industries`, `grant_type`, `request_reception_text`, `multiple_applications_allowed`, `contact_patterns_removed`, `has_detail`, `source_spec_url`, and in `changes_only` mode `change_type`, `changed_fields`, `previous_values` (on a `new` row `changed_fields` is an empty array and `previous_values` an empty object; confirmed on the 10 rows of a first run against the live API). The `no_longer_listed` rows of `changes_only` mode carry the same `attribution`.

Notes on the values, so you do not misread them:

- `scheme_name` is the program scheme name. The official API calls this field `institution_name`, but it holds the name of the scheme, not the issuing organisation.
- `max_amount_jpy` is `0` when the source says 0. The saved text of the official API documentation page does not say what 0 means, so treat it as "not stated", not "no money".
- `status` comes from the application window dates. `accepting_applications` comes from the `request_reception_presence` field of the API: `true` when its value is "有" (yes), `false` for any other value, and empty when the field is absent. The two are worked out separately and can disagree. Read both.
- `grant_type` can be empty (`null`): it is empty when the API sends no value for it, and always when `includeDetail` is off.
- Text fields are in Japanese, as published. Area, industry and purpose values are the labels the API sends.

### Source and attribution

The data comes from jGrants, run by Japan's Digital Agency. This Actor is independent and is not created or endorsed by the Digital Agency or any government body.

The `attribution` field of every row (including `no_longer_listed` rows) holds the following statement in Japanese, followed by the same statements in English:

> 出典：Jグランツ（https://www.jgrants-portal.go.jp）。このコンテンツは、政府公式の補助金申請システム jGrants の Web-API 機能を利用して取得した情報をもとに、本 Actor が編集・加工して作成したものです。国・自治体・デジタル庁が作成したものではありません。コンテンツの内容は日本国政府及び自治体によって保証されたものではありません。
>
> Source: jGrants (https://www.jgrants-portal.go.jp). This content was edited and processed by this Actor from information obtained through the Web-API of jGrants, the Japanese government's official subsidy application system. It was not created or endorsed by the Digital Agency or any government body. The content is not guaranteed by the Government of Japan or by local governments.

When you hand the output to other people, or show it on a site, in an app or in a report:

- Keep this statement next to the data. If it is hard to attach to every row, place it once where readers can see it.
- "This Actor" refers to the processing done by this Actor. If you edit or process the data further before showing it, add your own statement about that, separate from this one. Do not present the data as if the government or a local government had made it.
- If you summarise the data, keep the point that the content is not guaranteed by the government or local governments.

### jGrants Web-API terms of use and this Actor

The jGrants Web-API terms of use (PDF, 4 pages) were retrieved and read on 2026-10-11. URL: https://fs2.jgrants-portal.go.jp/API利用規約.pdf . The "gist of the clause" column below is a summary, not the original text. The terms apply to a beta feature and may be amended without notice (Article 9). This table is not legal advice and says nothing about whether any particular use is allowed.

| Article | Gist of the clause | What this Actor does (version 0.2) |
| --- | --- | --- |
| 5-1 (1) | When you provide a service that uses the feature, state the source (example: "出典：J グランツ"). | Every row's `attribution` starts with "出典：Jグランツ" and the portal URL. |
| 5-1 (2) | When you edit or process the content, say so separately from the source. Do not publish or use it as if the state (a ministry etc.) had made it. The sample wording ends with "コンテンツの内容は日本国政府及び自治体によって保証されたものではありません" (the content is not guaranteed by the Government of Japan or by local governments). | The same field says the content was edited and processed, that it was not created by the Digital Agency or any government body, and carries the not-guaranteed sentence. It does not name an operator; it says "本 Actor" (this Actor). |
| 5-2 | Some content may carry third-party rights. For content that states third-party rights (example: a rights notice in application guidelines), unless it is stated to be cleared, the user must obtain permission from that third party. | The bodies of attached files (guidelines, forms) are not stored, returned or redistributed. Only category, file name, size in bytes and SHA-256 are returned. The summary text is the issuer's published text, reformatted. If it carries a rights notice, check it yourself before reusing it. |
| 5-5 (2) | No access in a short time in large volume, and nothing else that hinders the operation of the feature (the terms give no number of requests or interval). | All requests go through one queue, one at a time, with at least 7 seconds plus a 0.05-second margin between sends. The floor is 7 seconds and cannot be lowered by input. After three 403 or 429 answers in a row the run stops. The interval is kept inside one run. If you start several runs at once, the total request rate rises accordingly. |
| 7 | The feature is a beta and may be stopped, paused or interrupted without notice; use may be restricted when it is concentrated. | A 403 or 429 answer is followed by a wait and a retry, and three such answers in a row stop the run with an error. A 5xx answer or a network error is retried too, and the run ends with an error if the third attempt fails. A single request is tried at most 3 times. |
| 9 | The terms may be amended without notice; using the feature after an amendment is published counts as agreeing to it. | The version read is the one retrieved on 2026-10-11. Later amendments are not reflected in this table. |

The terms also contain a representation that the user is not an anti-social force (Article 5-3), a provision that disputes with third parties arising from a service built on the content are the user's own responsibility (5-4), a disclaimer by the operator of the feature (8), and a rule that inquiries are made in Japanese (11).

### Personal data

Summaries published by issuers can include a contact section, which may name staff members. This Actor treats a line of up to 40 characters that begins with one of ■ ◆ ● ▼ ◇ □ 【 ＜ as a heading, and a heading that contains an inquiry or contact word (問合せ, 問い合わせ and similar spellings, 連絡先, 相談窓口) as the start of a contact section. From that heading it removes the text up to the line before the next line that begins with ■. Other headings in between (for example 【 or ＜ headings) are removed with it. If no later line begins with ■, the removal runs to the end of the text, so text that is not a contact section can be removed too. Outside such sections it removes e-mail address shapes (including the forms written with \[at] or (at)) and hyphenated phone-number shapes that start with 0 (full-width ０ too). A removed section is replaced by the marker `[contact section removed]`, and the counts are kept in `contact_sections_removed` and `contact_patterns_removed`. It does not return the original HTML.

This is rule-based and works by shape. It cannot tell a personal name from other text. A personal name written outside a contact section, the postal address of an organisation, and e-mail addresses or phone numbers written in a shape the rules do not cover (for example a phone number without hyphens) can remain. Do not assume the text is free of personal data. In the 170-program test of 2026-10-12, a contact section was removed from 165 of the 170 rows; 5 rows had no section removed (see "What was and was not tested" for how the files relate to that test). For contact details use `portal_url` and the issuer's own pages.

### How it behaves

- Of the jGrants public API, only the list endpoint and the program detail endpoint (v2) are called. No login, no browser, no scraping of web pages.
- One request at a time. By default the Actor waits at least 7 seconds between requests; 7 is also the lowest value you can set. The test of 2026-10-12 with details for 170 programs took 172 requests (1 list, 170 details, 1 retry after a 429) and 20.8 minutes from the first recorded request to the last. The API sends attachments inside the detail response (in the same test the mean was 1.2 MB and the largest 16.6 MB; about 210 MB received in one run; 1 MB = 1,048,576 bytes). Memory is configured for at least 512 MB, but the actual memory use on Apify has not been measured (not confirmed). If the API answers 403 or 429 three times in a row, the run stops. A single answer is followed by a wait and a retry (in the test there was one 429, and the retry after waiting succeeded).
- About how the interval was measured: the run time above and the smallest gap between requests (7,050 ms over all 343 requests; none shorter; the 22-request run that produced the output samples also had a smallest gap of 7,050 ms) were calculated from times recorded by the local pass-through just before it sent each request to the official API. They may differ from the time a request actually left onto the network (the size of the difference was not measured).
- By default the Actor sends its requests to the official API host (api.jgrants-portal.go.jp); the environment variable `JGRANTS_API_BASE` (read in `src/api.js`) can replace that address. The 170-program test sent 343 requests to the official API, counting the second fetch used for the comparison, and the run that produced the output samples sent 22; all of them went to that host. The saved copy of that host's `robots.txt` is a 404 error page with no rules. The `robots.txt` of the portal (www.jgrants-portal.go.jp) disallows everything except `/index.html`; this Actor does not fetch portal pages (`portal_url` is only written into the output).
- There is no code that goes to fetch attachment bodies. The API sends them inside the detail response; the Actor turns them into a byte count and a SHA-256 in memory and discards them. They are not stored or returned.
- The `maxItems` cap: a program is counted once its detail has been fetched (with `includeDetail` off, once it is taken from the list sorted by `sortBy`). When the count reaches `maxItems`, the Actor takes no further programs. If a detail request ends without a usable detail (for example a 404, or an answer with an empty result), that program is skipped, is not counted and gets no row, so the number of detail requests can be larger than `maxItems`. In `changes_only` mode, programs without a change are counted but not returned. Rows returned: in `all` mode at most `maxItems`; in `changes_only` mode at most `maxItems` new or changed rows, plus at most `maxItems` `no_longer_listed` rows (counted separately).
- On a free plan (the Actor treats a run as free when the environment variable `APIFY_USER_IS_PAYING` is not `1`), a `maxItems` above 10 is replaced by 10. So in `all` mode at most 10 rows are returned; in `changes_only` mode at most 10 new or changed rows, plus at most 10 `no_longer_listed` rows, up to 20 rows in all. Whether this check works as intended on Apify has not been confirmed.
- If the official list comes back empty, `changes_only` does not report every program as "no longer listed" and keeps its previous memory.
- With `changes_only`, the first run reports the counted programs (at most `maxItems`) as `new`. Changing the keywords or filters resets the memory for that `stateKey`.

### Pricing

Pay per result: USD 0.004 per row returned (see the price on this page). The Actor is built to charge per row pushed to the dataset, not per request. In `changes_only` mode unchanged programs are not returned and, by design, not charged. The billing behaviour has not yet been confirmed on Apify.

### What was and was not tested

Tested against the live API: on 2026-10-12 (JST), the list for the keyword "補助金" with the "accepting now" filter and the detail of all 170 programs on it, fetched once at a 7-second interval (`mode` `all`, with details). The output was compared on 28 fields with a second fetch of the same programs from the same API, and 170 of 170 programs matched. For 64 of the 170, the detail response had not been used in an earlier test or replay (they were not among the 100 programs of the previous run, the 6 programs set aside, or the 1 program used as a test detail). Those 64 programs had appeared in a list recorded earlier, so they are "detail response unused", not "program seen for the first time" (programs seen for the first time: 0). 64 of the 64 matched. The comparison code was written by the same person who wrote the Actor, so it is not a third-party check. The second fetch ran between 20.2 and 20.9 minutes after the first fetch of each program (minimum and maximum over the 170 programs). A program can change between the two fetches; the design counts that as a separate kind of mismatch, and there were 0.

To take the output samples, the Actor was run twice in small runs against the live API between 02:20 and 02:23 on 2026-10-12 (JST): 22 requests in total, all answered 200, none 429 or 403. The first run used `mode` `all`: it returned 10 rows, and the run summary shows `free_trial_cap_applied` as `true` (11 requests). The second was a first `changes_only` run: it returned 10 rows, and every `change_type` was `new` (11 requests). Both used details and a 7-second interval, and both went through the same local pass-through.

The 170-program test and the sample run both went through a local pass-through that put the requests to the official API into one queue and recorded their times and counts. The records of both runs contain requests of two kinds only, list and detail, all to the official API host (343 records for the 170-program test, 22 for the sample run). Both used a test setting that replaces the API address (`JGRANTS_API_BASE`, read in `src/api.js`).

Among the files in `src/`, only `src/transform.js` differs between a file list with SHA-256 values taken just before the 170-program test started and the files published here. The 170-program test has not been repeated.

Not tested against the live API: the `area`, `employees`, `industry` and `purpose` filters, `onlyAcceptingNow` off, request intervals other than 7 seconds, and the second and later runs of `changes_only` (detection of `changed` and `no_longer_listed`). That change detection was exercised with a local stand-in for the API, not with the live one. Whether Apify sets the environment variable `APIFY_USER_IS_PAYING` as this Actor expects has not been confirmed. The Actor has not been run on Apify yet (build, memory and billing are untested).

### Limits

- Coverage is whatever jGrants lists. It is not a complete list of Japanese subsidies.
- Text and numbers are the issuers' own and can be wrong or out of date. Always confirm in the official guideline (`公募要領`) before applying. This is not legal, tax or application advice.
- The saved text of the official API documentation page does not publish a rate limit or reuse terms. The rules on access (Article 5-5) and on stating the source and processing (Article 5-1) are in the separate API terms of use, which were retrieved and read on 2026-10-11 (see the table above). The terms give no number of requests or interval. This Actor does not go below its default interval, and you should not start several runs at the same time. The terms may be amended without notice, so read both the jGrants portal's terms of use and the API terms yourself.
- The jGrants API is a beta and can be stopped or restricted without notice (Article 7). What the Actor does then is in the Article 7 row of the table above.

# Actor input Schema

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

Each keyword is sent to the official jGrants search (2 to 255 characters; the Actor checks this before the run). Results of all keywords are merged and de-duplicated by program ID.

## `area` (type: `string`):

Passed as it is to the official jGrants search as the area filter (one value). How the API narrows the results is up to the API (not tested in this Actor).

## `employees` (type: `string`):

Passed as it is to the official jGrants search as the employee-count filter (one value). How the API narrows the results is up to the API (not tested in this Actor).

## `industry` (type: `string`):

Passed as it is to the official jGrants search as the industry filter (one value). How the API narrows the results is up to the API (not tested in this Actor).

## `purpose` (type: `string`):

Passed as it is to the official jGrants search as the purpose filter (one value). How the API narrows the results is up to the API (not tested in this Actor).

## `onlyAcceptingNow` (type: `boolean`):

On: the official search is asked only for programs inside an application period. Off: the search is not limited that way. What the API returns when this is off was not tested.

## `sortBy` (type: `string`):

The order in which programs are processed and returned. The sort is done inside this Actor.

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

The cap for one run, on the programs counted and on the rows returned. A program is counted once its detail has been fetched (if "Fetch program details" is off: once it is taken from the sorted list). A program whose detail request returns no usable detail is skipped and not counted, so the number of detail requests can exceed this value. In "all" mode at most this many rows are returned. In "changes_only" mode programs without a change are counted but not returned: at most this many new / changed rows plus at most this many "no longer listed" rows are returned. If the environment variable APIFY_USER_IS_PAYING is not 1 and this value is above 10, the Actor uses 10.

## `includeDetail` (type: `boolean`):

On: one extra request per program for summary text, rate, rounds and attachment fingerprints. Off: list fields only (fewer requests, but no summary, rate, rounds or attachments).

## `mode` (type: `string`):

all: return one row per counted program, up to the number set in "Maximum programs". changes_only: remember the previous run (see "State name") and return only programs that are new, changed, or no longer listed, with the changed fields and their previous values.

## `stateKey` (type: `string`):

Used by "changes_only". Runs with the same name share one memory of the previous run; use different names for different watch lists.

## `requestIntervalSeconds` (type: `integer`):

Pause between requests to the official API, in whole seconds. The jGrants API terms (Article 5-5) prohibit heavy access in a short time. The minimum accepted value is 7, and 7 is the default. The Actor waits at least this many seconds between requests.

## Actor input object example

```json
{
  "keywords": [
    "補助金"
  ],
  "area": "",
  "employees": "",
  "industry": "",
  "purpose": "",
  "onlyAcceptingNow": true,
  "sortBy": "deadline",
  "maxItems": 10,
  "includeDetail": true,
  "mode": "all",
  "stateKey": "default",
  "requestIntervalSeconds": 7
}
```

# Actor output Schema

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

Dataset items: one row per program (in changes-only mode, one row per new, changed or no-longer-listed program).

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

Counts for this run: emitted rows, skipped unchanged programs, whether the list was cut at the item limit, and requests made.

# 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": [
        "補助金"
    ],
    "onlyAcceptingNow": true,
    "maxItems": 10,
    "includeDetail": true,
    "mode": "all",
    "requestIntervalSeconds": 7
};

// Run the Actor and wait for it to finish
const run = await client.actor("northgrain-lab/jgrants-subsidy-monitor").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": ["補助金"],
    "onlyAcceptingNow": True,
    "maxItems": 10,
    "includeDetail": True,
    "mode": "all",
    "requestIntervalSeconds": 7,
}

# Run the Actor and wait for it to finish
run = client.actor("northgrain-lab/jgrants-subsidy-monitor").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": [
    "補助金"
  ],
  "onlyAcceptingNow": true,
  "maxItems": 10,
  "includeDetail": true,
  "mode": "all",
  "requestIntervalSeconds": 7
}' |
apify call northgrain-lab/jgrants-subsidy-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,northgrain-lab/jgrants-subsidy-monitor"
        }
    }
}
```

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/B4Cg7eGaucAHWvfl0/builds/MguQr5rfUpLWHT75O/openapi.json
