---
title: "Send a page the extension read"
description: "One page of posts (at most 200): accounts and posts are added or updated (fields left out keep their value), numbers are snapshotted at most hourly, and medians and outlier scores are worked out again. Saved, Liked, Favorites and collection pages also fill a Library collection. Needs the `videos:create` 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

`POST /v1/discover/ingest`

One page of posts (at most 200): accounts and posts are added or updated (fields left out keep their value), numbers are snapshotted at most hourly, and medians and outlier scores are worked out again. Saved, Liked, Favorites and collection pages also fill a Library collection. Needs the `videos:create` permission.

## Authentication

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

## Request body

_Required._

- `platform` (`ingestDiscoverPage.platform`; string, required)
  - one of `"tiktok"`, `"instagram"`, `"youtube"`, `"facebook"`
- `page` (`ingestDiscoverPage.page`; string, required)
  - one of `"profile"`, `"search"`, `"explore"`, `"feed"`, `"saved"`, `"liked"`, `"favorites"`, `"collection"`
- `posts` (`ingestDiscoverPage.posts`; array<object>, required)
  - `external_id` (`ingestDiscoverPage.posts.external_id`; string, required)
    - minLength 1; maxLength 200
  - `url` (`ingestDiscoverPage.posts.url`; string, required)
    - format `uri`; maxLength 2000
  - `account` (`ingestDiscoverPage.posts.account`; object, optional)
    - `handle` (`ingestDiscoverPage.posts.account.handle`; string, required)
      - minLength 1; maxLength 100
    - `name` (`ingestDiscoverPage.posts.account.name`; string, optional)
      - maxLength 200
    - `avatar_url` (`ingestDiscoverPage.posts.account.avatar_url`; string, optional)
      - format `uri`; maxLength 2000
    - `url` (`ingestDiscoverPage.posts.account.url`; string, optional)
      - format `uri`; maxLength 2000
    - `followers` (`ingestDiscoverPage.posts.account.followers`; any of, optional)
      - any of: `integer`, `null`
    - `posts_count` (`ingestDiscoverPage.posts.account.posts_count`; any of, optional)
      - any of: `integer`, `null`
  - `kind` (`ingestDiscoverPage.posts.kind`; string, optional)
    - one of `"video"`, `"image"`, `"carousel"`; default `"video"`
  - `caption` (`ingestDiscoverPage.posts.caption`; string, optional)
    - maxLength 5000; default `""`
  - `thumbnail_url` (`ingestDiscoverPage.posts.thumbnail_url`; string, optional)
    - format `uri`; maxLength 2000
  - `duration_seconds` (`ingestDiscoverPage.posts.duration_seconds`; any of, optional)
    - any of: `number`, `null`
  - `posted_at` (`ingestDiscoverPage.posts.posted_at`; any of, optional)
    - any of: `string`, `null`
  - `views` (`ingestDiscoverPage.posts.views`; any of, optional)
    - any of: `integer`, `null`
  - `likes` (`ingestDiscoverPage.posts.likes`; any of, optional)
    - any of: `integer`, `null`
  - `comments` (`ingestDiscoverPage.posts.comments`; any of, optional)
    - any of: `integer`, `null`
  - `shares` (`ingestDiscoverPage.posts.shares`; any of, optional)
    - any of: `integer`, `null`
  - `saves` (`ingestDiscoverPage.posts.saves`; any of, optional)
    - any of: `integer`, `null`
  - `transcript` (`ingestDiscoverPage.posts.transcript`; any of, optional)
    - any of: `string`, `null`
- `page_url` (`ingestDiscoverPage.page_url`; string, optional)
  - format `uri`; maxLength 2000
- `account` (`ingestDiscoverPage.account`; object, optional)
  - `handle` (`ingestDiscoverPage.account.handle`; string, required)
    - minLength 1; maxLength 100
  - `name` (`ingestDiscoverPage.account.name`; string, optional)
    - maxLength 200
  - `avatar_url` (`ingestDiscoverPage.account.avatar_url`; string, optional)
    - format `uri`; maxLength 2000
  - `url` (`ingestDiscoverPage.account.url`; string, optional)
    - format `uri`; maxLength 2000
  - `followers` (`ingestDiscoverPage.account.followers`; any of, optional)
    - any of: `integer`, `null`
  - `posts_count` (`ingestDiscoverPage.account.posts_count`; any of, optional)
    - any of: `integer`, `null`
- `collection_name` (`ingestDiscoverPage.collection_name`; string, optional)
  - minLength 1; maxLength 80

## Example request

