# Medium Public Following Scraper (`w3crawler/medium-following-scraper`) Actor

Collects public accounts followed by one or more Medium usernames through bounded anonymous GraphQL pagination in a standard headless browser. Records contain target/followed profiles, membership and social metadata, provenance, and truthful diagnostics.

- **URL**: https://apify.com/w3crawler/medium-following-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 45.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 followings

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 Public Following Scraper

Collect the public accounts followed by one or more Medium users. Each saved row pairs a target profile with one followed account, including names, usernames, bios, avatars, canonical URLs, membership flags, social counts, relationship rank, extraction method, and transport. The Actor uses the public following page, its embedded payload, and a bounded anonymous fallback; it does not authenticate or access private lists.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/medium-following-scraper) and select **Try for free**, or open the **Input** tab.
2. Enter one `username` or a `usernames` list. `usernames` replaces `username`.
3. Keep `maxItems` small; the limit is global and divided across targets.
4. Start the Actor, open the dataset, and export the rows as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT`) to inspect access and transport details.

### Input

All fields are optional except that at least one username target should be supplied. Unsupported fields and out-of-range values are rejected before requests start.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `username` | string | Optional | Not supplied | One public Medium username with an optional `@`. The Actor tries the subdomain and then the canonical profile URL when needed. |
| `usernames` | string array | Optional | Not supplied | Multiple public usernames; replaces `username` and divides `maxItems` across unique targets. |
| `maxItems` | integer | Optional | `50` | Maximum unique following-connection rows across all targets, 1–500. |
| `timeoutSecs` | integer | Optional | `120` | Navigation and per-request timeout, 30–180 seconds. |
| `requestRetries` | integer | Optional | `2` | Bounded retries for navigation and transient errors; clear access blocks are not retried indefinitely, 0–3. |
| `requestDelayMs` | integer | Optional | `500` | Delay between paginated requests, 0–5,000 ms. Zero is intended only for controlled tests. |
| `maxGraphqlResponseBytes` | integer | Optional | `1000000` | Maximum embedded or anonymous payload size, 10,000–2,000,000 bytes. |
| `proxyConfiguration` | object | Optional | `{"useApifyProxy":false}` | Optional standard Apify Proxy routing for public requests; direct access is the default and proxy routing does not grant private access. |

Example input from the saved 2026-10-24 run:

```json
{
  "username": "karpathy",
  "maxItems": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US"
  },
  "timeoutSecs": 120,
  "requestRetries": 2,
  "requestDelayMs": 500,
  "maxGraphqlResponseBytes": 1000000
}
```

The Actor prefers the public following page and its embedded payload, then uses a bounded anonymous connection and a visible-DOM fallback when needed. A standard Apify Proxy can be configured, but it is not a way around login, challenges, or private lists.

### Output

The dataset contains one row per unique followed account. `connectionType` is `targetFollowsUser`, meaning the target account follows the `followed*` account. Fields that Medium does not expose are omitted.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordId` | string | Always | Stable identifier for the target/followed pair. |
| `recordType` | string | Always | Record type; `mediumFollowing`. |
| `connectionType` | string | Always | Relationship direction; `targetFollowsUser`. |
| `source` | string | Always | Source label; `Medium public following page and anonymous connection`. |
| `provenance` | string | Always | Extraction provenance; `medium_public_reader_following_v1` in the saved run. |
| `followingRank` | integer | Always | One-based position in the target's public following list. |
| `paginationPage` | integer | Always | Page on which the row was returned. |
| `targetUserId` | string | Always | Medium user ID of the target. |
| `targetName` | string | Always | Target display name. |
| `targetUsername` | string | Always | Target username. |
| `targetBio` | string | When published | Target bio when exposed. |
| `targetAvatarUrl` | string | When published | Target avatar URL when exposed. |
| `targetProfileUrl` | string | Always | Target profile URL. |
| `targetSubdomainUrl` | string | When published | Target subdomain URL when it exists. |
| `targetIsMember` | boolean | When published | Target membership flag when exposed. |
| `targetMemberSince` | string | When published | Target membership date when exposed. |
| `targetHasSubdomain` | boolean | When published | Target subdomain flag when exposed. |
| `targetIsSuspended` | boolean | When published | Target suspension flag when exposed. |
| `targetIsWriterProgramEnrolled` | boolean | When published | Target writer-program flag when exposed. |
| `targetFollowerCount` | number | When published | Target follower count when exposed. |
| `targetFollowingCount` | number | Always | Target following count at collection time. |
| `followedUserId` | string | When published | Medium user ID of the followed account. |
| `followedName` | string | Always | Followed account display name. |
| `followedUsername` | string | Always | Followed account username. |
| `followedBio` | string | When published | Followed account bio; present for two of three saved rows. |
| `followedAvatarUrl` | string | Always | Followed account avatar URL. |
| `followedProfileUrl` | string | Always | Followed account profile URL. |
| `followedSubdomainUrl` | string | When published | Followed account subdomain URL when it exists. |
| `followedIsMember` | boolean | When published | Followed membership flag when exposed. |
| `followedMemberSince` | string | When published | Followed membership date when exposed. |
| `followedHasSubdomain` | boolean | Always | Whether the followed account has a subdomain. |
| `followedIsSuspended` | boolean | When published | Followed suspension flag when exposed. |
| `followedIsWriterProgramEnrolled` | boolean | When published | Followed writer-program flag when exposed. |
| `followedFollowerCount` | number | When published | Followed follower count when exposed. |
| `followedFollowingCount` | number | When published | Followed following count when exposed. |
| `sourceUrl` | string | Always | Public following page requested. |
| `sourcePageUrl` | string | Always | Page URL associated with the row. |
| `sourceGraphqlUrl` | string | When published | Anonymous GraphQL endpoint when a GraphQL fallback was used. |
| `scrapedAt` | string | Always | Time the row was saved, in ISO UTC. |
| `extractionMethod` | string | Always | Extraction path; `public-reader-following` in the saved run. |
| `proxyConfigured` | boolean | Always | Whether proxy routing was configured for the row. |
| `sourceTransport` | string | Always | Transport used; `direct` in the saved run. |
| `url` | string | When published | Compatibility alias of a profile URL when supplied; absent in the saved run. |

