# TheMealDB API

> Recipes with ingredients, measures, cuisine and instructions from themealdb.com recipe pages.

Category: Entertainment & Books. Region: Global. 4 endpoints at `https://api.hoshime.com/v1/themealdb/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/themealdb
## GET /v1/themealdb/meal

One recipe from its TheMealDB page: ingredients with measures, cuisine, tags and instructions.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Recipe id such as 52772, or the recipe's themealdb.com URL. (e.g. 52772) |
| `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: `areaCode` (string), `id` (string), `imageUrl` (string), `ingredients` (Ingredient[]), `ingredients[].measure` (string), `ingredients[].name` (string), `instructions` (string), `name` (string), `tags` (string[]), `url` (string)

```bash
curl "https://api.hoshime.com/v1/themealdb/meal?id=52772" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/themealdb/search

Recipes whose name matches a search, from TheMealDB's search page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Words of the recipe name, such as arrabiata. (e.g. arrabiata) |
| `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), `imageUrl` (string), `name` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/themealdb/search?query=arrabiata" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/themealdb/letter

Recipes whose name starts with one letter.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `letter` | string | yes | One letter, a to z. (e.g. a) |
| `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), `imageUrl` (string), `name` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/themealdb/letter?letter=a" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/themealdb/area

Recipes of one country's cuisine, by the country code TheMealDB uses.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `area` | string | yes | Two-letter country code of the cuisine, such as jp, it or mx. (e.g. jp) |
| `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), `imageUrl` (string), `name` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/themealdb/area?area=jp" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
