# Forums Spacebattles — 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 read science fiction stories from the SpaceBattles Creative Library, accessing detailed story metadata, author profiles, and full chapter content all in one place. Discover new fiction across various genres with easy browsing and comprehensive information about stories and their creators.

**Category:** Entertainment | **Website:** [forums.spacebattles.com/](https://forums.spacebattles.com/) | **Docs:** [parse.bot/marketplace/b0186f12-c098-4d8b-8662-7cb459c1791b/forums-spacebattles-com-api](https://parse.bot/marketplace/b0186f12-c098-4d8b-8662-7cb459c1791b/forums-spacebattles-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-forums-spacebattles-com-api-b0186f12/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_author

Retrieve a member/author profile including username, join date, message count, total likes received, and awards.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `member_id` | string | Yes | Numeric member ID from SpaceBattles (e.g. from get_story author_id field). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-forums-spacebattles-com-api-b0186f12/get_author \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"member_id":"<string>"}'
```

### get_story

Retrieve full metadata for a fiction story including title, author info, categorized tags, story stats (status, watchers, word count), and an ordered list of chapters with titles and dates. Requires two requests: one for the thread page metadata and one for the threadmarks (chapter listing).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `thread_id` | string | Yes | Numeric thread ID from SpaceBattles (e.g. from search_stories results). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-forums-spacebattles-com-api-b0186f12/get_story \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"thread_id":"<string>"}'
```

### get_story_content

Retrieve the text content of a story's chapters via reader mode. Returns the full prose text of each threadmarked chapter on the requested page. Stories with many chapters may span multiple pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for stories with many chapters. |
| `thread_id` | string | Yes | Numeric thread ID from SpaceBattles. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-forums-spacebattles-com-api-b0186f12/get_story_content \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","thread_id":"<string>"}'
```

### search_stories

Browse fiction stories in the SpaceBattles Creative Library with optional filtering by tag, fandom/setting, and title keyword. Results are ordered by most recent activity. Each story summary includes title, author, tags with categories (Setting, Character, Genre, Warning, Content), word count, and engagement stats. Title filtering is applied client-side to the current page of results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `fandom` | string | No | Fandom/setting tag to filter stories by (e.g. 'worm', 'rwby', 'pokemon'). Functions as a tag filter scoped to fandom. If both fandom and tags are provided, fandom takes precedence. |
| `page` | integer | No | Page number for pagination. |
| `tags` | string | No | Tag name to filter stories by (e.g. 'worm', 'original', 'rwby'). Matches the site's tag vocabulary. Omitting returns all stories. |
| `title` | string | No | Case-insensitive keyword to filter stories by title. Applied client-side to the current page results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-forums-spacebattles-com-api-b0186f12/search_stories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fandom":"<string>","page":"<integer>","tags":"<string>","title":"<string>"}'
```