The example below is a real saved row from the 2026-10-24 run.

```json
{
  "recordId": "medium_following_dad9b2d131d432fee061e64c",
  "recordType": "mediumFollowing",
  "connectionType": "targetFollowsUser",
  "source": "Medium public following page and anonymous connection",
  "provenance": "medium_public_reader_following_v1",
  "followingRank": 1,
  "paginationPage": 1,
  "targetUserId": "ac9d9a35533e",
  "targetName": "Andrej Karpathy",
  "targetUsername": "karpathy",
  "targetProfileUrl": "https://medium.com/@karpathy",
  "targetFollowingCount": 186,
  "followedName": "Nicolas Pinto",
  "followedUsername": "nicolas.pinto",
  "followedAvatarUrl": "https://miro.medium.com/v2/resize:fill:96:96/1*dmbNkD5D-u45r44go_cf0g.png",
  "followedProfileUrl": "https://medium.com/@nicolas.pinto",
  "followedHasSubdomain": false,
  "sourceUrl": "https://medium.com/@karpathy/following",
  "sourcePageUrl": "https://medium.com/@karpathy/following",
  "extractionMethod": "public-reader-following",
  "sourceTransport": "direct",
  "proxyConfigured": false,
  "scrapedAt": "2026-10-24T18:56:16.375Z"
}
```

### Run summary

**Run summary** is stored separately from the dataset in the run's key-value store under `OUTPUT` and `OUTPUT_SUMMARY`.

