Skip to content

WhyViral API

Read any public TikTok, Instagram, YouTube or X post as JSON, from your own code.

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

  1. 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.

  2. 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}'
  3. Use the answer

    status is "ready" with the read, "failed" with an error, 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

Type to search…

↑↓ navigate↵ selectEsc close