# Wikipedia API

> Returns Wikipedia article summaries, search results, page views, random articles, categories and language editions.

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

Lead summary, description and thumbnail of one article.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `title` | string | yes | Article title, or a <lang>.wikipedia.org/wiki/<title> URL. (e.g. Indonesia) |
| `lang` | string | no | Wikipedia language code, such as en or de. 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), `lastModified` (string), `pageId` (string), `thumbnail` (Image | null), `thumbnail.height` (any), `thumbnail.url` (string), `thumbnail.width` (any), `title` (string), `type` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wikipedia/summary?title=Indonesia" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wikipedia/search

Articles that match a search in one Wikipedia language, 20 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Search terms. (e.g. Indonesia) |
| `lang` | string | no | Wikipedia language code, 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: `lastModified` (string), `pageId` (string), `snippet` (string), `title` (string), `url` (string), `wordCount` (integer (int64))

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

## GET /v1/wikipedia/pageviews

Daily page views of one article by people (not bots) over the last days, up to 90.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `article` | string | yes | Article title, or a <lang>.wikipedia.org/wiki/<title> URL. (e.g. Indonesia) |
| `lang` | string | no | Wikipedia language code, such as en or de. A URL sets it. (default en) |
| `days` | integer | no | Days to count back from the last complete day. Ignored when from or to is set. (default 30) |
| `from` | string | no | First day of the range as YYYY-MM-DD, from 2015-07-01. Overrides days. |
| `to` | string | no | Last day of the range as YYYY-MM-DD. Default: the last complete day. Overrides days. |
| `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: `daily` (Day[]), `daily[].date` (string), `daily[].views` (integer (int64)), `from` (string), `lang` (string), `title` (string), `to` (string), `total` (integer (int64)), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wikipedia/pageviews?article=Indonesia" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wikipedia/random

Summary of a random article.

Scope: `social:read` · Units: 1

| Parameter | Type | Required | Description |
|---|---|---|---|
| `lang` | string | no | Wikipedia language code, 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: `description` (string), `extract` (string), `lang` (string), `lastModified` (string), `pageId` (string), `thumbnail` (Image | null), `thumbnail.height` (any), `thumbnail.url` (string), `thumbnail.width` (any), `title` (string), `type` (string), `url` (string)

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

## GET /v1/wikipedia/categories

Visible categories of one article.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `title` | string | yes | Article title, or a <lang>.wikipedia.org/wiki/<title> URL. (e.g. Go (programming language)) |
| `lang` | string | no | Wikipedia language code, such as en or de. 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), `title` (string)

```bash
curl "https://api.hoshime.com/v1/wikipedia/categories?title=Go+%28programming+language%29" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wikipedia/languages

The same article in other language editions of Wikipedia.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `title` | string | yes | Article title, or a <lang>.wikipedia.org/wiki/<title> URL. (e.g. Indonesia) |
| `lang` | string | no | Wikipedia language code of the title, such as en or de. 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` (LangLink[]), `items[].lang` (string), `items[].title` (string), `items[].url` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/wikipedia/languages?title=Indonesia" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wikipedia/mostRead

The most-read articles of one Wikipedia day, with view counts.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `date` | string | no | Day as YYYY-MM-DD, from 2015-01-01. Default: yesterday (UTC). (e.g. 2025-06-01) |
| `lang` | string | no | Wikipedia language code, 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: `date` (string), `items` (ReadArticle[]), `items[].extract` (string), `items[].rank` (integer (int64)), `items[].title` (string), `items[].url` (string), `items[].views` (integer (int64)), `lang` (string)

```bash
curl "https://api.hoshime.com/v1/wikipedia/mostRead?date=2025-06-01" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wikipedia/onThisDay

Events of one calendar day in history, with the articles about them.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `date` | string | no | Day as YYYY-MM-DD; only the month and day matter. Default: yesterday (UTC). (e.g. 2025-06-01) |
| `lang` | string | no | Wikipedia language code, 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: `date` (string), `items` (Event[]), `items[].pages` (RelatedArticle[]), `items[].text` (string), `items[].year` (integer (int64)), `lang` (string)

```bash
curl "https://api.hoshime.com/v1/wikipedia/onThisDay?date=2025-06-01" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wikipedia/nearby

Wikipedia articles about places near a latitude and longitude, nearest first, within a radius of up to 10 km.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `lat` | string | yes | Latitude in degrees, from -90 to 90, such as -6.2. (e.g. -6.2) |
| `lon` | string | yes | Longitude in degrees, from -180 to 180, such as 106.8. (e.g. 106.8) |
| `radius` | integer | no | Radius in metres, from 10 to 10000. (default 1000) |
| `limit` | integer | no | Articles to return, from 1 to 50. (default 20) |
| `lang` | string | no | Wikipedia language code, 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: `distanceMetres` (number (double)), `latitude` (number (double)), `longitude` (number (double)), `pageId` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wikipedia/nearby?lat=-6.2&lon=106.8" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wikipedia/backlinks

Articles of one Wikipedia language that link to an article, 20 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `title` | string | yes | Article title, or a <lang>.wikipedia.org/wiki/<title> URL. (e.g. Indonesia) |
| `lang` | string | no | Wikipedia language code, such as en or de. A URL sets it. (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), `redirect` (boolean), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wikipedia/backlinks?title=Indonesia" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
