Apinoa Docs

SNS API

Reddit, TikTok, YouTube, Instagram, Threads, LinkedIn and X through one set of operations and one social schema.

View raw .mdx

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.

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

OperationReturnsWhat It Reads, by What You Pass
profileAccountOne account: username (or userId)
profilesPage<Account>Accounts: a search (query), or an account's followers/following
postPostOne post: id
postsPage<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
commentsPage<Comment>A post's comments, one comment's replies, or an account's comments
groupGroupOne community, hashtag, sound, location or company
groupsPage<Group>Communities by search, or an account's playlists, highlights or communities
mediaMedia fileA post's media file

Which Platform Has Which

profileprofilespostpostscommentsgroupgroupsmedia
Reddit✓✓✓✓✓✓✓
TikTok✓✓✓✓✓✓✓✓
YouTube✓✓✓✓✓✓
Instagram✓✓✓✓✓✓
Threads✓✓✓✓
LinkedIn✓✓✓✓✓
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:

InputMeaning
usernamean account's handle (with or without @, u/, in/)
userIdan account's own id (TikTok secUid, YouTube UC… id, X/Threads numeric id) — saves a lookup where a platform needs one
idthe thing the operation returns: a post's id or shortcode, a job's id
post, commentthe post (or comment) whose comments to read
querykeywords; prefix for autocomplete
hashtag community sound location company playlistthe group whose posts — or details — to read
relatedToa post; returns posts related to it
typewhich listing of a source: reels, shorts, reposts, likes, followers…
sort period countryordering, time window, and the country of a regional feed
includeextra reads attached under ext (a Reddit community's rules), billed per read
limititems per page, where the platform lets you choose
cursorthe 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. 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. 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

On this page