# Pastes API

> Returns the text content of public pastes from Pastebin, Pastefy, Rentry, Paste-Drop, tempel.in and ScriptPastebins.

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

The raw text of a public Pastebin paste.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | Pastebin paste URL or id, such as 1PWxczzC. (e.g. 1PWxczzC) |
| `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: `content` (string), `id` (string), `lines` (integer (int64)), `size` (integer (int64)), `url` (string)

```bash
curl "https://api.hoshime.com/v1/pastes/pastebin?url=1PWxczzC" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/pastes/pastefy

A public Pastefy paste: its content, title and author.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | Pastefy paste URL or id. (e.g. 35OpZwqx) |
| `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` (string), `content` (string), `createdAt` (string), `id` (string), `title` (string), `type` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/pastes/pastefy?url=35OpZwqx" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/pastes/rentry

The rendered text of a public Rentry paste, with its title.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | Rentry page URL or id, such as what. (e.g. what) |
| `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: `id` (string), `text` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/pastes/rentry?url=what" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/pastes/pasteDrop

A public Paste-Drop paste: its title and content.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | Paste-Drop URL or slug, such as AdoptMeScript2024. (e.g. AdoptMeScript2024) |
| `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: `content` (string), `id` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/pastes/pasteDrop?url=AdoptMeScript2024" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/pastes/tempelIn

A public tempel.in paste: its title, author, views and content.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | tempel.in paste URL or slug, such as TVJ35jiR. (e.g. TVJ35jiR) |
| `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` (string), `content` (string), `id` (string), `title` (string), `url` (string), `views` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/pastes/tempelIn?url=TVJ35jiR" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/pastes/scriptPastebins

A public ScriptPastebins post: its title and script text.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | ScriptPastebins post URL or slug, such as dum-hub-blox-fruits. (e.g. dum-hub-blox-fruits) |
| `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: `id` (string), `script` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/pastes/scriptPastebins?url=dum-hub-blox-fruits" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
