# Project Gutenberg API

> Returns Project Gutenberg book records by search, id, topic or recent addition, ordered by downloads or date added.

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

Search Project Gutenberg books by title or author, most downloaded first. Without a query it lists the most downloaded books.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Words in the title or the author's name. (e.g. austen) |
| `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: `authors` (Author[]), `authors[].avatarUrl` (string), `authors[].id` (string), `authors[].name` (string), `authors[].url` (string), `authors[].username` (string), `coverUrl` (string), `downloadCount` (integer (int64)), `id` (string), `languages` (Term[]), `languages[].name` (string), `readUrl` (string), `subjects` (Term[]), `subjects[].name` (string), `title` (string)

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

## GET /v1/gutendex/book

One Project Gutenberg book by its Gutenberg id.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | integer | yes | Gutenberg book number, such as 1342. (e.g. 1342) |
| `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: `authors` (Author[]), `authors[].avatarUrl` (string), `authors[].id` (string), `authors[].name` (string), `authors[].url` (string), `authors[].username` (string), `coverUrl` (string), `downloadCount` (integer (int64)), `id` (string), `languages` (Term[]), `languages[].name` (string), `readUrl` (string), `subjects` (Term[]), `subjects[].name` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/gutendex/book?id=1342" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/gutendex/topic

Books filed under a subject or bookshelf, most downloaded first, 32 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `topic` | string | yes | Word from a subject or bookshelf, such as mystery, children or poetry. (e.g. mystery) |
| `languages` | string | no | Only books in these languages, comma separated, such as en or en,fr. |
| `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: `authors` (Author[]), `authors[].avatarUrl` (string), `authors[].id` (string), `authors[].name` (string), `authors[].url` (string), `authors[].username` (string), `coverUrl` (string), `downloadCount` (integer (int64)), `id` (string), `languages` (Term[]), `languages[].name` (string), `readUrl` (string), `subjects` (Term[]), `subjects[].name` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/gutendex/topic?topic=mystery" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/gutendex/latest

The books most recently added to Project Gutenberg, newest first, 32 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `languages` | string | no | Only books in these languages, comma separated, such as en or en,fr. |
| `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: `authors` (Author[]), `authors[].avatarUrl` (string), `authors[].id` (string), `authors[].name` (string), `authors[].url` (string), `authors[].username` (string), `coverUrl` (string), `downloadCount` (integer (int64)), `id` (string), `languages` (Term[]), `languages[].name` (string), `readUrl` (string), `subjects` (Term[]), `subjects[].name` (string), `title` (string)

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

## GET /v1/gutendex/byIds

Several books by their Gutenberg numbers, up to 32 in one call.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `ids` | string | yes | Gutenberg book numbers, comma separated, such as 1342,84. (e.g. 1342,84) |
| `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: `authors` (Author[]), `authors[].avatarUrl` (string), `authors[].id` (string), `authors[].name` (string), `authors[].url` (string), `authors[].username` (string), `coverUrl` (string), `downloadCount` (integer (int64)), `id` (string), `languages` (Term[]), `languages[].name` (string), `readUrl` (string), `subjects` (Term[]), `subjects[].name` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/gutendex/byIds?ids=1342%2C84" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
