Skip to content
Navigation

List a campaign’s posts

GET
https://whyviral.ai/api/v1/campaigns/{id}/posts

One page of a campaign’s posts, or of every post its creators published since the start. Free.

Authorization

  • bearer
    optional
    HTTP Bearer

    Authorization: Bearer <token>

  • apiKeyHeader
    optional
    API key in header

    x-api-key: <token>

Path parameters

  • id
    string
    required

    The campaign’s id.

    example: "s17e2m8x4c9v0b3n5q7w1r6t2y8u4i0o"

Query parameters

  • view
    optional
    campaign
    or
    all

    campaign for campaign posts, all for every post of its creators since the start.

    default: "campaign"
  • sort
    optional
    views
    or
    newest

    Most viewed first, or newest first.

    default: "views"
  • cursor
    optional
    string

    The last answer’s next_cursor.

  • limit
    optional
    integer

    How many rows, 1 to 50.

    maximum: 50 · minimum: 1 · default: 20

Returns

200

The posts.

JSON
  • object
    string
    required
  • next_cursor
    required

    Any of the following:

    • string
      Send it as `cursor` for the next page; null on the last.
    • null
  • data
    array of
    object
    required
    • id
      string
      required

      The post’s id in the campaign.

    • object
      string
      required

      "campaign_post".

    • url
      string
      required

      The post’s link.

      format: uri
    • kind
      video
      or
      slides
      or
      text
      required

      video, slides or text.

    • text
      string
      required

      Its caption or text.

    • cover_url
      required

      A public cover image WhyViral hosts.

      Any of the following:

      • string
      • null
    • platform
      tiktok
      or
      instagram
      or
      youtube
      or
      x
      required

      The platform it is on.

    • posted_at
      required

      When it was published.

      Any of the following:

      • string
      • null
    • views
      required

      Its views at the last read.

      Any of the following:

      • integer
      • null
    • likes
      required

      Its likes.

      Any of the following:

      • integer
      • null
    • campaign
      boolean
      required

      True for a campaign post: it meets the required terms or names the brand, or the owner added or moved it there.

    • names_brand
      boolean
      required

      Whether it names the project’s brand.

    • disclosure
      required

      {how, text, at_sec}: the ad disclosure found, by label, hashtag, said or shown.

      Any of the following:

      • object
        • how
          label
          or
          hashtag
          or
          said
          or
          shown
          required
        • text
          string
          required
        • at_sec
          required

          Any of the following:

          • number
          • null
      • null
    • terms_met
      boolean
      required

      Whether every required term is present.

    • missing_terms
      array of
      string
      required

      The required terms it lacks.

    • used_terms
      array of
      object
      required

      [{term, where}]: where each required term it carries was found; where is caption, shown or said.

      • term
        string
        required
      • where
        caption
        or
        shown
        or
        said
        required
    • moved
      required

      The owner’s own word on whether it is a campaign post; null while its terms decide.

      Any of the following:

      • boolean
      • null
    • added
      boolean
      required

      True when its owner added it by its link.

    • competitor
      required

      {name, where, quote, at, unit}: a competitor it names.

      Any of the following:

      • object
        • name
          string
          required
        • where
          said
          or
          shown
          or
          written
          required
        • quote
          string
          required
        • at
          required

          Any of the following:

          • number
          • null
        • unit
          second
          or
          slide
          or
          line
          required
      • null
    • alerts
      array of
      undisclosed
      or
      missing_terms
      or
      competitor
      required

      undisclosed, missing_terms and competitor; see the table below.

    • watched
      boolean
      required

      True when WhyViral watched it, not only read its text.

    • creator
      object
      required
      • id
        string
        required

        The creator’s id, which /creators/{id} and a report take.

      • platform
        tiktok
        or
        instagram
        or
        youtube
        or
        x
        required

        The platform the account is on.

      • handle
        string
        required

        Their handle, without @.

      • name
        required

        Their display name.

        Any of the following:

        • string
        • null
      • profile_url
        string
        required

        Their profile on the platform.

        format: uri
      • avatar_url
        required

        A public avatar image WhyViral hosts.

        Any of the following:

        • string
        • null
      • followers
        required

        Their follower count, when the platform shows it.

        Any of the following:

        • integer
        • null
      • country
        required

        The country their profile states, as written.

        Any of the following:

        • string
        • null
      • country_code
        required

        That country as an ISO 3166-1 alpha-2 code, when WhyViral recognizes it.

        Any of the following:

        • string
        • 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.
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