---
title: "Search posts"
description: "Posts by words, platform, account, collection, outlier score or date; sorted and paged. Needs the `videos:read` permission."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.mosio.me/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Mosio REST API › Discover

`GET /v1/discover/posts`

Posts by words, platform, account, collection, outlier score or date; sorted and paged. Needs the `videos:read` permission.

## Authentication

- `apiKey`, apiKey, in header, header `x-api-key`

## Query parameters

- `q` (`searchDiscoverPosts.query.q`; string, optional) — Words in the caption or transcript
  - maxLength 200
- `platform` (`searchDiscoverPosts.query.platform`; string, optional)
  - one of `"tiktok"`, `"instagram"`, `"youtube"`, `"facebook"`
- `account_id` (`searchDiscoverPosts.query.account_id`; any of, optional) — Only posts of these accounts
  - any of: `string`, `array<string>`
- `collection_id` (`searchDiscoverPosts.query.collection_id`; string, optional) — Only posts in this Library collection
  - pattern `^dcl_[0-9a-f]{16}$`
- `min_outlier` (`searchDiscoverPosts.query.min_outlier`; number, optional) — Only posts at least this many times their account's median (2 = outlier)
  - min 0; max 1000
- `min_views` (`searchDiscoverPosts.query.min_views`; integer, optional)
  - min 0; max 9007199254740991
- `kind` (`searchDiscoverPosts.query.kind`; string, optional)
  - one of `"video"`, `"image"`, `"carousel"`
- `posted_from` (`searchDiscoverPosts.query.posted_from`; string, optional) — YYYY-MM-DD, Jakarta day
  - format `date`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$`
- `posted_to` (`searchDiscoverPosts.query.posted_to`; string, optional)
  - format `date`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$`
- `sort` (`searchDiscoverPosts.query.sort`; string, optional)
  - one of `"outlier"`, `"views"`, `"engagement"`, `"likes"`, `"comments"`, `"shares"`, `"recent"`; default `"outlier"`
- `page` (`searchDiscoverPosts.query.page`; integer, optional)
  - min 1; max 1000; default `1`
- `limit` (`searchDiscoverPosts.query.limit`; integer, optional)
  - min 1; max 100; default `25`

## Code samples

### cURL

```bash
curl --request GET \
  --url https://app.mosio.me/v1/discover/posts \
  --header 'x-api-key: <x-api-key>'
```

### TypeScript

