# Funtrivia — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and browse thousands of trivia questions and quizzes across multiple categories, with the ability to filter by topic, difficulty, or find random challenges to test your knowledge. Discover trending topics, top-rated quizzes, and the latest additions to build custom trivia games or enhance your learning experience.

**Category:** Entertainment | **Website:** [funtrivia.com/](https://funtrivia.com/) | **Docs:** [parse.bot/marketplace/b8196629-b722-4750-81b0-b54933cd1dc4/funtrivia-com-api](https://parse.bot/marketplace/b8196629-b722-4750-81b0-b54933cd1dc4/funtrivia-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_hot_topics

Retrieve trending/hot topic quizzes currently popular on FunTrivia. Returns quizzes that are currently receiving high engagement.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_hot_topics \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_most_played_quizzes

Retrieve currently most played quizzes on FunTrivia. Returns quizzes that are receiving the most plays, with titles and URLs.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_most_played_quizzes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_newest_quizzes

Retrieve the newest quizzes recently added to FunTrivia. Returns quiz titles and URLs for the most recently published quizzes.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_newest_quizzes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_quiz_categories

Retrieve the list of top-level quiz categories with their URL slugs. Slugs are used with get_quizzes_by_category to browse quizzes within a category.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_quiz_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_quiz_detail

Retrieve details for a specific quiz, including title, metadata, and all questions with their options and correct answers. Supports both /trivia-quiz/ and /quiz/ URL formats from FunTrivia.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full quiz URL (e.g. 'https://www.funtrivia.com/trivia-quiz/Animals/Various-Animals-250320.html'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_quiz_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_quizzes_by_category

Retrieve quizzes within a specific category. Use the slug from get_quiz_categories with '/index' appended for top-level categories (e.g. 'animals/index'). Also supports subcategory paths. Returns the category name and a list of quizzes with titles and URLs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Category slug path (e.g. 'animals/index', 'movies/index', 'brain_teasers/word_play'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_quizzes_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_random_quiz

Retrieve a random quiz with its full details including title, metadata, and all questions with options and correct answers. Each call returns a different quiz.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_random_quiz \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_random_trivia_questions

Fetch random trivia questions from the main trivia questions page. Returns a set of questions across various categories with answers, explanations, difficulty levels, and choices. Results change on each request.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_random_trivia_questions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_top_rated

Retrieve top-rated quizzes on FunTrivia. Returns quizzes that have received the highest user ratings, with titles and URLs.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_top_rated \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_trivia_categories

Retrieve the list of top-level trivia categories from the questions section of FunTrivia. Each category has an ID usable with get_trivia_subtopics_by_category and get_trivia_questions_by_category.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_trivia_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_trivia_questions_by_category

Retrieve trivia questions directly from a category page. Returns questions displayed on that category's main page with answers, explanations, difficulty, and choices.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cat_id` | string | Yes | Category ID from get_trivia_categories (e.g. '1' for Animals). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_trivia_questions_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cat_id":"<string>"}'
```

### get_trivia_questions_by_subtopic

Retrieve trivia questions for a specific sub-topic. Returns questions with the correct answer, explanation, difficulty level, and incorrect choices. Typically returns 10-20 questions per subtopic.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `did` | string | Yes | Sub-topic ID from get_trivia_subtopics_by_category (e.g. '21375' for African Animals). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_trivia_questions_by_subtopic \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"did":"<string>"}'
```

### get_trivia_subtopics_by_category

Retrieve sub-topics for a given trivia category. Returns subtopic IDs usable with get_trivia_questions_by_subtopic. Not all categories have subtopics; categories without subtopics return an empty array.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cat_id` | string | Yes | Category ID from get_trivia_categories (e.g. '1' for Animals). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/get_trivia_subtopics_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cat_id":"<string>"}'
```

### search_quizzes

Search for quizzes by keyword. Returns matching quiz titles and URLs across all categories. Results are ranked by relevance to the search query.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword (e.g. 'animals', 'history', 'science'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-funtrivia-com-api-b8196629/search_quizzes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
