# Wikiquote API

> Returns Wikiquote pages by search, with summaries, sections, page lists, categories and random pages.

Category: Search & Knowledge. Region: global. 7 endpoints at `https://api.hoshime.com/v1/wikiquote/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/wikiquote
## GET /v1/wikiquote/search

Pages of Wikiquote whose text matches a search, 10 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Words to search for, such as Einstein. (e.g. Einstein) |
| `lang` | string | no | Language code of the edition, such as en or de. (default en) |
| `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: `pageId` (string), `snippet` (string), `title` (string), `url` (string)

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

## GET /v1/wikiquote/summary

Short description and lead text of one Wikiquote page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `title` | string | yes | Page title, or a <lang>.wikiquote.org/wiki/<title> URL. (e.g. Albert Einstein) |
| `lang` | string | no | Language code of the edition. A URL sets it. (default en) |
| `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), `extract` (string), `lang` (string), `pageId` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wikiquote/summary?title=Albert+Einstein" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wikiquote/sections

The sections of one Wikiquote page, in reading order, with their level and anchor.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `title` | string | yes | Page title, or a <lang>.wikiquote.org/wiki/<title> URL. (e.g. Albert Einstein) |
| `lang` | string | no | Language code of the edition. A URL sets it. (default en) |
| `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: `anchor` (string), `level` (integer (int64)), `number` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/wikiquote/sections?title=Albert+Einstein" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wikiquote/quotes

The quotes of one Wikiquote page, in reading order, each with the heading of its section. Page with cursor.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `title` | string | yes | Page title, or a <lang>.wikiquote.org/wiki/<title> URL. (e.g. Albert Einstein) |
| `lang` | string | no | Language code of the edition. A URL sets it. (default en) |
| `limit` | integer | no | Items per page, 1 to 100. (default 20) |
| `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: `section` (string), `text` (string)

```bash
curl "https://api.hoshime.com/v1/wikiquote/quotes?title=Albert+Einstein" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wikiquote/pages

Page titles of the main namespace in alphabetical order, 50 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `lang` | string | no | Language code of the edition, such as en or de. (default en) |
| `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: `pageId` (string), `snippet` (string), `title` (string), `url` (string)

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

## GET /v1/wikiquote/categories

The visible categories of one Wikiquote page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `title` | string | yes | Page title, or a <lang>.wikiquote.org/wiki/<title> URL. (e.g. Albert Einstein) |
| `lang` | string | no | Language code of the edition. A URL sets it. (default en) |
| `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: `items` (Category[]), `items[].title` (string), `items[].url` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/wikiquote/categories?title=Albert+Einstein" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wikiquote/random

Random pages of the main namespace, 1 to 10 at a time. Each call returns new ones, so it is not cached.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 10. (default 1) |
| `lang` | string | no | Language code of the edition, such as en or de. (default en) |
| `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: `pageId` (string), `snippet` (string), `title` (string), `url` (string)

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