# Useless Facts API

> Returns a random useless fact or the useless fact of the day.

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

A random useless fact.

Scope: `social:read` · Units: 1

| Parameter | Type | Required | Description |
|---|---|---|---|
| `lang` | string | no | Language of the fact: en or de. (one of en, 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: `id` (string), `language` (string), `source` (string), `sourceUrl` (string), `text` (string), `url` (string)

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

## GET /v1/uselessfacts/today

The useless fact of the day, the same for everyone until midnight UTC.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `lang` | string | no | Language of the fact: en or de. (one of en, 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: `id` (string), `language` (string), `source` (string), `sourceUrl` (string), `text` (string), `url` (string)

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

## GET /v1/uselessfacts/fact

One useless fact by its id, such as one kept from an earlier random or today call.

Scope: `social:read` · Units: 1

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The fact id: the last part of its permalink, such as 26ce38f50c4bd0d6e36c1f011ebac02d. (e.g. 26ce38f50c4bd0d6e36c1f011ebac02d) |
| `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), `language` (string), `source` (string), `sourceUrl` (string), `text` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/uselessfacts/fact?id=26ce38f50c4bd0d6e36c1f011ebac02d" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
