---
title: "SNS API"
description: "Reddit, TikTok, YouTube, Instagram, Threads, LinkedIn and X through one set of operations and one social schema."
---

The SNS API serves seven social platforms through **the same eight operations and one schema**. An
operation is named by what it returns; what you pass decides what it reads. A TikTok creator and a
YouTube channel are both a `profile`. A subreddit's posts, a hashtag's videos and an account's reels are
all `posts`. The code that reads one platform reads all of them.

```bash
curl "https://gateway.apinoa.com/v1/tiktok/posts?username=tiktok" -H "x-api-key: $APINOA_API_KEY"
curl "https://gateway.apinoa.com/v1/youtube/posts?username=@mkbhd&type=shorts" -H "x-api-key: $APINOA_API_KEY"
curl "https://gateway.apinoa.com/v1/reddit/posts?community=technology&sort=top" -H "x-api-key: $APINOA_API_KEY"
```

## Operations

| Operation | Returns | What It Reads, by What You Pass |
|---|---|---|
| `profile` | `Account` | One account: `username` (or `userId`) |
| `profiles` | `Page<Account>` | Accounts: a search (`query`), or an account's followers/following |
| `post` | `Post` | One post: `id` |
| `posts` | `Page<Post>` | Posts: an account's (`username`), a search (`query`), a `hashtag`, `community`, `sound`, `location`, `company` or `playlist`, posts `relatedTo` one — or, with nothing, the platform's trending feed |
| `comments` | `Page<Comment>` | A `post`'s comments, one `comment`'s replies, or an account's comments |
| `group` | `Group` | One community, hashtag, sound, location or company |
| `groups` | `Page<Group>` | Communities by search, or an account's playlists, highlights or communities |
| `media` | Media file | A post's media file |

## Which Platform Has Which

| | profile | profiles | post | posts | comments | group | groups | media |
|---|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
| [Reddit](/docs/api-reference/reddit) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| [TikTok](/docs/api-reference/tiktok) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| [YouTube](/docs/api-reference/youtube) | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | |
| [Instagram](/docs/api-reference/instagram) | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | |
| [Threads](/docs/api-reference/threads) | ✓ | | ✓ | ✓ | ✓ | | | |
| [LinkedIn](/docs/api-reference/linkedin) | ✓ | | ✓ | ✓ | ✓ | ✓ | | |
| [X](/docs/api-reference/x) | ✓ | | ✓ | ✓ | | ✓ | | |

LinkedIn also has `job` and `jobs`, the one record no other platform has. Each platform's page lists exactly
which inputs every operation takes there.

## Inputs

One name means one thing on every platform:

| Input | Meaning |
|---|---|
| `username` | an account's handle (with or without `@`, `u/`, `in/`) |
| `userId` | an account's own id (TikTok secUid, YouTube UC… id, X/Threads numeric id) — saves a lookup where a platform needs one |
| `id` | the thing the operation returns: a post's id or shortcode, a job's id |
| `post`, `comment` | the post (or comment) whose comments to read |
| `query` | keywords; `prefix` for autocomplete |
| `hashtag` `community` `sound` `location` `company` `playlist` | the group whose posts — or details — to read |
| `relatedTo` | a post; returns posts related to it |
| `type` | which listing of a source: `reels`, `shorts`, `reposts`, `likes`, `followers`… |
| `sort` `period` `country` | ordering, time window, and the country of a regional feed |
| `include` | extra reads attached under `ext` (a Reddit community's `rules`), billed per read |
| `limit` | items per page, where the platform lets you choose |
| `cursor` | the next page |

Every identifier also takes the page URL. Paste a profile, post or community link wherever its id goes.
Pass one source per call; two (or none, where the operation needs one) answer `400 INVALID_PARAMS`
naming the choices.

## What Is the Same Everywhere

- **Shapes.** Every operation returns one of four types — `Account`, `Post`, `Comment`, `Group` — or a
  `Page` of them, described in the [Response Schema](/docs/api-reference/sns/response-schema). What
  only one platform has (a TikTok sound's music id, a Reddit post's score) is in that object's `ext`.
- **Paging.** A list answers with an opaque `cursor`. For the next page, call the same operation with
  `cursor` alone — it carries everything the first call asked for. No `cursor` means there is no next
  page.
- **Absent is not zero.** A count the platform hides is left out, never reported as `0`. Times are
  ISO 8601, UTC.
- **Price.** $0.001 per unit. Most calls are one unit; each operation's page says when it can cost more.

## Errors

The same envelope and codes as the rest of the API — see [Errors](/docs/errors). A private, deleted or
age-restricted account, post or community answers `404 NOT_FOUND`; where the platform shows a missing page
the same way it shows a blocked one, it answers with an error rather than an empty result.

## Reference

- [Response Schema](/docs/api-reference/sns/response-schema): every field of every type
- [Errors](/docs/errors): every error code
