REST API
A TikTok API for research, not posting
TikTok’s own API tells you about accounts you own. This one tells you why someone else’s video worked — the hook, where the scenes cut, what the transcript says, how far it outran its creator’s baseline.
22 endpoints, OpenAPI 3.1, and the same surface again as an MCP server for AI agents. Included on every paid plan.
Analyze a video in one call
curl -X POST https://api.fypnow.com/v1/analyses \
-H "Authorization: Bearer fyp_sk_..." \
-H "Content-Type: application/json" \
-d '{"url": "https://www.tiktok.com/@someone/video/123"}'
# 202 Accepted
{ "data": { "job_id": "...", "status": "processing",
"poll_url": "/v1/analyses/...", "retry_after_seconds": 30 } }Analysis runs a video model, so it returns a job handle rather than blocking. Poll the job, then read the full teardown — hook type and text, scene count and timings, transcript with timestamps, retention signals and virality factors.
22 endpoints, 18 as agent tools
Generated from the API’s own route table. Reads cost nothing beyond the request; writes draw down a plan quota.
Read (16)
GET /v1/analyses/{job_id}Resolves the job handle returned by analyze_tiktok_video into the finished analysis. Status is processing, completed or failed, and the response carries a retry_after_seconds hint for how long to wait between attempts while it is still processing.
GET /v1/scripts/jobs/{job_id}Resolves the job handle returned by generate_script into the finished script. Status is processing, completed or failed, and the response carries a retry_after_seconds hint for how long to wait between attempts while it is still processing.
GET /v1/trends/search/{job_id}Resolves the job handle returned by search_viral_trends into the finished results. Status is pending, complete or error, and the response carries a retry_after_seconds hint for how long to wait between attempts. A search already in flight is resolved here; starting another for the same hashtag spends a second viral search from the monthly allowance.
GET /v1/videosSearch analyzed videos and slideshows in this workspace by username, view count, date range, or format ('video' or 'slideshow'). Each row carries platform ('tiktok' or 'youtube') and post_format ('photo' carousel, 'slideshow' template, 'video', or null for a video).
GET /v1/videos/{id}/analysisFull AI analysis for one video or slideshow. A video returns hook, timing, scenes and transcript; a slideshow (schema_version carousel_v1) returns cover, slide-by-slide breakdown, narrative, aesthetic, audio, swipe and save drivers, and scores.
GET /v1/videos/{id}/similarFind videos or slideshows similar to a given one using vector search. Each row carries post_format.
GET /v1/breakoutsList videos currently breaking out among tracked creators.
GET /v1/nichesBrowse available niches with their stats and metadata. Returns niches only, not videos, and carries no per-video AI analysis; that lives behind analyze_tiktok_video.
GET /v1/niches/{id}/videosTop videos in one niche, ranked by how far they outperformed the niche's median (multiplier). Takes a niche id from browse_niche_catalog. Returns catalogue stats — views, likes, author, multiplier, platform — not per-video AI analysis. Niches mix TikToks and YouTube Shorts; platform is 'tiktok' or 'youtube'. A hook and scene teardown of a TikTok comes from analyze_tiktok_video, which takes its URL; that tool does not accept YouTube Shorts. Each row carries post_format; the format input ('video' or 'slideshow') narrows the list to one.
GET /v1/creatorsList tracked creators in this workspace, with their ids.
GET /v1/creators/{id}/reportProfile, follower history and winning patterns for one creator.
GET /v1/scriptsList generated scripts.
GET /v1/scripts/{id}Fetch one generated script.
GET /v1/libraryList saved videos.
GET /v1/growth/scorecardGrade the workspace own account against its niche benchmarks.
GET /v1/usageCurrent plan allowances and consumption. Free and unmetered.
Write (6)
POST /v1/analysesAnalyze a TikTok video or photo slideshow by URL (/video/ or /photo/ links). Consumes one catalog slot. TikTok URLs only: YouTube Shorts are analyzed in the fypnow.com web app, not here.
POST /v1/nichesCreate a Viral Content Agent that watches a niche by keyword.
POST /v1/trends/searchSearch for breakout videos by hashtag. A cached hashtag returns full results right away. An uncached one returns a job handle (202) with no results yet; that handle is resolved by get_trend_search_result, which reports status complete or error and carries the results.
POST /v1/scriptsGenerate a script grounded in the workspace top performers. Returns a job handle (202) rather than the script itself, because generation takes up to a minute. The handle is resolved by get_script_result, which reports status completed or failed and carries the script.
POST /v1/librarySave a video to the workspace library. Works for TikToks and YouTube Shorts; pass platform ('tiktok' or 'youtube') from get_niche_videos, or omit it and a YouTube-shaped id is saved as a Short.
DELETE /v1/library/{video_id}Remove a video from the library.
Built to be integrated against
One response shape
Every endpoint returns {"data": …} or {"error": {"code", "message"}}. `message` is always a string — never a string-or-array union that forces defensive parsing.
Machine-readable error codes
Branch on `code`, not on prose. catalog_full, write_scope_required, rate_limit_exceeded, api_access_required — each means one thing.
Honest coverage
Responses report what is missing rather than nulling it silently. If a transcript could not be extracted, the payload says so.
Generated spec
The OpenAPI document and the docs are generated from the route table the API dispatches on, so they cannot describe an endpoint that does not exist.
Async where it matters
Anything that runs a model or reaches TikTok returns a job handle with a poll URL and a realistic retry interval.
One workspace per credential
No request parameter can reach a second workspace. Entitlement is re-checked on every request, not at key creation.
Questions
Is there a TikTok analytics API?
How much does the API cost?
How do I authenticate?
Is there an OpenAPI spec?
How does video analysis work over the API?
Does the API support YouTube Shorts?
Can I use it from an AI agent?
No API add-on, no separate bill
Every paid plan includes the REST API and the MCP server, against the same quotas you already have.