# Medium Articles Scraper — By Tag, Publication or Writer (`northbell/medium-articles-scraper`) Actor

Latest Medium stories from a tag, a publication or a writer's feed: title, link, publish date, tags, plain-text excerpt, word count and reading time. Run it on a schedule to get only what is new since the last run. About 10 latest stories per feed. No login.

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

## Pricing

from $0.80 / 1,000 articles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Medium Articles Scraper — By Tag, Publication or Writer

Give it Medium **tags, publications or writers** and get one clean row per story: **title, link, publish date, tags, a plain-text excerpt, word count and reading time**. **$1.00 per 1,000 articles**, no login, no API key.

Run it again — or put it on a schedule — and every row also tells you **what changed since the last run**: whether the story is new, where it stood in the feed last time and how far it moved. Switch on *Only stories new since the last run* and you pay only for stories you have not been given before.

### What you get

| Field | What it is |
|---|---|
| `source`, `sourceType` | the tag, publication or `@handle` the story came from, and whether it is a `tag`, `publication` or `user` |
| `rank` | place in the feed, 1 = newest |
| `title`, `url`, `guid` | the story, Medium's short link to it (`https://medium.com/p/<id>`, opens the story) and Medium's own ID for it |
| `publishedAt`, `updatedAt` | when it was published and last edited (ISO time) |
| `tags` | the tags the writer put on the story |
| `excerpt` | plain text, at most 2,000 characters, with HTML and entities removed and email addresses and phone numbers taken out |
| `hasFullText` | `true` when the feed carried the whole story, `false` when it carried only a one-sentence preview |
| `wordCount`, `readingTimeMinutes` | counted from the full text (reading time = words / 265, one decimal). **`null` when `hasFullText` is `false`** — a preview is not the story |
| `imageUrl` | the lead picture, when the story has one |
| `isNewSinceLastRun`, `previousRank`, `rankChange`, `previousRunAt` | the change since your previous run of the same source (`null` on the first run). `rankChange` is positive when the story moved up the feed |
| `observedAt` | when this row was read |

Sources that cannot be read give a free row with `type: "error"` and a `message`; every other row has `type: "article"`.

### Use it for

- **Content and trend monitoring** — watch the tags and publications in your field and see each new story once
- **Competitor and creator tracking** — follow a company's publication or a writer's feed and get new posts as rows you can send to Sheets, Slack or a newsletter tool
- **Research datasets** — titles, tags, dates and excerpts for topic and keyword analysis (full text only where Medium puts it in the feed, see Notes)

### Input

```json
{ "sources": ["artificial-intelligence", "https://medium.com/towards-data-science", "@ev"], "maxArticlesPerSource": 50, "onlyNew": false }
```

- **Tag**: `artificial-intelligence`, `Artificial Intelligence` or `#ai`. A bare word is always a tag.
- **Publication**: a URL such as `https://medium.com/towards-data-science` (or `pub:towards-data-science`).
- **Writer**: `@handle` or `https://medium.com/@handle`.
- A `https://<name>.medium.com` address also works.

What was already given is remembered per source in a named key-value store in your Apify account, so the second run of the same Actor already shows the changes. Schedule it (Apify → Schedules) to keep a running feed.

### Pricing

**$1.00 per 1,000 articles**, plus $0.01 per run. Error rows (an unknown publication, a tag Medium does not have, an address that is not a Medium source) are free. The $0.01 run-start fee is the one charge every run pays, even one that returns nothing.

### Notes

