# Tumblr API

> Returns Tumblr blog information, posts, tagged posts, posts by type, and media links of single public posts.

Category: Social & Video. Region: global. 6 endpoints at `https://api.hoshime.com/v1/tumblr/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/tumblr
## GET /v1/tumblr/posts

Posts of one blog, newest first, 20 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `blog` | string | yes | Blog name (staff) or its tumblr.com URL. (e.g. staff) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `body` (string), `createdAt` (string), `id` (string), `noteCount` (integer (int64)), `slug` (string), `tags` (string[]), `title` (string), `type` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/tumblr/posts?blog=staff" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/tumblr/post

One public Tumblr post by its URL: its type, caption and the direct media links (MP4 video, photo or audio).

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | Tumblr post URL, such as https://<blog>.tumblr.com/post/<id>. (e.g. https://animationdesk.tumblr.com/post/190775859037) |
| `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: `blog` (string), `caption` (string), `createdAt` (string), `id` (string), `media` (Media[]), `media[].quality` (string), `media[].type` (string), `media[].url` (string), `type` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/tumblr/post?url=https%3A%2F%2Fanimationdesk.tumblr.com%2Fpost%2F190775859037" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/tumblr/blog

Title, description, timezone and post count of one blog.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `blog` | string | yes | Blog name (staff) or its tumblr.com URL. (e.g. staff) |
| `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: `description` (string), `name` (string), `postCount` (integer (int64)), `timezone` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/tumblr/blog?blog=staff" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/tumblr/tagged

Posts of one blog that carry a tag, newest first, 20 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `blog` | string | yes | Blog name (staff) or its tumblr.com URL. (e.g. staff) |
| `tag` | string | yes | Tag to list, such as art. Case and spaces are as Tumblr tags them. (e.g. art) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `body` (string), `createdAt` (string), `id` (string), `noteCount` (integer (int64)), `slug` (string), `tags` (string[]), `title` (string), `type` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/tumblr/tagged?blog=staff&tag=art" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/tumblr/postsOfType

Posts of one blog of one type (photo, video, audio, quote, link, conversation or regular), newest first, 20 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `blog` | string | yes | Blog name (staff) or its tumblr.com URL. (e.g. staff) |
| `type` | string | yes | Post type to list. (one of photo, video, audio, quote, link, conversation, regular; e.g. photo) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `body` (string), `createdAt` (string), `id` (string), `noteCount` (integer (int64)), `slug` (string), `tags` (string[]), `title` (string), `type` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/tumblr/postsOfType?blog=staff&type=photo" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/tumblr/avatar

The profile picture of one Tumblr blog as a square image URL, at the size asked for.

Scope: `social:read` · Units: 1 · Cached: 1440 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `blog` | string | yes | Blog name (staff) or its tumblr.com URL. (e.g. staff) |
| `pixels` | integer | no | Width and height in pixels, 16 to 512, as the picture comes. (default 128) |
| `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: `height` (any), `url` (string), `width` (any)

```bash
curl "https://api.hoshime.com/v1/tumblr/avatar?blog=staff" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
