# Japan Drug Supply Status — Shortages by YJ Code (MHLW) (`vespa-zzz/jp-drug-supply-status`) Actor

Limited shipment, supply suspension and recovery of prescription drugs in Japan from the MHLW supply-status list. Look up YJ codes or ingredients, or monitor changes.

- **URL**: https://apify.com/vespa-zzz/jp-drug-supply-status.md
- **Developed by:** [Vespa ZZZ](https://apify.com/vespa-zzz) (community)
- **Features:** 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 Drug Supply Status — Shortages by YJ Code (MHLW)

Track **limited shipments (限定出荷), supply suspensions (供給停止) and recoveries** of prescription drugs in Japan.
The Actor reads the official supply-status list that the Ministry of Health, Labour and Welfare (MHLW) publishes and
updates regularly (about 16,000 products), normalises the Japanese status labels and returns one clean row per product.

Typical users: pharmacy chains, hospitals, wholesalers, pharma supply-chain and market-access teams, and AI agents that
need to answer "is this drug available?" for Japan.

### What you can do

- **Look up your formulary** by YJ code (個別医薬品コード) — up to 2,000 codes per run. Medical gases are listed by MHLW
  with codes of the form `X00110`; these are accepted too.
- **Search by ingredient or product name** (アセトアミノフェン, アモキシシリン …; full-/half-width insensitive).
- **List current shortages**: filter by shipment status (normal / limited / suspended) and drug category (internal / external / injection).
- **Monitor changes**: with `onlyNew`, each run returns only products that are new or whose status, reason, outlook or dates changed since the previous run — including products going **back to normal shipment**. Schedule it daily or weekly and connect it to e-mail, Slack or your own system.
- Keep only rows MHLW marked as updated in its latest release (`onlyUpdatedInLatest`).

### Input examples

Formulary check:

```json
{ "yjCodes": ["4419002B1033", "631301AS1024"] }
```

All injectables currently in limited shipment or suspended:

```json
{ "drugCategories": ["injection"], "shipmentStatuses": ["limited", "suspended"], "maxItems": 5000 }
```

Weekly change monitor for an ingredient list:

```json
{ "keywords": ["アセトアミノフェン", "カルボシステイン"], "onlyNew": true, "stateKey": "analgesics" }
```

In monitoring mode, `shipmentStatuses` applies to products seen for the first time; later changes of any watched product
(for example a limited product returning to normal) are always reported. The first run reports all matching products as
`new` and records the rest as a baseline.

### Output example

```json
{
  "yjCode": "4419002B1033",
  "productNameJa": "ポララミン散１％",
  "ingredientNameJa": "ｄ－クロルフェニラミンマレイン酸塩",
  "strengthJa": "１％１ｇ",
  "drugCategoryJa": "1：内用薬",
  "therapeuticClassJa": "抗ヒスタミン剤",
  "manufacturerJa": "高田製薬",
  "productTypeJa": "5：その他医薬品",
  "isBasicDrug": false,
  "stableSupplyCategory": null,
  "nhiListed": true,
  "nhiListedDate": "1976-09-01",
  "shipmentStatus": "limited",
  "limitedReason": "own_circumstances",
  "shipmentStatusJa": "②限定出荷（自社の事情）",
  "shipmentStatusUpdatedDate": "2026-08-26",
  "reason": "other",
  "reasonJa": "８．その他の理由",
  "resolutionOutlook": "undecided",
  "resolutionOutlookJa": "ウ. 未定",
  "resolutionNoteJa": null,
  "shipmentVolume": "decreased",
  "shipmentVolumeJa": "B．出荷量減少",
  "volumeImprovementTimingJa": null,
  "volumeImprovementAmount": null,
  "otherInfoUpdatedDate": "2026-08-26",
  "updatedInLatestRelease": false,
  "publicationDate": "2026-11-20",
  "sourceFileUrl": "https://www.mhlw.go.jp/content/10800000/261120iyakuhinkyoukyu.xlsx",
  "source": "Ministry of Health, Labour and Welfare (MHLW), Japan — 医療用医薬品供給状況 …"
}
```

Monitoring rows also carry `changeType` (`new` / `changed`), `previousShipmentStatusJa` and `previousShipmentVolumeJa`.
A product counts as changed when any of these differ from the previous run: product name, manufacturer, stable-supply
category, NHI listing and date, shipment status and its update date, reason, outlook and outlook note, shipment volume,
volume improvement timing and amount, and the date of other updates.

Normalised values:

| Field | Values |
|---|---|
| `shipmentStatus` | `normal`, `limited`, `suspended` (if MHLW introduces a new label the run fails with a clear message instead of guessing) |
| `limitedReason` | `own_circumstances`, `other_products_impact`, `other` |
| `reason` | `demand_increase`, `raw_materials`, `manufacturing_problem`, `quality_problem`, `regulatory_action`, `nhi_delisting`, `other` |
| `resolutionOutlook` | `expected`, `not_expected`, `undecided` |
| `shipmentVolume` | `increased`, `normal`, `decreased`, `stopped`, `delisting_planned` |

Missing values are `null`. Dates are `YYYY-MM-DD`. The run summary (key-value store record `RUN_SUMMARY`) shows the file date,
the number of products, YJ codes that were not found, and whether the run stopped at `maxItems` or a spending limit.

### Data source and terms

- Source: 厚生労働省ウェブサイト「医療用医薬品供給状況」
  (https://www.mhlw.go.jp/stf/seisakunitsuite/bunya/kenkou_iryou/iryou/kouhatu-iyaku/04_00003.html).
- The content is reused under the MHLW terms of use (Public Data License 1.0 / PDL1.0). **This Actor processes the data**
  (column mapping, normalised codes, date conversion, removal of any e-mail addresses or phone numbers from free-text notes);
  the processed output is not published by MHLW.
- The list reflects what manufacturers report to MHLW and may lag actual availability at wholesalers or pharmacies.
  It is not medical advice. Check with the manufacturer or your wholesaler before making clinical or purchasing decisions.
- This Actor is not affiliated with or endorsed by MHLW.
- One run downloads the official page and one workbook (about 1.5 MB), with a pause between requests.

### 日本語の概要

厚生労働省が公表する「医療用医薬品供給状況」の一覧（約1.6万品目）から、限定出荷・供給停止・通常出荷への復帰を
YJコード・成分名・出荷区分で取得します。監視モード（`onlyNew`）では、前回実行から区分や見込み、更新日が変わった品目だけを
出力します。出典: 厚生労働省ウェブサイト（PDL1.0）。本 Actor で列の整形・区分の正規化・日付変換などの加工を行っています。

# Actor input Schema

## `yjCodes` (type: `array`):

12-character YJ codes (個別医薬品コード) of the products you want, e.g. your formulary. Medical gases use codes of the form X00110. Leave empty to search the whole list (about 16,000 products).

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

Japanese ingredient or product names (成分名・品名). Full-width and half-width characters are treated alike, e.g. アセトアミノフェン, アモキシシリン.

## `shipmentStatuses` (type: `array`):

Report only products with these shipment statuses: normal (通常出荷), limited (限定出荷), suspended (供給停止). Empty = all. In monitoring mode this applies to newly seen products only; later changes of a watched product (for example back to normal) are always reported.

## `drugCategories` (type: `array`):

internal (内用薬), external (外用薬), injection (注射薬). Empty = all.

## `onlyUpdatedInLatest` (type: `boolean`):

Keep only rows MHLW marks as "New" (updated in the latest file). Cannot be combined with monitoring mode.

## `onlyNew` (type: `boolean`):

Compare with the previous run that used the same state key and output only products that are new or whose status, outlook or dates changed. Each changed row carries changeType and the previous shipment status. Schedule it daily or weekly.

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

Name of the saved state for monitoring mode. Use different keys for different watch lists. Letters, digits, - and \_ only. Do not run two monitors with the same key at the same time.

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

Maximum number of rows to output in one run.

## Actor input object example

```json
{
  "yjCodes": [
    "4419002B1033",
    "631301AS1024"
  ],
  "shipmentStatuses": [
    "limited",
    "suspended"
  ],
  "onlyUpdatedInLatest": false,
  "onlyNew": false,
  "stateKey": "default",
  "maxItems": 1000
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `results` (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 = {
    "yjCodes": [
        "4419002B1033",
        "631301AS1024"
    ],
    "shipmentStatuses": [
        "limited",
        "suspended"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vespa-zzz/jp-drug-supply-status").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 = {
    "yjCodes": [
        "4419002B1033",
        "631301AS1024",
    ],
    "shipmentStatuses": [
        "limited",
        "suspended",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("vespa-zzz/jp-drug-supply-status").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 '{
  "yjCodes": [
    "4419002B1033",
    "631301AS1024"
  ],
  "shipmentStatuses": [
    "limited",
    "suspended"
  ]
}' |
apify call vespa-zzz/jp-drug-supply-status --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vespa-zzz/jp-drug-supply-status"
        }
    }
}
```

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/EgS5hvhlKdmOMXeCE/builds/z3rbQMFbW2AQv785f/openapi.json