- **Medium's feeds hold only about the 10 latest stories each.** That is Medium's limit, so *Max articles per source* can cap the result but never raise it. You collect more by running on a schedule.
- **Busy tags move fast.** The 10 stories in a tag feed can cover only a short time: on 10/8 that was about 25 minutes for `artificial-intelligence`, 1.4 hours for `programming`, 2.3 hours for `startup` and 11 hours for `rust`. Medium serves each feed from a cache that can be up to about 15 minutes behind (on 10/8 the feeds we read had been built 0 to 15 minutes before we read them, and a feed read twice 4 minutes apart did not change), so running more often than every 15 minutes mostly returns the same stories. For a busy tag run it every 15 minutes, or choose a narrower tag, a publication or a writer. Stories published between two runs that fall off the end of the feed cannot be recovered.
- **Full text only sometimes.** Tag feeds carry a one-sentence preview. Publication and writer feeds carry the whole story for some stories (in the feeds checked, 3 of 10 in one publication and 10 of 10 in one writer), and a preview for the others. That is why `wordCount` and `readingTimeMinutes` are `null` on every row from a tag feed, and on preview-only rows elsewhere; `hasFullText` tells you which rows have them. Japanese and Chinese text is counted at two characters to a word.
- A tag Medium does not know returns an empty feed rather than an error, so you get a free error row saying so: check the spelling against `medium.com/tag/<tag>`. Medium's tags have no dots or symbols (`nodejs`, `csharp`, `cpp`); dots are removed for you, symbols are not.
- Medium limits how fast it answers one client. The Actor spaces its requests, retries a refused one twice (after 5 and then 10 seconds) and otherwise returns a free error row for that source; run that source again a few minutes later.
- A story tagged with two of your sources appears once for each source; use `guid` to remove duplicates. `rank` is the place in the full feed even when *Only stories new since the last run* hides older rows. The first run of a source returns everything the feed has (up to *Max articles per source*) and leaves the since-last-run fields `null`. A story that the cap left out counts as not given: the next run returns it with `isNewSinceLastRun` `true` (its `previousRank` is where it stood in the feed last time).
- Public data only: what anyone sees without signing in. Writers' names and handles are not returned: `url` is Medium's short link, not the link with the writer's `@handle` in it. Email addresses and phone numbers are removed from excerpts.

To follow other newsletters and blogs, see [Substack Scraper](https://apify.com/northbell/substack-scraper) and [RSS Feed Reader](https://apify.com/northbell/rss-feed-reader).

### For AI agents

`{"sources": ["artificial-intelligence"], "maxArticlesPerSource": 5}` returns up to 5 rows with title, link, date, tags and a short excerpt. Rows have `type`: `article` or `error`. Use `"onlyNew": true` on a schedule to get only unseen stories; `wordCount` is `null` unless `hasFullText` is `true`.

# Actor input Schema

## `sources` (type: `array`):

One per line. A tag (artificial-intelligence, or #ai), a publication URL (https://medium.com/towards-data-science or pub:towards-data-science) or a writer (@handle or https://medium.com/@handle). A bare word is always read as a tag. Medium gives about the 10 latest stories per source.

## `maxArticlesPerSource` (type: `integer`):

Upper limit of stories returned for each source. Medium's feeds hold only about the 10 latest stories, so this can cap the result but never raise it above what the feed has: run the Actor on a schedule to collect more over time.

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

Return only stories you have not been given before for that source, so a scheduled run pays only for new stories. The first run of a source returns everything the feed has. Stories are remembered per source in your Apify account.

## Actor input object example

```json
{
  "sources": [
    "artificial-intelligence",
    "https://medium.com/netflix-techblog"
  ],
  "maxArticlesPerSource": 50,
  "onlyNew": false
}
```

# Actor output Schema

## `articles` (type: `string`):

Latest Medium stories with excerpt, word count, reading time and whether each one is new since the last run.

# 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 = {
    "sources": [
        "artificial-intelligence",
        "https://medium.com/netflix-techblog"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("northbell/medium-articles-scraper").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 = { "sources": [
        "artificial-intelligence",
        "https://medium.com/netflix-techblog",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("northbell/medium-articles-scraper").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 '{
  "sources": [
    "artificial-intelligence",
    "https://medium.com/netflix-techblog"
  ]
}' |
apify call northbell/medium-articles-scraper --silent --output-dataset

```

## MCP server setup

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

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/jzuwZO5UTm6QhNSPd/builds/DMjzIxdnkRFJxyiaZ/openapi.json
