# Bored API Activity Fetcher (`brunofin/bored-api-activity-fetcher`) Actor

Fetches random, filtered, or key-based activity suggestions from the Bored API (App Brewery mirror) — no API key required. Ideal for ed-tech gamification, idea-a-day feeds, and engagement pipelines.

- **URL**: https://apify.com/brunofin/bored-api-activity-fetcher.md
- **Developed by:** [Bruno Finger](https://apify.com/brunofin) (community)
- **Categories:** Education
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Bored API Activity Fetcher

Fetches **activity suggestions** from the Bored API (App Brewery mirror) — random, filtered by type/participants, or looked up by key — completely **no API key required**.

Sourced from the [Bored API by App Brewery](https://bored-api.appbrewery.com/) (`bored-api.appbrewery.com`).

### Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `mode` | string | no | `random` | How to query: `random`, `filter`, or `key`. |
| `count` | integer | no | `5` | Number of random activities to fetch (1–50). Only used in `random` mode. |
| `type` | string | no | — | Activity type filter (`education`, `recreational`, `social`, `charity`, `cooking`, `relaxation`, `busywork`). Used in `filter` mode. |
| `participants` | integer | no | — | Participant count filter (1, 2, 3, 4, 5, 6, 8). Used in `filter` mode. |
| `key` | string | no | — | Numeric activity key (e.g. `"3943506"`). Required in `key` mode. |
| `includeSummary` | boolean | no | `true` | If true, also emit one summary record at the end listing all activities found. |
| `timeoutSeconds` | integer | no | `30` | HTTP timeout per API request (1–120). |

#### Input examples

Random activities (default mode):

```json
{
  "mode": "random",
  "count": 5,
  "includeSummary": true
}
```

Filter by type and participants:

```json
{
  "mode": "filter",
  "type": "recreational",
  "participants": 1,
  "includeSummary": true
}
```

Lookup by key:

```json
{
  "mode": "key",
  "key": "3943506",
  "includeSummary": true
}
```

### Output

One dataset item per activity (fields: `activity`, `availability`, `type`, `participants`, `price`, `accessibility`, `duration`, `kidFriendly`, `link`, `key`, `sourceUrl`) plus optional summary item(s) per mode (`queryType`, `queryValue`, `activityCount`, `activities`). Failed lookups emit an item with an `error` field.

Each activity emitted also charges `activity-fetched` event (PAY\_PER\_EVENT at $0.0005).

The `overview` dataset view shows `queryType`, `queryValue`, `activity`, `type`, `participants`, `price`, `availability`, `accessibility`, `duration`, `kidFriendly`, `key`, `link`, `activityCount`, and `error`.

### Usage

```bash
cd bored-api-activity-fetcher
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
echo '{"mode": "random", "count": 5}' > INPUT.json
.venv/bin/python src/main.py
```

Or with the Apify CLI:

```bash
apify run --input-file INPUT.json
```

### Pricing

PAY\_PER\_EVENT — $0.0005 per `activity-fetched` event (one activity suggestion).

### Notes

- The Bored API is **keyless** (no registration needed).
- The canonical `boredapi.com` host is unreliable; this actor uses the verified working `bored-api.appbrewery.com` mirror.
- The `/filter` endpoint requires at least `type` or `participants` to be specified.
- Valid participant counts: 1, 2, 3, 4, 5, 6, 8 (7 is not supported by the API).
- The `/filter` endpoint returns HTTP 404 with a JSON error body when no activities match the given filters.
- Rate limit: 100 requests per 15 minutes per the App Brewery documentation.

### Related actors

- [Open-Meteo Weather](https://apify.com/brunofin/open-meteo-weather) — general weather forecasts (Open-Meteo API)
- [NWS Weather Alerts Fetcher](https://apify.com) — active U.S. weather alerts (NOAA API)

# Actor input Schema

## `mode` (type: `string`):

How to query the Bored API. "random" fetches random activity(ies) — count controls how many. "filter" returns activities matching type/participants. "key" looks up a single activity by its numeric key.

## `count` (type: `integer`):

How many random activities to fetch (1-50). Each call to /random returns one activity; the actor calls it count times. In filter mode, the API already returns a list so count is ignored.

## `type` (type: `string`):

Filter activities by type. Valid values: education, recreational, social, charity, cooking, relaxation, busywork. Used in filter mode.

## `participants` (type: `integer`):

Filter activities by participant count. Valid values: 1, 2, 3, 4, 5, 6, 8. Used in filter mode. The Bored API filter requires at least type or participants to be specified.

## `key` (type: `string`):

The numeric key identifying a specific activity. Required when mode is "key" (e.g. "3943506").

## `includeSummary` (type: `boolean`):

If true, also emit one summary record at the end listing all activities found.

## `timeoutSeconds` (type: `integer`):

HTTP timeout per Bored API request.

## Actor input object example

```json
{
  "mode": "random",
  "count": 5,
  "includeSummary": true,
  "timeoutSeconds": 30
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("brunofin/bored-api-activity-fetcher").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("brunofin/bored-api-activity-fetcher").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call brunofin/bored-api-activity-fetcher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,brunofin/bored-api-activity-fetcher"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/VuFVJxGfUdEMK6iJ6/builds/VDwrcS0afh4UD9IR7/openapi.json
