# oEmbed API

> Returns oEmbed data for links from YouTube, TikTok, X and Pinterest, plus supported providers.

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

The oEmbed description of a YouTube, TikTok, X or Pinterest link: title, author, thumbnail and embed HTML.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | https link to a video, track or post on a supported provider. (e.g. https://www.youtube.com/watch?v=dQw4w9WgXcQ) |
| `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), `height` (integer (int64)), `html` (string), `provider` (string), `thumbnailUrl` (string), `title` (string), `type` (string), `url` (string), `width` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/oembed/embed?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/oembed/providers

The providers the embed endpoint serves and the hosts it accepts for each.

Scope: `social:read` · Units: 1 · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `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: `hosts` (string[]), `name` (string)

```bash
curl "https://api.hoshime.com/v1/oembed/providers" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
