> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spidra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Medium

> Get Medium stories with their full text, writers' and publications' stories, tags, search results, lists and responses as structured data, for 1 credit per link.

Scrape a Medium link and the result comes back with the page's data in a defined structure: a story with its text, a writer's stories, a publication, a tag's stories, search results, a list or a story's responses. Send `"output": "json"` to get just that data, or add a `prompt` or `schema` to shape it your own way ([how results come back](https://docs.spidra.io/sites/overview.md#how-results-come-back)). Each link costs 1 credit, and a link that can't be read costs nothing.

This works on medium.com, on writers' and publications' `name.medium.com` addresses, and on publications' own domains, such as `netflixtechblog.com`.

## Example

```json theme={null}
{ "urls": ["https://medium.com/@karpathy"], "output": "json", "wait": true }
```

The item's `result`, shortened to one story:

```json theme={null}
{
  "type": "user",
  "username": "karpathy",
  "name": "Andrej Karpathy",
  "bio": "I like to train deep neural nets on large datasets.",
  "followers": 62245,
  "following": 183,
  "postCount": 8,
  "posts": [
    {
      "id": "a64152b37c35",
      "title": "Software 2.0",
      "url": "https://karpathy.medium.com/software-2-0-a64152b37c35",
      "author": { "name": "Andrej Karpathy", "username": "karpathy", "followers": 62245 },
      "publishedAt": "2017-11-11T22:18:53.751Z",
      "readingTimeMinutes": 8.8,
      "wordCount": 2146,
      "claps": 61064,
      "clappers": 8893,
      "responsesCount": 195,
      "tags": ["machine-learning", "artificial-intelligence", "programming", "software-development", "future"],
      "isLocked": false
    }
  ]
}
```

## Links that work

| Link | Example | You get |
| - | - | - |
| Story | `medium.com/@<user>/<title>-<id>`, `medium.com/<publication>/<title>-<id>`, `medium.com/p/<id>`, `<name>.medium.com/...`, a publication's own domain | The story with its full text as Markdown and plain text, and every detail |
| Responses | `<story link>/responses` | The story's responses and their replies |
| Writer | `medium.com/@<user>`, `<user>.medium.com` | The profile and the writer's stories, newest first |
| Writer's tabs | `/@<user>/about`, `/lists`, `/followers`, `/following` | The profile only, the writer's public lists, or the people they follow or who follow them |
| Publication | `medium.com/<publication>`, `<publication>.medium.com`, its own domain; `/latest`, `/about`, `/tagged/<tag>` | The publication, its editors and writers, and its stories, newest first or from one section |
| Tag | `medium.com/tag/<tag>` | The tag's followers, story count and related tags, and its newest stories |
| Tag views | `/tag/<tag>/recommended`, `/tag/<tag>/archive`, `/tag/<tag>/archive/<year>/<month>`, `?sort=top-week`, `/tag/<tag>/top-writers` | Medium's recommended stories, its most read of all time, of a year or a month, or this week, or the writers it recommends |
| Search | `medium.com/search?q=...`, `/search/users`, `/search/publications`, `/search/lists`, `/search/tags` | Medium's results, in its order |
| List | `medium.com/@<user>/list/<name>-<id>` | The list and its stories |
| Feed | `medium.com/feed/@<user>`, any `/feed` link | The feed's stories as rows |

## More rows

Writers, publications, tags, search, lists and responses read 25 rows by default. Add `count` to the link for more, up to 1,000, or `count=all`:

```json theme={null}
{ "urls": ["https://medium.com/tag/rust-programming-language?count=300"], "output": "json" }
```

The first 100 rows cost the link's 1 credit, and every further 100 is 1 more. A list that runs out sooner costs less. On a story link, `?responses=100` also returns that many responses, and `?clappers=100` that many of the people who clapped for it (`clapperList`), billed the same way.

## Member-only stories

Medium shows visitors who aren't signed in only the opening of a member-only story. You still get every detail of the story (claps, responses, word count, tags and the rest), with `isLocked: true` and `isPreviewOnly: true`, and the text is that opening.

If the writer shared a Friend Link (it has `?sk=` in it), scrape that link as it is and you get the whole story, with `friendLinkUsed: true`. A Friend Link that no longer works gives the preview, with a `note` that says so.

## Fields

**Story in a list:** `id`, `title`, `subtitle`, `url`, `canonicalUrl`, `slug`, `author` (`id`, `name`, `username`, `url`, `bio`, `imageUrl`, `followers`, `following`, `membershipTier`, `isMember`, `isBookAuthor`, `twitter`, `customDomain`), `publication` (`id`, `name`, `slug`, `url`, `domain`, `description`, `followers`), `publishedAt`, `updatedAt`, `readingTimeMinutes`, `wordCount`, `claps`, `clappers`, `responsesCount`, `tags`, `topics`, `isLocked`, `visibility`, `language`, `isSeries`, `isShortform`, `isPinned` and `previewImageUrl`. Tag and search rows also have `rank`.

**Story:** the same, plus `markdown`, `text`, `paragraphs` (each with its type, text, image, code language or embed), `imageUrls`, `links`, `embeds`, `codeBlockCount`, `paragraphCount`, `topHighlight`, `highlights`, `isPreviewOnly` and `friendLinkUsed`, plus `responses` and `clapperList` when you ask for them.

**Writer:** `id`, `username`, `name`, `bio`, `imageUrl`, `url`, `followers`, `following`, `publicationsFollowing`, `membershipTier` (`MEMBER` or `FRIEND`), `memberSince`, `friendSince`, `isBookAuthor`, `twitter`, `customDomain`, `hasSubdomain`, `tippingLink`, `newsletter` and `posts`.

**Publication:** `id`, `name`, `slug`, `url`, `domain`, `tagline`, `description`, `followers`, `tags`, `twitter`, `logoUrl`, `creator`, `editors`, `writers`, `newsletter` and `posts`.

**Tag:** `slug`, `name`, `url`, `followers`, `postCount`, `relatedTags` and `posts` (or `writers` on `/top-writers`, each a writer or a publication).

**Response:** `id`, `url`, `text`, `author`, `publishedAt`, `updatedAt`, `claps`, `clappers`, `repliesCount`, `depth` (0 for a response, 1 for a reply), `parentId` and `rootPostId`.

**List:** `id`, `name`, `description`, `url`, `creator`, `storyCount`, `claps`, `clappers`, `responsesCount`, `createdAt`, `lastItemAddedAt` and `posts`.

## Limits

Only what Medium shows to visitors who aren't signed in is available. Pages for signed-in members, such as your stats, reading history and the For you feed, fail straight away and cost nothing. So do deleted stories, unknown writers, tags and lists, private lists, and searches with no results.

Medium's most read lists for a tag are short, about 15 to 25 stories. The newest stories go back through the tag's whole archive.

## Templates

Ready-made [templates](https://docs.spidra.io/templates.md) for Medium: a writer's stories, publication stories, stories by tag, story search, top writers in a topic, writer profiles, responses and people search.

> [!NOTE]
>
> Check Medium's terms before you collect data from it. Stories belong to their writers. You're responsible for how you use what you collect.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.