# Swissmedic Human Medicine Recall Bulletin (`thatmike1/ch-swissmedic-batch-recalls`) Actor

Export the current first page of Swissmedic human medicine batch recalls, including original-language titles, batch-summary text, source dates and coverage limits.

- **URL**: https://apify.com/thatmike1/ch-swissmedic-batch-recalls.md
- **Developed by:** [Michal Pšenčík](https://apify.com/thatmike1) (community)
- **Categories:** Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00005 / actor start

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

## Swissmedic Human Medicine Recall Bulletin

Export the current first page of the [Swissmedic human medicine batch-recall listing](https://www.swissmedic.ch/swissmedic/en/home/humanarzneimittel/market-surveillance/qualitaetsmaengel-und-chargenrueckrufe/batch-recalls.html) as one dated, hashed JSON bundle: every notice's URL, publication date, original-language title and batch-summary text, plus the source's own reported total and whether it advertises a second page.

It suits a pharmacy wholesaler, hospital pharmacy or procurement integration that polls the national bulletin daily and routes new notices to a recall-review queue. The bundle is a snapshot of what Swissmedic published on its first listing page. It is not proof that a specific stock item is recalled, and it does not interpret the notices.

This Actor is independent of Swissmedic.

### Input

```json
{ "requestIntervalMs": 1500 }
```

- `requestIntervalMs` (integer, 1300 to 10000, default 1500): idle time after every Swissmedic response before the next request. A run fetches the one fixed listing page, so the interval only matters when a retry or redirect happens.

Empty input uses the default. Unknown fields and non-integers are rejected before any request. There is nothing to filter: every run reads the same fixed page.

### Output

Each successful run stores exactly **one dataset item**: the complete bundle for that page. A run that fails before delivery (invalid input, a source error, a layout change) stores nothing. The one exception is `delivery_uncertain`, described under Coverage and limits.

```json
{
    "schemaVersion": "1",
    "sourceId": "swissmedic-human-batch-first-page",
    "sourceUrl": "https://www.swissmedic.ch/swissmedic/en/home/humanarzneimittel/market-surveillance/qualitaetsmaengel-und-chargenrueckrufe/batch-recalls.html",
    "observedAt": "2026-10-24T07:58:12.229Z",
    "coverage": "first_listing_page_only",
    "sourceTotalReported": 229,
    "nextPageAdvertised": true,
    "items": [
        {
            "noticeUrl": "https://www.swissmedic.ch/swissmedic/en/home/humanarzneimittel/market-surveillance/qualitaetsmaengel-und-chargenrueckrufe/batch-recalls/chargenrueckruf-elocom-loesung-zur-anwendung-auf-der-haut.html",
            "publishedDate": "2026-09-18",
            "publishedDateRaw": "18.09.2026",
            "title": "Batch recall – Elocom, Lösung zur Anwendung auf der Haut",
            "summary": "Rückzug der Charge C135341 bis auf Stufe Detailhandel"
        }
    ],
    "snapshotHash": "1760cd787627686dd8af6ba7f0ac4aef1e38f4ec01e823fb8682433a3f70d260"
}
```

The example shows one of the 60 notices the page held on 24 October 2026.

- `observedAt` is the UTC instant the listing response completed.
- `sourceTotalReported` is T from the page's `Results 1 - N of T` label. It is the source's own count, not the number of notices returned and not the number of active recalls. The run checks that N equals the notices it parsed.
- `nextPageAdvertised` says whether the page links to a page 2. Later pages are never fetched.
- `items` holds 1 to 100 notices, sorted by `publishedDate` descending, then `noticeUrl`. `noticeUrl` is the stable identity of a notice. `publishedDate` is a calendar date (`YYYY-MM-DD`) with no time or timezone; `publishedDateRaw` keeps the source's `DD.MM.YYYY` label. Titles and summaries stay in the original German or French, with whitespace collapsed. A summary can be an empty string.
- `snapshotHash` is the SHA-256 of the canonical JSON of the bundle without `snapshotHash`, `observedAt` and `sourceUrl`. Two runs with the same content have the same hash, so you can skip unchanged snapshots on your side. A change in the reported total alone also changes the hash, without being a new recall.

A free `SUMMARY` record in the default key-value store explains every run: status, stop reason, errors, request and byte counts, HTTP statuses, parsed and deduplicated notice counts, stored and charged bundle counts, and what the run did not cover.

### Pricing

Pay per event, two built-in events:

| Event                  | Price    | When                                                    |
| ---------------------- | -------- | ------------------------------------------------------- |
| Actor start            | $0.00005 | Once per start unit when a run starts                   |
| Recall bulletin bundle | $0.004   | Once per complete bundle actually stored in the dataset |

A successful default run at 256 MB costs **$0.00405** in Actor event fees; 30 daily runs cost **$0.1215**. Every successful run is billed for its bundle, including runs whose content is unchanged. A run that fails before delivery stores no bundle and is not charged for one; the start fee still applies. A `delivery_uncertain` run may already have stored, and been charged for, its bundle. If your spending limit cannot cover one bundle, the run does not fetch the source and stops with `spending_limit`.

### Coverage and limits

- **First listing page only.** On 24 October 2026 that page held 60 of the 229 notices the source reports. Older notices drop off the page as new ones arrive; a notice disappearing from the page is never a deletion, withdrawal or resolution.
- No full article text, PDFs, batch-number extraction, legal interpretation, veterinary medicines or medical devices. Batch numbers appear only where Swissmedic writes them into the summary.
- Stateless: no baseline, no change events, no exactly-once promise. Each run delivers the whole current page; compare hashes or notice URLs yourself.
- One request to one fixed URL per run. At most 5 HTTP requests including retries and redirects, 2 MiB per response, 6 MiB per run and 90 seconds of source work. Timeouts, connection resets and 5xx responses are retried at most twice, after 2 and 4 seconds plus the request interval. Redirects are followed only back to the same listing URL, at most 3.
- A 403, a 429 or a challenge or block page (also inside a 200 response) stops the run with `source_blocked` or `source_throttled`. No proxy, browser, cookies or workaround is used.
- A page whose layout no longer matches (missing date, title, link or summary, a count label that disagrees with the parsed notices, more than 100 notices, or no notices) fails with `source_layout_changed` and stores nothing. It never becomes an empty bundle.
- If the push was sent but the dataset cannot confirm the bundle (for example, the readback fails), the run fails with `delivery_uncertain` instead of claiming delivery. The bundle may still have been stored and charged: check the run's dataset before you retry, because a retry stores and charges a new bundle.

Retry a failed run with the same input; there is no partial state to resume.

### Source and data

Source: Swissmedic, the Swiss Agency for Therapeutic Products, public website. The bundle keeps public factual notice text only and omits contact details. If a source string names a person, you are the controller for how you use it.

For support, open an issue on this Actor's Issues tab with the run ID and the `stopReason` from `SUMMARY`.

# Actor input Schema

## `requestIntervalMs` (type: `integer`):

Idle time after every Swissmedic response before the next request, retries and redirects included. The run fetches one fixed listing page, so this only matters when a retry or redirect happens.

## Actor input object example

```json
{
  "requestIntervalMs": 1500
}
```

# Actor output Schema

## `bundle` (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("thatmike1/ch-swissmedic-batch-recalls").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("thatmike1/ch-swissmedic-batch-recalls").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 thatmike1/ch-swissmedic-batch-recalls --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thatmike1/ch-swissmedic-batch-recalls"
        }
    }
}
```

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/sGrz7CcUEj3dqt760/builds/TdDTIdmROr41n29jZ/openapi.json