```json
{
  "platform": "tiktok",
  "page": "profile",
  "page_url": "http://example.com",
  "account": {
    "handle": "string",
    "name": "string",
    "avatar_url": "http://example.com",
    "url": "http://example.com",
    "followers": 10000000000000,
    "posts_count": 100000000
  },
  "collection_name": "string",
  "posts": [
    {
      "external_id": "string",
      "url": "http://example.com",
      "account": {
        "handle": "string",
        "name": "string",
        "avatar_url": "http://example.com",
        "url": "http://example.com",
        "followers": 10000000000000,
        "posts_count": 100000000
      },
      "kind": "video",
      "caption": "",
      "thumbnail_url": "http://example.com",
      "duration_seconds": 36000,
      "posted_at": "2019-08-24T14:15:22Z",
      "views": 10000000000000,
      "likes": 10000000000000,
      "comments": 10000000000000,
      "shares": 10000000000000,
      "saves": 10000000000000,
      "transcript": "string"
    }
  ]
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://app.mosio.me/v1/discover/ingest \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "platform": "tiktok",
  "page": "profile",
  "page_url": "http://example.com",
  "account": {
    "handle": "string",
    "name": "string",
    "avatar_url": "http://example.com",
    "url": "http://example.com",
    "followers": 10000000000000,
    "posts_count": 100000000
  },
  "collection_name": "string",
  "posts": [
    {
      "external_id": "string",
      "url": "http://example.com",
      "account": {
        "handle": "string",
        "name": "string",
        "avatar_url": "http://example.com",
        "url": "http://example.com",
        "followers": 10000000000000,
        "posts_count": 100000000
      },
      "kind": "video",
      "caption": "",
      "thumbnail_url": "http://example.com",
      "duration_seconds": 36000,
      "posted_at": "2019-08-24T14:15:22Z",
      "views": 10000000000000,
      "likes": 10000000000000,
      "comments": 10000000000000,
      "shares": 10000000000000,
      "saves": 10000000000000,
      "transcript": "string"
    }
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://app.mosio.me/v1/discover/ingest';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'x-api-key': '<x-api-key>'},
  body: JSON.stringify({
    platform: 'tiktok',
    page: 'profile',
    page_url: 'http://example.com',
    account: {
      handle: 'string',
      name: 'string',
      avatar_url: 'http://example.com',
      url: 'http://example.com',
      followers: 10000000000000,
      posts_count: 100000000
    },
    collection_name: 'string',
    posts: [
      {
        external_id: 'string',
        url: 'http://example.com',
        account: {
          handle: 'string',
          name: 'string',
          avatar_url: 'http://example.com',
          url: 'http://example.com',
          followers: 10000000000000,
          posts_count: 100000000
        },
        kind: 'video',
        caption: '',
        thumbnail_url: 'http://example.com',
        duration_seconds: 36000,
        posted_at: '2019-08-24T14:15:22Z',
        views: 10000000000000,
        likes: 10000000000000,
        comments: 10000000000000,
        shares: 10000000000000,
        saves: 10000000000000,
        transcript: 'string'
      }
    ]
  })
};

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/ingest"

payload = {
    "platform": "tiktok",
    "page": "profile",
    "page_url": "http://example.com",
    "account": {
        "handle": "string",
        "name": "string",
        "avatar_url": "http://example.com",
        "url": "http://example.com",
        "followers": 10000000000000,
        "posts_count": 100000000
    },
    "collection_name": "string",
    "posts": [
        {
            "external_id": "string",
            "url": "http://example.com",
            "account": {
                "handle": "string",
                "name": "string",
                "avatar_url": "http://example.com",
                "url": "http://example.com",
                "followers": 10000000000000,
                "posts_count": 100000000
            },
            "kind": "video",
            "caption": "",
            "thumbnail_url": "http://example.com",
            "duration_seconds": 36000,
            "posted_at": "2019-08-24T14:15:22Z",
            "views": 10000000000000,
            "likes": 10000000000000,
            "comments": 10000000000000,
            "shares": 10000000000000,
            "saves": 10000000000000,
            "transcript": "string"
        }
    ]
}
headers = {
    "Content-Type": "application/json",
    "x-api-key": "<x-api-key>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

What changed.

#### Example

```json
{
  "accounts": -9007199254740991,
  "posts_new": -9007199254740991,
  "posts_updated": -9007199254740991,
  "skipped": -9007199254740991,
  "collection_id": "string",
  "posts": [
    {
      "external_id": "string",
      "id": "string",
      "account_id": "string",
      "outlier_score": 0,
      "engagement_rate": 0
    }
  ]
}
```

- `accounts` (`ingestDiscoverPage.response.200.accounts`; integer, required)
  - min -9007199254740991; max 9007199254740991
- `posts_new` (`ingestDiscoverPage.response.200.posts_new`; integer, required)
  - min -9007199254740991; max 9007199254740991
- `posts_updated` (`ingestDiscoverPage.response.200.posts_updated`; integer, required)
  - min -9007199254740991; max 9007199254740991
- `skipped` (`ingestDiscoverPage.response.200.skipped`; integer, required)
  - min -9007199254740991; max 9007199254740991
- `collection_id` (`ingestDiscoverPage.response.200.collection_id`; string | null, required)
- `posts` (`ingestDiscoverPage.response.200.posts`; array<object>, required)
  - `external_id` (`ingestDiscoverPage.response.200.posts.external_id`; string, required)
  - `id` (`ingestDiscoverPage.response.200.posts.id`; string, required)
  - `account_id` (`ingestDiscoverPage.response.200.posts.account_id`; string, required)
  - `outlier_score` (`ingestDiscoverPage.response.200.posts.outlier_score`; number | null, required)
  - `engagement_rate` (`ingestDiscoverPage.response.200.posts.engagement_rate`; number | null, required)

### 400

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

#### Example

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

- `error` (`ingestDiscoverPage.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` (`ingestDiscoverPage.response.400.message`; string, required) — A message for people, in Indonesian.
- `details` (`ingestDiscoverPage.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` (`ingestDiscoverPage.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` (`ingestDiscoverPage.response.401.message`; string, required) — A message for people, in Indonesian.
- `details` (`ingestDiscoverPage.response.401.details`; unknown, optional) — More about the error, such as the fields to fix.


Source: https://docs.mosio.me/api/ingest-discover-page/index.md
