# Medium Blog Scraper (`lafuan/medium-blog-scraper`) Actor

Extract Medium articles by topic via RSS. Get titles, authors, author URLs, article URLs, tags, publication date, publication name, and summary — clean JSON output.

- **URL**: https://apify.com/lafuan/medium-blog-scraper.md
- **Developed by:** [Muhammad Naufal](https://apify.com/lafuan) (community)
- **Categories:** News, Developer tools
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

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?

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 Blog Scraper

Extract articles from Medium by topic via RSS feed. Get titles, authors, author URLs, article URLs, tags, publication date, publication name, summary, cover images, language, claps, and reading time — clean JSON, no Cloudflare issues.

### Sample output

```json
{
  "title": "AWS Compute Options: Lambda and ECS",
  "author": "Rhuturaj Takle",
  "authorUrl": "https://medium.com/@rhutu.takle",
  "authorImageUrl": "https://miro.medium.com/v2/...",
  "url": "https://medium.com/@rhutu.takle/aws-compute-options-lambda-and-ecs-be23da0a096d",
  "tags": ["devops", "programming", "learning", "aws"],
  "topics": ["DevOps", "Cloud Computing", "Programming"],
  "publishedDate": "Tue, 14 Jul 2026 16:31:58 GMT",
  "updatedDate": "2026-07-14T16:31:58.837Z",
  "publication": "",
  "summary": "A practical guide to two of AWS's core compute services — Lambda for serverless, event-driven code execution, and ECS for orchestrating…",
  "topicUrl": "https://medium.com/feed/tag/programming",
  "imageUrl": "https://miro.medium.com/v2/...",
  "language": "en",
  "claps": 347,
  "readingTime": "5 min read",
  "readingTimeMinutes": 5,
  "subtitle": "A comparison of AWS Lambda and ECS for different workloads",
  "responsesCount": 12,
  "responses": [
    {"id": "r_123", "responseToPostId": "p_456", "author": "Jane Doe", "text": "Great writeup, the ECS section helped me a lot.", "createdAt": "Wed, 15 Jul 2026 08:12:00 GMT"}
  ],
  "firstPublishedAt": "Tue, 14 Jul 2026 16:31:58 GMT",
  "wordCount": 1200,
  "isMemberOnly": false,
  "readingTimeSeconds": 300,
  "license": "all-rights-reserved",
  "allowResponses": true,
  "guid": "aws-compute-options-lambda-and-ecs-be23da0a096d",
  "id": "abc123def456",
  "slug": "aws-compute-options-lambda-and-ecs-be23da0a096d",
  "isPublished": true,
  "voterCount": 89,
  "totalClapCount": 347,
  "sectionCount": 12,
  "audience": "public",
  "series": "",
  "isSeries": false,
  "type": "article",
  "source": "medium"
}
```

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `topic` | string | `programming` | Medium topic tag (e.g. programming, ai, technology) or full Medium/custom domain URL |
| `maxResults` | integer | `10` | Max articles (1-50) |
| `fetchDetails` | boolean | `true` | Fetch article pages for claps, images, reading time (slower but richer) |
| `detailConcurrency` | integer | `5` | Concurrent detail fetches (1-20) |

### How it works

Three-phase extraction:

1. **RSS feed** (`medium.com/feed/tag/{topic}`) — returns structured XML with titles, authors, tags, dates, and summaries. Fast and not blocked by anti-bot. Supports full URLs and custom domains. Note: Medium RSS caps at **10 items** with no pagination links.
2. **Stream fallback** (only when `maxResults` > what RSS returned) — loads the topic's tag/user/publication page in a headless browser, reads the page's Apollo state, and **scrolls the infinite feed** to keep hydrating more Post entities, yielding up to `maxResults` additional posts with claps, reading time, tags, and response counts. This is what makes `maxResults` above 10 actually work.
3. **Article pages** (one browser tab per article, concurrent) — extracts actual clap counts, images, author avatars, language, reading time, word count, member-only status, **additional tags from the page's Apollo state** (merged with RSS tags, deduplicated), and a best-effort `responses` list. If the browser path is unavailable it falls back to plain HTTP.

### Why a browser?

Medium serves article and tag pages behind a Cloudflare JS challenge. Plain HTTP requests from datacenter IPs get the challenge page, which previously made every detail field (`claps`, `responsesCount`, `wordCount`, `readingTimeMinutes`, …) come back `null`. The actor's Docker base image (`apify/actor-python-playwright`) ships Chromium, so detail extraction actually works.

### Output fields

All output fields plus a few extra ones beyond the classic set:

- `responses` — array of `{author, text, createdAt}` for responses Medium hydrated on the article page (empty when unavailable).
- `firstPublishedAt` — first-publication timestamp (RFC 2822) from the article page.
- `topics` — array of Medium topic names the post belongs to (from Apollo `Post.topics`), kept distinct from `tags` and merged into `tags` when tags are missing.

### Use cases

- Content curation for newsletters
- Trend analysis in tech topics
- Competitive research
- Building reading lists by topic
- Monitoring new articles in your niche

### Pricing

$0.0005 per article ($0.50 per 1k articles).

## Actor input object example

```json
{}
```

# 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("lafuan/medium-blog-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("lafuan/medium-blog-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 '{}' |
apify call lafuan/medium-blog-scraper --silent --output-dataset

```

## MCP server setup

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