Skip to content
Navigation

Get the ranking

GET
https://whyviral.ai/api/v1/ranking

The project’s brand beside its competitors over a period, and how often each is said or shown in the week’s most-viewed videos on the project’s topics. Free.

Authorization

  • bearer
    optional
    HTTP Bearer

    Authorization: Bearer <token>

  • apiKeyHeader
    optional
    API key in header

    x-api-key: <token>

Query parameters

  • project
    optional
    string

    A project’s id or exact name; case is ignored. Leave it out for the project active in the app.

  • days
    optional
    7
    or
    30

    The period in days, ending now.

    default: 7

Returns

200

The ranking.

JSON
  • object
    string
    required

    "ranking".

  • project
    object
    required
    • id
      string
      required

      The project’s id.

    • name
      string
      required

      Its name.

  • period
    object
    required
    • days
      integer
      required
    • from
      required

      Any of the following:

      • string
      • null
    • to
      required

      Any of the following:

      • string
      • null
  • total_mentions
    integer
    required

    Mentions of every listed brand found in the period: what the shares are parts of.

    minimum: 0
  • posts_read
    integer
    required

    Posts the project’s searches read in the period.

    minimum: 0
  • videos_watched
    integer
    required

    Videos its watches read in the period.

    minimum: 0
  • topic_set
    required

    {week, videos, watched, with_brand, topics, built_at}: the latest week’s most-viewed videos on the project’s topics, how many were watched, and how many of those name a listed brand. Null before the first weekly watch.

    Any of the following:

    • object
      • week
        string
        required

        The ISO week, such as 2026-W46.

      • videos
        integer
        required
        minimum: 0
      • watched
        integer
        required
        minimum: 0
      • with_brand
        integer
        required
        minimum: 0
      • topics
        array of
        string
        required
      • built_at
        required

        Any of the following:

        • string
        • null
    • null
  • brands
    array of
    object
    required

    The project’s own brand first, then each competitor.

    • id
      string
      required

      The tracker’s id.

    • kind
      brand
      or
      competitor
      or
      topic
      or
      hashtag
      or
      campaign_tag
      required

      brand for the project’s own, else competitor.

    • name
      string
      required

      The brand’s name.

    • own
      boolean
      required

      True for the project’s own brand.

    • mentions
      integer
      required

      Organic and sponsored mentions found in the period.

      minimum: 0
    • share
      required

      Its part of total_mentions, 0 to 1; null when none were found.

      Any of the following:

      • number
      • null
    • previous_share
      required

      The same for the period before.

      Any of the following:

      • number
      • null
    • views
      integer
      required

      Views on those posts.

      minimum: 0
    • creators
      integer
      required

      Creators behind them.

      minimum: 0
    • by_where
      object
      required

      {said, shown, written}.

      • said
        integer
        required
        minimum: 0
      • shown
        integer
        required
        minimum: 0
      • written
        integer
        required
        minimum: 0
    • watch_only
      integer
      required

      Mentions found only by watching: no search of captions returns them.

      minimum: 0
    • sponsored_share
      required

      Sponsored mentions over all of them, 0 to 1; null without mentions.

      Any of the following:

      • number
      • null
    • sentiments
      object
      required

      {positive, neutral, negative}: the mentions read for it.

      • positive
        integer
        required
        minimum: 0
      • neutral
        integer
        required
        minimum: 0
      • negative
        integer
        required
        minimum: 0
    • change_pct
      required

      Whole percent against the period before; null when that one had fewer than 10 mentions.

      Any of the following:

      • integer
      • null
    • change
      required

      The same difference as a plain count; null when the period before had no mentions.

      Any of the following:

      • integer
      • null
    • topic_videos
      object
      required

      {said, shown, total}: videos of topic_set that say or show the brand.

      • said
        integer
        required
        minimum: 0
      • shown
        integer
        required
        minimum: 0
      • total
        integer
        required
        minimum: 0
    • topic_share
      required

      topic_videos.total over the watched videos of topic_set, 0 to 1.

      Any of the following:

      • number
      • null

400

INVALID_REQUEST: The body isn’t JSON, its url is missing or too long, or a parameter has a value it doesn’t take. INVALID_PERIOD: days isn’t a period this endpoint takes; days in the answer lists the ones it does. AMBIGUOUS_PROJECT: Several of your projects share the name you sent; pass the project’s id.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

401

INVALID_API_KEY: The key is missing, mistyped or revoked.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

403

ACCOUNT_DISABLED: The key’s account is disabled.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

404

NOT_FOUND: No read, project, creator, campaign or report like this on your account.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

429

RATE_LIMITED: Too many new reads, data requests, searches or report links; wait the Retry-After header’s seconds.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

500

INTERNAL: Something broke on our side; try again.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

Type to search…

↑↓ navigate↵ selectEsc close