| Field | Meaning |
| --- | --- |
| `recordId` | Stable summary identifier. |
| `recordType` | Summary type, `runSummary`. |
| `status` | Actor outcome: `SUCCEEDED` or `FAILED`. |
| `actorStatus` | Actor-level status. |
| `accessStatus` | Access outcome; `COMPLETE` or `PARTIAL`. |
| `found` | Whether the target was found. |
| `dataAvailable` | Whether rows were saved. |
| `source` | Source label. |
| `provenance` | Extraction provenance. |
| `accessPolicy` | Access boundary used for the run. |
| `actorName` | Actor display name. |
| `actorSlug` | Actor slug. |
| `targetHint` | Target description. |
| `sourceUrl` | Primary following-page URL. |
| `sourceWebsite` | Medium website URL. |
| `proxyConfigured` | Whether proxy routing was active at the summary level. |
| `sourceTransport` | Primary transport reported by the summary. |
| `requestedUsernames` | Unique targets requested. |
| `requestedItems` | Requested limit. |
| `itemsStored` | Rows written. |
| `connectionRecords` | Connection rows produced. |
| `diagnosticsStored` | Diagnostic entries written. |
| `diagnosticCount` | Issues recorded. |
| `diagnosticsObserved` | Issues observed before storage. |
| `totalDatasetItems` | Total dataset count. |
| `requests` | Requests made. |
| `requestCount` | Request count. |
| `pageRequests` | Page navigations. |
| `graphqlRequests` | GraphQL calls. |
| `embeddedRequests` | Embedded-payload reads. |
| `domFallbacks` | Visible-DOM fallbacks. |
| `fallbackPageNavigations` | Extra navigations for fallback. |
| `successfulRequests` | Successful requests. |
| `failedRequests` | Failed requests. |
| `failedRequestCount` | Failed request count. |
| `totalRequestAttempts` | Attempts including retries. |
| `httpStatuses` | HTTP status counts. |
| `blockedReasons` | Bounded block or challenge reasons. |
| `attemptedTransports` | Transports tried, in order. |
| `navigationState` | Browser navigation outcome. |
| `filters` | Effective input values, including proxy settings. |
| `generatedBy` | Generator metadata. |
| `startedAt` | Start time in ISO UTC. |
| `completedAt` | Completion time in ISO UTC. |
| `durationMs` | Duration in milliseconds. |
| `datasetWriteFailureCount` | Dataset write failures. |
| `optionalFailureCount` | Non-fatal failures. |
| `dataStatus` | `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED`. |
| `runStatus` | Canonical run status. |

| Status | Data status | Meaning |
| --- | --- | --- |
| `SUCCEEDED` | `COMPLETE` | Following rows were saved without an access or extraction problem. |
| `SUCCEEDED` | `PARTIAL` | Some rows were saved, but a later request or fallback was blocked. Saved rows remain available. |
| `SUCCEEDED` | `NO_RESULTS` | The target was read successfully but follows no public accounts. |
| `FAILED` | `FAILED` | A fatal error prevented any usable row from being saved. |

Example `OUTPUT` from the saved 2026-10-24 run:

```json
{
  "recordId": "medium_following_run_summary",
  "recordType": "runSummary",
  "status": "SUCCEEDED",
  "actorStatus": "SUCCEEDED",
  "accessStatus": "PARTIAL",
  "found": true,
  "dataAvailable": true,
  "source": "Medium public following page and anonymous connection",
  "provenance": "medium_public_following_ssr_apollo_graphql_v2",
  "accessPolicy": "Public Medium following metadata only; optional standard Apify Proxy for public requests; no login, private-list access, CAPTCHA solving, or access-control bypass.",
  "actorName": "Medium Public Following Scraper",
  "actorSlug": "medium-following-scraper",
  "targetHint": "Public Medium following connections",
  "sourceUrl": "https://medium.com/@karpathy/following",
  "sourceWebsite": "https://medium.com/",
  "proxyConfigured": false,
  "sourceTransport": "direct",
  "requestedUsernames": 1,
  "requestedItems": 3,
  "itemsStored": 3,
  "connectionRecords": 3,
  "diagnosticsStored": 0,
  "diagnosticCount": 0,
  "diagnosticsObserved": 0,
  "totalDatasetItems": 3,
  "requests": 5,
  "requestCount": 5,
  "pageRequests": 3,
  "graphqlRequests": 2,
  "embeddedRequests": 0,
  "domFallbacks": 0,
  "fallbackPageNavigations": 0,
  "successfulRequests": 3,
  "failedRequests": 2,
  "failedRequestCount": 2,
  "totalRequestAttempts": 5,
  "httpStatuses": {
    "200": 1,
    "403": 2
  },
  "blockedReasons": [
    "Medium following page returned a challenge or block response.",
    "Medium GraphQL returned HTTP 403."
  ],
  "attemptedTransports": ["direct", "apify_proxy", "public_reader"],
  "navigationState": "handled",
  "filters": {
    "username": "karpathy",
    "usernames": ["karpathy"],
    "maxItems": 3,
    "timeoutSecs": 120,
    "requestRetries": 2,
    "requestDelayMs": 500,
    "maxGraphqlResponseBytes": 1000000,
    "proxyConfiguration": {
      "useApifyProxy": true,
        "apifyProxyCountry": "US"
    }
  },
  "generatedBy": "OpenAI Codex with GPT-6",
  "startedAt": "2026-10-24T18:55:42.087Z",
  "completedAt": "2026-10-24T18:56:16.376Z",
  "durationMs": 34289,
  "datasetWriteFailureCount": 0,
  "optionalFailureCount": 0,
  "dataStatus": "PARTIAL",
  "runStatus": "SUCCEEDED"
}
```