```typescript
const url = 'https://app.mosio.me/v1/discover/posts';
const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://app.mosio.me/v1/discover/posts"

headers = {"x-api-key": "<x-api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

A page of posts.

#### Example

```json
{
  "posts": [
    {
      "id": "string",
      "platform": "tiktok",
      "url": "string",
      "kind": "video",
      "caption": "string",
      "thumbnail_url": "string",
      "duration_seconds": 0,
      "posted_at": "string",
      "views": 0,
      "likes": 0,
      "comments": 0,
      "shares": 0,
      "saves": 0,
      "engagement_rate": 0,
      "outlier_score": 0,
      "has_transcript": true,
      "reference_media_id": "string",
      "liked": true,
      "account": {
        "id": "string",
        "platform": "tiktok",
        "handle": "string",
        "name": "string",
        "avatar_url": "string",
        "median_views": 0
      },
      "last_seen_at": "string"
    }
  ],
  "total": -9007199254740991,
  "page": -9007199254740991,
  "pages": -9007199254740991
}
```

- `posts` (`searchDiscoverPosts.response.200.posts`; array<object>, required)
  - `id` (`searchDiscoverPosts.response.200.posts.id`; string, required)
  - `platform` (`searchDiscoverPosts.response.200.posts.platform`; string, required)
    - one of `"tiktok"`, `"instagram"`, `"youtube"`, `"facebook"`
  - `url` (`searchDiscoverPosts.response.200.posts.url`; string, required)
  - `kind` (`searchDiscoverPosts.response.200.posts.kind`; string, required)
    - one of `"video"`, `"image"`, `"carousel"`
  - `caption` (`searchDiscoverPosts.response.200.posts.caption`; string, required)
  - `thumbnail_url` (`searchDiscoverPosts.response.200.posts.thumbnail_url`; string | null, required)
  - `duration_seconds` (`searchDiscoverPosts.response.200.posts.duration_seconds`; number | null, required)
  - `posted_at` (`searchDiscoverPosts.response.200.posts.posted_at`; string | null, required)
  - `views` (`searchDiscoverPosts.response.200.posts.views`; number | null, required)
  - `likes` (`searchDiscoverPosts.response.200.posts.likes`; number | null, required)
  - `comments` (`searchDiscoverPosts.response.200.posts.comments`; number | null, required)
  - `shares` (`searchDiscoverPosts.response.200.posts.shares`; number | null, required)
  - `saves` (`searchDiscoverPosts.response.200.posts.saves`; number | null, required)
  - `engagement_rate` (`searchDiscoverPosts.response.200.posts.engagement_rate`; number | null, required)
  - `outlier_score` (`searchDiscoverPosts.response.200.posts.outlier_score`; number | null, required)
  - `has_transcript` (`searchDiscoverPosts.response.200.posts.has_transcript`; boolean, required)
  - `reference_media_id` (`searchDiscoverPosts.response.200.posts.reference_media_id`; string | null, required)
  - `liked` (`searchDiscoverPosts.response.200.posts.liked`; boolean, required)
  - `account` (`searchDiscoverPosts.response.200.posts.account`; object, required)
    - `id` (`searchDiscoverPosts.response.200.posts.account.id`; string, required)
    - `platform` (`searchDiscoverPosts.response.200.posts.account.platform`; string, required)
      - one of `"tiktok"`, `"instagram"`, `"youtube"`, `"facebook"`
    - `handle` (`searchDiscoverPosts.response.200.posts.account.handle`; string, required)
    - `name` (`searchDiscoverPosts.response.200.posts.account.name`; string | null, required)
    - `avatar_url` (`searchDiscoverPosts.response.200.posts.account.avatar_url`; string | null, required)
    - `median_views` (`searchDiscoverPosts.response.200.posts.account.median_views`; number | null, required)
  - `last_seen_at` (`searchDiscoverPosts.response.200.posts.last_seen_at`; string, required)
- `total` (`searchDiscoverPosts.response.200.total`; integer, required)
  - min -9007199254740991; max 9007199254740991
- `page` (`searchDiscoverPosts.response.200.page`; integer, required)
  - min -9007199254740991; max 9007199254740991
- `pages` (`searchDiscoverPosts.response.200.pages`; integer, required)
  - min -9007199254740991; max 9007199254740991

### 400

The request body is not valid JSON or does not match the schema.

#### Example

```json
{
  "error": "unauthorized",
  "message": "string",
  "details": null
}
```

- `error` (`searchDiscoverPosts.response.400.error`; string, required) — A stable error code.
  - one of `"unauthorized"`, `"invalid_api_key"`, `"insufficient_scope"`, `"forbidden"`, `"invalid_input"`, `"invalid_composition"`, `"idempotency_conflict"`, `"project_edited"`, `"quota_exceeded"`, `"insufficient_credits"`, `"too_many_active_renders"`, `"duration_too_long"`, `"not_found"`, `"internal_error"`
- `message` (`searchDiscoverPosts.response.400.message`; string, required) — A message for people, in Indonesian.
- `details` (`searchDiscoverPosts.response.400.details`; unknown, optional) — More about the error, such as the fields to fix.

### 401

The API key is missing or not valid.

#### Example

```json
{
  "error": "unauthorized",
  "message": "Kirim API key di header x-api-key."
}
```

- `error` (`searchDiscoverPosts.response.401.error`; string, required) — A stable error code.
  - one of `"unauthorized"`, `"invalid_api_key"`, `"insufficient_scope"`, `"forbidden"`, `"invalid_input"`, `"invalid_composition"`, `"idempotency_conflict"`, `"project_edited"`, `"quota_exceeded"`, `"insufficient_credits"`, `"too_many_active_renders"`, `"duration_too_long"`, `"not_found"`, `"internal_error"`
- `message` (`searchDiscoverPosts.response.401.message`; string, required) — A message for people, in Indonesian.
- `details` (`searchDiscoverPosts.response.401.details`; unknown, optional) — More about the error, such as the fields to fix.


Source: https://docs.mosio.me/api/search-discover-posts/index.md
