# Medium Articles Scraper (`scrapers_lat/medium-scraper`) Actor

Scrape Medium articles by tag, publication, author or URL. Get title, subtitle, author, publication, date, claps, responses, reading time, tags, hero image and full text. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/medium-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Social media, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.80 / 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.
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?

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](https://scrapers.lat/banners/medium-scraper.png)](https://console.apify.com/actors/Et9LJ0Xj2cJH6yXC4/input)

## Medium Articles Scraper

Here is one real result, with every field the actor returns:

```json
{
  "imageUrl": "https://cdn-images-1.medium.com/max/1672/1*TKtuorIle-mvLIaoMRGE4Q.png",
  "title": "The AI Campus Is Entering the Gas Market",
  "url": "https://medium.com/@adrianvaren/the-ai-campus-is-entering-the-gas-market-ed979a2ab749",
  "id": "ed979a2ab749",
  "subtitle": "A 20-year power agreement can secure generation, while turbine slots, pipeline capacity, air permits and reserve margins still set the...",
  "previewText": "A 20-year power agreement can secure generation, while turbine slots, pipeline capacity, air permits and reserve margins still set the...",
  "author": "Adrian Varen",
  "authorUsername": "adrianvaren",
  "authorUrl": "https://medium.com/@adrianvaren",
  "authorBio": "Independent journalist covering AI infrastructure, power, data centers and capital. The physical economy behind AI. Disclosed pen name.",
  "authorFollowerCount": 0,
  "authorImageUrl": "https://miro.medium.com/v2/resize:fill:176:176/1*XFtQXRp2k_oRTzEdUO-Rqw.png",
  "authorTwitter": null,
  "publication": null,
  "publicationSlug": null,
  "publicationUrl": null,
  "publishedAt": "2026-08-10T14:18:57.070Z",
  "updatedAt": "2026-08-10T14:18:57.070Z",
  "readingTimeMinutes": 6,
  "wordCount": 1538,
  "clapCount": 0,
  "responsesCount": 0,
  "tags": ["artificial-intelligence", "data-center", "energy", "natural-gas", "infrastructure"],
  "primaryTopic": null,
  "isMemberOnly": false,
  "isSeries": false,
  "isShortform": false,
  "isNewsletter": false,
  "license": "ALL_RIGHTS_RESERVED",
  "language": "en",
  "canonicalUrl": "https://medium.com/@adrianvaren/the-ai-campus-is-entering-the-gas-market-ed979a2ab749",
  "fullText": null,
  "sourceType": "tag",
  "sourceInput": "artificial-intelligence",
  "source": "Medium",
  "observedAt": "2026-08-10T14:33:12.957Z",
  "error": null
}
```

Note: the source subtitle ends with an ellipsis, shown here as three dots; every value above is real. The most complete Medium scraper available. It returns every field the article and author expose, including claps, responses, reading time, word count, member-only and license flags, language and author bio, and lets you collect by tag, publication, author, direct URL or any start URL in one run.

**📥 [Input](https://apify.com/scrapers_lat/medium-scraper/input-schema) · 📤 [Output](https://apify.com/scrapers_lat/medium-scraper/output-schema) · 💰 [Pricing](https://apify.com/scrapers_lat/medium-scraper/pricing) · ▶️ [Examples](https://apify.com/scrapers_lat/medium-scraper/examples)**

![Apify](https://img.shields.io/badge/Platform-Apify-1CE1CE?logo=apify\&logoColor=white)
![Coverage](https://img.shields.io/badge/Coverage-Medium-blue)
![Output](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-orange)
![Billing](https://img.shields.io/badge/Billing-Pay%20per%20result-brightgreen)

### Table of contents

- [What it does](#what-it-does)
- [Quickstart](#quickstart)
- [Input reference](#input-reference)
- [Output reference](#output-reference)
- [Example output record](#example-output-record)
- [Run via API and CLI](#run-via-api-and-cli)
- [Fetch results](#fetch-results)
- [Billing and limits](#billing-and-limits)
- [FAQ and troubleshooting](#faq-and-troubleshooting)

### What it does

The actor collects Medium articles from any mix of tags, publications, authors, direct article URLs or start URLs, and writes one normalized record per article to the run's dataset. With `withDetails` on (the default), each article is opened to add claps, responses, reading time, subtitle, word count, member-only flag, language and the resolved author and publication. With `withContent` on, the full plain-text body is included too. Everything runs in one job under a single shared `maxArticles` cap, and missing source values are returned as `null`.

### Quickstart

Open the actor, paste this into the input, and press Run. It returns the 10 latest articles under the `artificial-intelligence` tag, with stats.

```json
{
  "maxArticles": 10,
  "withDetails": true,
  "tags": ["artificial-intelligence"]
}
```

Mix in `publications`, `authors`, `articleUrls` or `startUrls` to collect from several sources in one run. Set `withContent` to `true` to include the full article body.

### Input reference

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `maxArticles` | integer | no | `10` | Maximum articles to collect across every tag, publication, author and URL. Free Apify plans are capped at 10 per run. |
| `withDetails` | boolean | no | `true` | Open each article to add claps, responses, reading time, subtitle, word count, member-only flag, language and resolved author/publication. Off is a faster listing-only run. |
| `withContent` | boolean | no | `false` | Also include the full plain-text body of each article. Opens each article page. |
| `tags` | string\[] | no | `["artificial-intelligence"]` | Medium tag slugs, for example `programming`, `startup`, `data-science`, `productivity`. Collects the latest articles per tag. |
| `publications` | string\[] | no | (none) | Publication slugs or custom domains, for example `better-programming`, `towardsdatascience.com`. Collects each publication's latest articles. |
| `authors` | string\[] | no | (none) | Medium usernames, with or without the leading `@`, for example `@quincylarson`. Collects each author's latest articles. |
| `articleUrls` | string\[] | no | (none) | Direct Medium article URLs to scrape individually. |
| `startUrls` | array | no | (none) | Any Medium URL (tag, publication, author, feed or article). The type is detected automatically. |

### Output reference

One dataset item per article. Types: `string`, `integer`, `boolean`, `array`, or `null` when the source value is absent.

| Field | Type | Description |
|---|---|---|
| `imageUrl` | string | Article cover image URL. |
| `title` | string | Article title. |
| `url` | string | Article URL. |
| `id` | string | Medium article identifier. |
| `subtitle` | string | Article subtitle. |
| `previewText` | string | Preview snippet. |
| `author` | string | Author display name. |
| `authorUsername` | string | Author username. |
| `authorUrl` | string | Author profile URL. |
| `authorBio` | string | Author bio. |
| `authorFollowerCount` | integer | Author follower count. |
| `authorImageUrl` | string | Author avatar URL. |
| `authorTwitter` | string | Author Twitter/X handle, or `null`. |
| `publication` | string | Publication name, or `null`. |
| `publicationSlug` | string | Publication slug, or `null`. |
| `publicationUrl` | string | Publication URL, or `null`. |
| `publishedAt` | string | ISO 8601 publish timestamp. |
| `updatedAt` | string | ISO 8601 last-updated timestamp. |
| `readingTimeMinutes` | integer | Estimated reading time in minutes. |
| `wordCount` | integer | Article word count. |
| `clapCount` | integer | Number of claps. |
| `responsesCount` | integer | Number of responses. |
| `tags` | string\[] | Article tag slugs. |
| `primaryTopic` | string | Primary topic, or `null`. |
| `isMemberOnly` | boolean | `true` if behind the Medium paywall. |
| `isSeries` | boolean | `true` if the article is a series. |
| `isShortform` | boolean | `true` if short-form. |
| `isNewsletter` | boolean | `true` if a newsletter issue. |
| `license` | string | Content license, for example `ALL_RIGHTS_RESERVED`. |
| `language` | string | Article language code. |
| `canonicalUrl` | string | Canonical article URL. |
| `fullText` | string | Full plain-text body when `withContent` is on, else `null`. |
| `sourceType` | string | Which source produced the record: `tag`, `publication`, `author`, or `url`. |
| `sourceInput` | string | The tag, publication, author or URL that produced this record. |
| `source` | string | Always `Medium`. |
| `observedAt` | string | ISO 8601 timestamp of when the record was collected. |
| `error` | string | `null` on success. On a failed run, a single item with a populated `error` field is written instead. |

### Example output record

Real record from a live run (input `{"tags": ["artificial-intelligence"], "withDetails": true, "maxArticles": 10}`):

```json
{
  "title": "The AI Campus Is Entering the Gas Market",
  "url": "https://medium.com/@adrianvaren/the-ai-campus-is-entering-the-gas-market-ed979a2ab749",
  "id": "ed979a2ab749",
  "author": "Adrian Varen",
  "authorUsername": "adrianvaren",
  "authorBio": "Independent journalist covering AI infrastructure, power, data centers and capital. The physical economy behind AI. Disclosed pen name.",
  "publishedAt": "2026-08-10T14:18:57.070Z",
  "readingTimeMinutes": 6,
  "wordCount": 1538,
  "clapCount": 0,
  "responsesCount": 0,
  "tags": ["artificial-intelligence", "data-center", "energy", "natural-gas", "infrastructure"],
  "isMemberOnly": false,
  "license": "ALL_RIGHTS_RESERVED",
  "language": "en",
  "sourceType": "tag",
  "sourceInput": "artificial-intelligence",
  "source": "Medium",
  "observedAt": "2026-08-10T14:33:12.957Z",
  "error": null
}
```

Some fields are omitted here for length; live runs return every field listed above with real values.

### Run via API and CLI

Start a run and wait for it to finish, then read the dataset. Replace `<TOKEN>` with your Apify API token.

Run synchronously and get dataset items in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~medium-scraper/run-sync-get-dataset-items?token=%3CTOKEN%3E" \
  -H "Content-Type: application/json" \
  -d '{"tags":["programming"],"withDetails":true,"maxArticles":25}'
```

Start a run asynchronously:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~medium-scraper/runs?token=%3CTOKEN%3E" \
  -H "Content-Type: application/json" \
  -d '{"authors":["@quincylarson"],"withContent":true,"maxArticles":50}'
```

Apify CLI:

```bash
apify call scrapers_lat/medium-scraper \
  --input '{"publications":["towardsdatascience.com"],"maxArticles":50}'
```

### Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing `format`:

```bash
## JSON
curl "https://api.apify.com/v2/datasets/%3CDATASET_ID%3E/items?token=%3CTOKEN%3E&clean=true&format=json"

## CSV
curl "https://api.apify.com/v2/datasets/%3CDATASET_ID%3E/items?token=%3CTOKEN%3E&clean=true&format=csv"

## Paginate large datasets
curl "https://api.apify.com/v2/datasets/%3CDATASET_ID%3E/items?token=%3CTOKEN%3E&offset=1000&limit=1000"
```

`<DATASET_ID>` is returned as `defaultDatasetId` in the run object. Use `offset` and `limit` to page through large result sets. `clean=true` drops empty and internal fields.

### Billing and limits

- **Pay per result.** You are charged per record returned (`result` event). See the [pricing tab](https://apify.com/scrapers_lat/medium-scraper/pricing) for the current per-result price.
- **No charge on failure.** If a run errors, the actor writes a single item with a populated `error` field and does not charge for it. Empty runs cost nothing.
- **Spend cap respected.** Set `maxTotalChargeUsd` on the run; once reached, the actor stops emitting and charging further billable results.
- **Free Apify plans** are capped at 10 records per run. Upgrade for higher `maxArticles`.

### FAQ and troubleshooting

**A run returned 0 records. Why?**
The tag, publication or author had no accessible articles, or the slug was wrong. Use the exact Medium tag slug (for example `data-science`) and a valid username. Zero-result runs are not charged.

**How do I get the full article text?**
Set `withContent` to `true`. The full plain-text body is written to `fullText`.

**What is the difference between `withDetails` and `withContent`?**
`withDetails` adds stats and resolved author/publication by opening each article. `withContent` additionally includes the full body text.

**Why is `publication` null?**
The article was published on a personal profile, not under a publication. Missing values are returned as `null`, never invented.

**Is this an official Medium tool?**
No. This actor is independent and has no affiliation with Medium. It reads only data that is publicly available on the site.

### Related scrapers

- [Hacker News Scraper](https://apify.com/scrapers_lat/hacker-news-scraper): Hacker News stories and comments.
- [Google News Scraper](https://apify.com/scrapers_lat/google-news-scraper): News articles from Google News.
- [GitHub Repositories Scraper](https://apify.com/scrapers_lat/github-repositories-scraper): repositories and developer projects on GitHub.
- [DeviantArt Scraper](https://apify.com/scrapers_lat/deviantart-scraper): DeviantArt creator content.
- [Goodreads Scraper](https://apify.com/scrapers_lat/goodreads-scraper): Books, authors and reviews on Goodreads.
- [GDELT News Events Scraper](https://apify.com/scrapers_lat/gdelt-news-events-scraper): Global news events from GDELT.

### More scrapers at scrapers.lat

Built and maintained by [scrapers.lat](https://scrapers.lat), where we publish scrapers for US and Latin American public platforms: company registries, government data, finance, e-commerce and more. Browse the catalog or request a custom scraper at [scrapers.lat](https://scrapers.lat).

***

> Independent tool, not affiliated with Medium. Accesses only publicly available data.
>
> </content>

# Actor input Schema

## `maxArticles` (type: `integer`):

Maximum number of articles to collect across every tag, publication, author and URL in this run.

## `withDetails` (type: `boolean`):

Open each article to add claps, responses, reading time, subtitle, word count, member-only flag, language and the resolved author and publication. Turn off for a faster listing-only run.

## `withContent` (type: `boolean`):

Also include the full plain-text body of each article. Slightly slower; opens each article page.

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

One or more Medium tag slugs, for example 'artificial-intelligence', 'programming', 'startup', 'data-science', 'productivity'. One run collects the latest articles for every tag listed.

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

One or more Medium publication slugs or custom domains, for example 'better-programming', 'towardsdatascience.com', 'free-code-camp'. Collects each publication's latest articles.

## `authors` (type: `array`):

One or more Medium usernames, with or without the leading @, for example '@quincylarson' or 'quincylarson'. Collects each author's latest articles.

## `articleUrls` (type: `array`):

Direct Medium article URLs to scrape individually. Each URL is opened for its full details.

## `startUrls` (type: `array`):

Any Medium URL: a tag page, publication page, author profile, feed URL or article URL. The scraper detects the type automatically.

## Actor input object example

```json
{
  "maxArticles": 10,
  "withDetails": true,
  "withContent": false,
  "tags": [
    "artificial-intelligence"
  ]
}
```

# Actor output Schema

## `results` (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 = {
    "maxArticles": 10,
    "tags": [
        "artificial-intelligence"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/medium-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 = {
    "maxArticles": 10,
    "tags": ["artificial-intelligence"],
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/medium-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 '{
  "maxArticles": 10,
  "tags": [
    "artificial-intelligence"
  ]
}' |
apify call scrapers_lat/medium-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers_lat/medium-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/Et9LJ0Xj2cJH6yXC4/builds/dSAenDeUqS0yFsH3W/openapi.json
