# Medium Articles Scraper (tags, authors, publications, claps) (`datahamster/medium-articles`) Actor

Medium articles scraper with no login and no proxy: the newest stories for any tag, author or publication as flat rows — title, subtitle, author, publication, published and updated dates, claps, responses, reading time, member-only flag, tags and cover image. Monitor mode alerts on new stories.

- **URL**: https://apify.com/datahamster/medium-articles.md
- **Developed by:** [Viktor Dubnytskiy](https://apify.com/datahamster) (community)
- **Categories:** News
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 result items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Medium Articles Scraper (tags, authors, publications, claps)

Scrape the newest Medium stories for any tag, author or publication as flat rows — with claps, responses, reading time and the member-only flag. No Medium account, no login, no proxy.

### What you get

`postId`, `url`, `title`, `subtitle`, `authorName`, `authorUsername`, `authorId`, `publication`, `publicationSlug`, `publishedAt`, `updatedAt`, `claps`, `responses`, `readingTimeMinutes`, `isMemberOnly`, `tags[]`, `imageUrl`, `source`, `sourceKey`, `rank`, `scrapedAt`.

### Example output

Real row from the example dataset (tag `python`, URL truncated here):

| Field | Example value |
|---|---|
| `url` | `https://medium.com/data-science-collective/computer-vision-meets-generative-art-19df3c1f5626` |
| `title` | `Computer Vision Meets Generative Art` |
| `subtitle` | `Stippling photos with Python and OpenCV` |
| `authorName` / `authorUsername` | `Lee Vaughan` / `lee_vaughan` |
| `publication` | `Data Science Collective` |
| `publishedAt` | `2026-09-01T18:18:08.145000+00:00` |
| `claps` / `responses` | `320` / `3` |
| `tags` / `isMemberOnly` | `["opencv","image-processing","computer-vision",…]` / `true` |

### Use cases

- Curate a newsletter or a reading list: the newest stories on your tags, already sorted with claps and responses attached.
- Topic and competitor monitoring: watch a tag or an author and get alerted when something new lands or when a story takes off.
- Content research: see which subjects, publications and authors earn claps in a niche before you write.

### How it works

1. **Tags** → the tag feed (`latest`, `recommended` or `archive`) is read from Medium's server-rendered page.
2. **Users** → the author's profile page, newest stories first.
3. **Publications** → the publication home page, for the stories Medium server-renders there.
4. Rows are flattened and de-duplicated by `postId`, so the same story reached from two tags is charged once.

### Input

| Field | Meaning | Default |
|---|---|---|
| `tags` | Medium tag slugs, e.g. `python`, `startup` | `["python"]` |
| `tagFeed` | Which tag feed: `latest`, `recommended` or `archive` | `latest` |
| `users` | `@usernames` or profile URLs | empty |
| `publications` | `medium.com/<slug>` or custom-domain publication URLs | empty |
| `maxItems` | Stop after this many story rows | `20` |
| `mode` | `scrape` or `monitor` (only new/changed since last run) | `scrape` |
| `monitorKey`, `webhookUrl`, `telegramBotToken`, `telegramChatId` | Monitor-mode state key and alert targets | empty |

### Pricing

| Event | Price |
|---|---|
| result | $0.0005 per story ($0.50 per 1,000) |
| monitor-check | $0.005 per monitor run |
| change | $0.0005 per new/changed story |

Charged only for stories actually pushed. No proxy needed.

### Why this actor

- No login, no cookies and no proxy cost — your bill is the result events plus compute.
- $0.50 per 1,000 stories.
- Engagement is in the row: `claps`, `responses` and `readingTimeMinutes`, not just title and link.
- Monitor mode with webhook and Telegram alerts on new stories and changed clap counts.
- A run that finds nothing pushes nothing and charges no result events; the run summary says why it was empty.

### Limits

- Each page returns what Medium server-renders: roughly the newest 10–35 stories per tag or author; publication home pages often render their feed client-side and then return nothing. Run it on a schedule (monitor mode) to accumulate history.
- Story bodies are not included (member-only content stays behind the paywall).

### FAQ

**Does it need a Medium account or a member subscription?** No. There is no login field. Member-only stories appear in the listing with `isMemberOnly: true`, but their text stays behind the paywall and is never returned.

**Can I get the full article text?** No. This actor returns story-level metadata only — title, subtitle, author, publication, dates, claps, responses, tags and cover image.

**Why did a publication return nothing?** Many publication home pages render their feed in the browser rather than on the server, so there is nothing in the HTML to read. Use the tag or the author instead; the `RUN_SUMMARY` record in the run's key-value store records the reason and no result events are charged.

### Changelog

- 0.1, rebuild 2026-09-12 (fix, no schema change): a run whose every page was a block page now ends as `blocked` in `RUN_SUMMARY` instead of as an empty dataset with a guessed reason — previously a single-tag run blocked on its first page never reached the three-page threshold.
- 0.1: initial release.

***

If this actor saved you time, a short review on its Store page genuinely helps other people find it. Found a bug or need a field that is missing? Open a ticket on the **Issues** tab.

# Actor input Schema

## `tags` (type: `array`):

Medium tag slugs to read, one per line, e.g. "python", "startup", "artificial-intelligence". Use the slug exactly as it appears in medium.com/tag/<slug>.

## `tagFeed` (type: `string`):

Which tag feed to read: "latest" = newest stories first, "recommended" = Medium's curated ranking, "archive" = the tag archive. Example: "latest".

## `users` (type: `array`):

Medium authors whose newest stories you want, one per line, as a username or a profile URL, e.g. "@lee\_vaughan" or "https://medium.com/@lee\_vaughan".

## `publications` (type: `array`):

Medium publications to read, one per line, e.g. "https://medium.com/data-science-collective" or a custom-domain publication URL. Only stories Medium server-renders on that page are returned.

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

Stop after this many story rows, e.g. 20. You are charged only for rows actually pushed to the dataset.

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

"scrape" returns every matching row. "monitor" returns only rows that are new or whose clap or response count changed since the previous run of the same saved task. Example: "scrape".

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

Optional state key for monitor mode when the actor is not run as a saved task, e.g. "python-tag-daily". Runs sharing a key share the comparison state.

## `webhookUrl` (type: `string`):

Optional HTTPS URL that receives a POST with a JSON summary of the changes found in monitor mode, e.g. "https://hooks.zapier.com/hooks/catch/123/abc".

## `telegramBotToken` (type: `string`):

Optional Telegram bot token used to send monitor-mode change summaries, e.g. "123456789:AAE...". Leave empty to skip Telegram alerts.

## `telegramChatId` (type: `string`):

Optional Telegram chat id that receives the monitor-mode summaries, e.g. "-1001234567890" for a channel or "123456789" for a direct chat.

## Actor input object example

```json
{
  "tags": [
    "python"
  ],
  "tagFeed": "latest",
  "maxItems": 20,
  "mode": "scrape"
}
```

# Actor output Schema

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

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

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

RUN\_SUMMARY record (pushed, skipped, emptyReason)

# 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 = {
    "tags": [
        "python"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/medium-articles").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 = {
    "tags": ["python"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("datahamster/medium-articles").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 '{
  "tags": [
    "python"
  ],
  "maxItems": 20
}' |
apify call datahamster/medium-articles --silent --output-dataset

```

## MCP server setup

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

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/EXkPTQMRb4j7Cmaz7/builds/S8kkkIKQsnHlXR5ip/openapi.json
