Send a link to a public TikTok, Instagram, YouTube or X post and get back what it says and shows as JSON: a short summary, the transcript and on-screen text with their positions, and the places, recipes, products, apps, events, books and shows it names.
It reads every post type: videos up to 180 seconds, photo posts, carousels, TikTok slideshows and X text posts. Each read costs 20 credits.
The same key reads what your WhyViral projects hold, free: the brand mentions found, the ranking against competitors, alerts, saved creators, campaigns and reports.
Quick start
Make a key
In WhyViral, open Settings → API keys and select Create key. Copy it right away: it’s shown only once. Keep it on your server, for example as
WHYVIRAL_API_KEY.New to WhyViral? Create a free account: it comes with 165 starter credits.
Read a post
Send a post’s link. With
wait, the request holds the answer for up to 20 seconds while the read runs.curl -X POST https://whyviral.ai/api/v1/reads \ -H "Authorization: Bearer $WHYVIRAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://www.tiktok.com/@example.kitchen/video/7430000000000000001", "wait": 20}'Use the answer
statusis"ready"with the read,"failed"with anerror, or"pending"with a 202 when it’s still running. Then ask for it again, as Waiting for a read shows.
Base URL
Every path is relative to https://whyviral.ai/api/v1. Requests and answers are JSON, and every time is ISO 8601 in UTC.
What’s here
- Authentication: sending your key, and keeping it safe.
- Waiting for a read: what to do while a read runs.
- The read object: every field, the categories and what positions count.
- Mentions, ranking and alerts: the brand mentions a project found, counted and compared with competitors, and the alerts they raised.
- Creators, campaigns and reports: saved creators, a creator search, campaigns and report links.
- Errors, Prices and Limits.
- Data and privacy: what the API reads and keeps.
- The API reference: each endpoint with its parameters, answers and code samples.