### Coverage and limitations

The saved run requested three following connections for `karpathy`. It saved three rows, but the summary is `PARTIAL`: the direct page and GraphQL path returned HTTP 403 twice, and the public-reader path supplied the rows. `proxyConfigured` is `false` at summary level even though the input contained a proxy configuration, so use `attemptedTransports` and `blockedReasons` to understand what happened rather than assuming a proxy was used.

Medium's following page can be served from embedded data, an anonymous GraphQL response, or visible markup. The Actor records the path in `extractionMethod` and `sourceTransport`. Among profile fields, only `followedName`, `followedUsername`, avatar, profile URL, subdomain flag, and target following count appeared in all three saved rows; bios and most membership or social-count fields were absent. The Actor does not infer missing bios, counts, or membership dates, does not read private lists, and cannot enumerate accounts that Medium no longer returns.

### Usage and support

Browser compute, optional proxy usage, retries, and the number of targets drive cost. Start with one target and a low `maxItems`, check `blockedReasons` and `attemptedTransports`, then scale only if the public path is stable. See the Actor's Pricing tab for current rates.

Use the [Actor Issues page](https://apify.com/w3crawler/medium-following-scraper/issues) to report a problem. Include the run ID, input, and summary; do not include tokens, cookies, or private data. This Actor is not affiliated with Medium. Use it only for public data and in accordance with Medium's terms, robots guidance, and applicable law.

# Changelog

This Actor's version history is a separate document: https://apify.com/w3crawler/medium-following-scraper/changelog.md

# Actor input Schema

## `username` (type: `string`):

One public Medium username with an optional leading @. Used when usernames is not supplied. The Actor first tries the username's public Medium subdomain, then the canonical profile URL when needed.

## `usernames` (type: `array`):

Optional list of public usernames. When supplied, it replaces username and maxItems is distributed fairly across unique targets.

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

Maximum total unique following-connection records across all targets. The limit is global and is divided fairly across usernames.

## `timeoutSecs` (type: `integer`):

Maximum time allowed for page navigation and each anonymous GraphQL request.

## `requestRetries` (type: `integer`):

Bounded retries for page navigation and transient GraphQL errors. Clear access blocks are not retried indefinitely.

## `requestDelayMs` (type: `integer`):

Delay in milliseconds between paginated following requests. Zero is allowed for controlled tests; respectful pacing is recommended for normal runs.

## `maxGraphqlResponseBytes` (type: `integer`):

Maximum embedded/anonymous following payload size accepted before the Actor emits a bounded diagnostic.

## `proxyConfiguration` (type: `object`):

Optional standard Apify Proxy routing for ordinary public requests. Direct access is used by default; proxy routing does not provide private-list access or bypass access controls.

## Actor input object example

```json
{
  "username": "karpathy",
  "maxItems": 50,
  "timeoutSecs": 120,
  "requestRetries": 2,
  "requestDelayMs": 500,
  "maxGraphqlResponseBytes": 1000000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Structured public target-follows-user records and truthful diagnostics.

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

Machine-readable counts, request telemetry, source URLs, and final run status.

## `output` (type: `string`):

Compatibility alias of the run summary artifact.

## `sourceMetadata` (type: `string`):

Source website, transport, access policy, and authentication metadata.

## `datasetSanitization` (type: `string`):

Bounded field-cleaning, truncation, and deduplication counters for dataset writes.

# 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 = {
    "username": "karpathy"
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/medium-following-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 = { "username": "karpathy" }

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

```

## MCP server setup

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