# France Drug Shortage API — ANSM Stock-outs & Alerts (`jet_mythology/france-drug-shortages`) Actor

Which medicines are out of stock in France right now? The official ANSM list as clean JSON: drug, CIP13, holder, dates, back-in-stock date and MITM flag. Check your product list or get an alert when a status changes.

- **URL**: https://apify.com/jet_mythology/france-drug-shortages.md
- **Developed by:** [jet_mythology](https://apify.com/jet_mythology) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 drug status returneds

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

## France Drug Shortage API — ANSM Stock-outs & Alerts

**Which medicines are out of stock or under supply tension in France right now — and which ones you stock?** Paste your CIP13 codes or schedule a daily run to be alerted when a status changes.

**No code needed:** click *Start*, then download the results as **Excel, CSV or JSON**, or send them to Google Sheets, Make, Zapier or n8n. Developers can call it as an **API** or schedule it daily.

### Sample output

```json
{
  "statusLabel": "Rupture de stock",
  "drugName": "LARIAM 250 mg, comprimé sécable",
  "holders": [
    "CHEPLAPHARM ARZNEIMITTEL (ALLEMAGNE)"
  ],
  "startDate": "2026-06-25",
  "updatedAt": "2026-10-08",
  "availableAgainDate": null,
  "majorTherapeuticInterest": true,
  "ansmUrl": "https://ansm.sante.fr/disponibilites-des-produits-de-sante/medicaments/lariam-250-mg-comprime-secable-mefloquine"
}
```

*Real result from 8 October 2026 (abridged).*

### Details

Get the **official list of medicines in stock-out, supply tension, discontinued or back in stock in France**, published by the ANSM (French medicines agency), as clean JSON: drug name, presentation and **CIP13 code**, marketing authorisation holder, start and update dates, "back in stock" date, major-therapeutic-interest (MITM) flag and the ANSM notice link.

### Who uses it

- **Pharmacies and pharmacy groups**: check your product list by CIP13 and get an alert when a drug runs out or comes back.
- **Wholesalers, hospital pharmacies and procurement**: anticipate substitutions.
- **Healthtech and pharmacy software vendors**: show availability warnings in your product.
- **Journalists and researchers**: track shortages over time by laboratory or therapeutic class.

### What you get

| Field | Description |
|---|---|
| `status`, `statusLabel` | `shortage`, `supply-tension`, `discontinued`, `available-again` |
| `drugName`, `form`, `routes` | Medicine name, pharmaceutical form, routes |
| `cis`, `cip13`, `cip7`, `presentation`, `scope` | Identifiers; `scope` = one presentation or all presentations |
| `holders` | Marketing authorisation holder(s) |
| `startDate`, `updatedAt`, `availableAgainDate` | Dates of the status |
| `majorTherapeuticInterest`, `atcCode` | MITM flag and ATC code |
| `ansmUrl` | Official ANSM notice |
| `changeType`, `previousStatus` | Monitor mode: `new`, `status-changed`, `updated`, `no-longer-listed` |

### Examples

**All current stock-outs and tensions**

```json
{ "statuses": ["shortage", "supply-tension"] }
```

**Check a pharmacy's product list**

```json
{ "codes": ["3400930000011", "3400930000028"], "statuses": ["shortage", "supply-tension", "discontinued", "available-again"] }
```

**Daily alert on antibiotics (ATC J01), including "back in stock"**

```json
{ "atcPrefixes": ["J01"], "monitorChanges": true, "monitorKey": "antibiotics" }
```

### Pricing

Pay per result: you pay for each entry returned. In monitor mode you only pay for changes. Set a maximum cost per run to cap spending.

### Good to know

- Source files are those of the Base de Données Publique des Médicaments, which mirrors the ANSM availability information.
- ATC codes come from the list of medicines of major therapeutic interest, so the ATC filter only returns MITM medicines.
- In monitor mode every status is tracked, so a medicine going from "shortage" to "back in stock" is reported as a change.

### Source and licence

ANSM / Base de Données Publique des Médicaments (base-donnees-publique.medicaments.gouv.fr), reused under the Licence Ouverte (Etalab). Each record carries its official update date. This Actor is independent and not affiliated with the ANSM or the French administration. It provides information, not medical or pharmaceutical advice.

# Actor input Schema

## `statuses` (type: `array`):

Which availability statuses to return.

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

e.g. 'amoxicilline', 'paracétamol', 'insuline'.

## `holders` (type: `array`):

Partial match on the laboratory name.

## `atcPrefixes` (type: `array`):

e.g. 'J01' (antibacterials). ATC codes come from the MITM list, so this keeps MITM drugs only.

## `mitmOnly` (type: `boolean`):

Keep only medicines of major therapeutic interest.

## `updatedWithinDays` (type: `integer`):

Only entries updated (or started) recently.

## `codes` (type: `array`):

Paste CIS (8 digits), CIP7 or CIP13 codes, e.g. a pharmacy's product list.

## `maxResults` (type: `integer`):

Upper limit of entries output (and charged) per run.

## `monitorChanges` (type: `boolean`):

Remembers the previous run and outputs only new entries, status changes (e.g. back in stock) and entries that left the list. Schedule it daily.

## `monitorKey` (type: `string`):

Use one name per saved search you monitor.

## `monitorFirstRun` (type: `string`):

What to do the first time a monitor runs.

## Actor input object example

```json
{
  "statuses": [
    "shortage",
    "supply-tension"
  ],
  "mitmOnly": false,
  "maxResults": 1000,
  "monitorChanges": false,
  "monitorKey": "default",
  "monitorFirstRun": "outputAll"
}
```

# Actor output Schema

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

No description

## `summary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("jet_mythology/france-drug-shortages").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("jet_mythology/france-drug-shortages").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 '{}' |
apify call jet_mythology/france-drug-shortages --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jet_mythology/france-drug-shortages"
        }
    }
}
```

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/6UPtIqpah7ts7s9j7/builds/mQ8BatnNr2ngxXAO0/openapi.json
