# Medium API

> Returns the latest Medium stories of a user, a topic or a publication.

Category: News & Media. Region: global. 3 endpoints at `https://api.hoshime.com/v1/medium/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/medium
## GET /v1/medium/user

The latest stories of one Medium user.

Scope: `social:read` · Units: 1 · Cached: 15 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | Medium username, with or without the @. (e.g. medium) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `source` (string), `summary` (string), `tags` (string[]), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/medium/user?username=medium" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/medium/tag

The latest stories on one Medium topic.

Scope: `social:read` · Units: 1 · Cached: 15 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tag` | string | yes | Topic slug in lower case, such as programming. (e.g. programming) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `source` (string), `summary` (string), `tags` (string[]), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/medium/tag?tag=programming" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/medium/publication

The latest stories of one Medium publication, from its RSS feed.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `slug` | string | yes | Publication slug, the last part of its address, such as towards-data-science. (e.g. towards-data-science) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `source` (string), `summary` (string), `tags` (string[]), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/medium/publication?slug=towards-data-science" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
