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}Fetch the result of an analyze_tiktok_video job by its job_id. Call this after analyze_tiktok_video returns a job handle, waiting retry_after_seconds between attempts, until status is completed or failed.
GET /v1/scripts/jobs/{job_id}Fetch the result of a generate_script job by its job_id. Call this after generate_script returns a job handle, waiting retry_after_seconds between attempts, until status is completed or failed.
GET /v1/trends/search/{job_id}Fetch the result of a search_viral_trends job by its job_id. Call this after search_viral_trends returns a job handle, waiting retry_after_seconds between attempts, until status is complete or error. Do NOT call search_viral_trends again for the same hashtag while a job is still running -- each call spends a fresh viral search from the monthly allowance.
GET /v1/videosSearch analyzed videos in this workspace by username, view count, or date range.
GET /v1/videos/{id}/analysisFull AI analysis for one video: hook, timing, scenes, transcript.
GET /v1/videos/{id}/similarFind videos similar to a given video using vector search.
GET /v1/breakoutsList videos currently breaking out among tracked creators.
GET /v1/nichesBrowse available niches with their stats and metadata. Does not return videos, and carries no per-video AI analysis — that requires 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 — NOT per-video AI analysis; for a hook and scene teardown of one of these videos, pass its URL to analyze_tiktok_video.
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 by URL. Consumes one catalog slot.
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 — call get_trend_search_result with that job_id until status is "completed", then read the results from that response.
POST /v1/scriptsGenerate a script grounded in the workspace top performers. Always returns a job handle (202), never the script itself — generation can take up to a minute. Poll GET /v1/scripts/jobs/{job_id} until status is "completed", then fetch the script from result_path.
POST /v1/librarySave a video to the workspace library.
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?
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.