# Pikabu — 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.

> Access trending and fresh content from Pikabu's Russian community platform, including hot posts, best posts, and community-specific stories with their full comment threads. Build applications powered by user profiles and detailed post data from one of Russia's most popular social communities.

**Category:** Social Media | **Website:** [pikabu.ru/](https://pikabu.ru/) | **Docs:** [parse.bot/marketplace/deb41159-2751-49fe-a7ea-d02c3b9a7e3c/pikabu-ru-api](https://parse.bot/marketplace/deb41159-2751-49fe-a7ea-d02c3b9a7e3c/pikabu-ru-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-pikabu-ru-api-deb41159/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_best_posts

Get best posts from the /best feed. Returns paginated results ranked by all-time rating. Each page typically returns around 10 stories.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pikabu-ru-api-deb41159/get_best_posts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### get_community_posts

Get posts from a specific community by its slug. Returns paginated results. The slug must match an existing community on Pikabu; invalid slugs will result in an upstream error.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `community_slug` | string | Yes | The slug of the community as it appears in the URL path (e.g. 'cats', 'science', 'games'). |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pikabu-ru-api-deb41159/get_community_posts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"community_slug":"<string>","page":"<integer>"}'
```

### get_fresh_posts

Get fresh/new posts from the /new feed. Returns the most recently published stories in reverse chronological order. Each page typically returns around 10 stories.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pikabu-ru-api-deb41159/get_fresh_posts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### get_hot_posts

Get trending/hot posts from the homepage feed. Returns paginated results with story metadata including title, author, rating, and comments count. Each page typically returns around 10 stories.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pikabu-ru-api-deb41159/get_hot_posts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### get_story_details

Get full story details including all comments. Fetches comments via the site's internal AJAX comment tree API. Returns the story metadata, full HTML content, and a flat list of all comments with threading information (parent_id, indent).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full URL of the story (e.g. 'https://pikabu.ru/story/some-slug_12345') or a numeric story ID. |

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

### get_user_profile

Get user profile information including rating, post count, comment count, and subscriber count. Returns basic stats for any public Pikabu user.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `username` | string | Yes | The username of the Pikabu user (e.g. 'admin'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pikabu-ru-api-deb41159/get_user_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username":"<string>"}'
```
