> ## Documentation Index
> Fetch the complete documentation index at: https://growi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Top campaigns

> Campaigns, ambassador programs and contracts ranked by their posts' gains. Live: new post readings show up on the next call.



## OpenAPI

````yaml GET /content/top_campaigns
openapi: 3.0.1
info:
  title: Growi API
  description: >-
    API documentation for Growi platform, showcasing the public tracking event
    endpoint
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.growi.io/api/public/v1
security:
  - bearerAuth: []
paths:
  /content/top_campaigns:
    get:
      summary: Top campaigns
      description: >-
        Campaigns, ambassador programs and contracts ranked by their posts'
        gains. Live: new post readings show up on the next call.
      parameters:
        - name: organization_id
          in: query
          required: false
          description: >-
            Read one of your child brands instead of the organization that owns
            the key. Any id that is not one of your brands answers 404.
          schema:
            type: integer
        - name: start_date
          in: query
          required: false
          description: 'First day, YYYY-MM-DD. Default: 29 days ago.'
          schema:
            type: string
            format: date
        - name: end_date
          in: query
          required: false
          description: 'Last day, YYYY-MM-DD. Default: today (UTC).'
          schema:
            type: string
            format: date
        - name: campaign_ids
          in: query
          required: false
          description: >-
            Comma separated campaign ids (from /content/filters). One id reads
            that campaign; several read their union, a post in two of them
            counting once. Every id must belong to your organization.
          schema:
            type: string
        - name: platform
          in: query
          required: false
          description: Only this platform.
          schema:
            type: string
            enum:
              - instagram
              - tik_tok
              - youtube
              - facebook
              - twitter
        - name: sort
          in: query
          required: false
          description: >-
            Rank by this metric. `engagement` is (likes + comments + shares +
            saves) / views and ignores rows under 100 views. Default views.
          schema:
            type: string
            enum:
              - views
              - likes
              - comments
              - shares
              - saves
              - engagement
        - name: limit
          in: query
          required: false
          description: Rows per page, 1-50. Default 10.
          schema:
            type: integer
        - name: page
          in: query
          required: false
          description: Page number, from 1. Default 1.
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                            uuid:
                              type: string
                              nullable: true
                            kind:
                              type: string
                            status:
                              type: string
                            organization_id:
                              type: integer
                            organization_name:
                              type: string
                              nullable: true
                            organization_slug:
                              type: string
                              nullable: true
                            organization_logo_url:
                              type: string
                              nullable: true
                            creator:
                              allOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                    name:
                                      type: string
                                      nullable: true
                                    avatar_url:
                                      type: string
                                      nullable: true
                              nullable: true
                              description: 'Contracts: the creator'
                            posts:
                              type: integer
                            creators:
                              type: integer
                            metrics:
                              type: object
                              properties:
                                views:
                                  type: integer
                                likes:
                                  type: integer
                                comments:
                                  type: integer
                                shares:
                                  type: integer
                                saves:
                                  type: integer
                                engagement_rate:
                                  type: number
                                  description: >-
                                    Percent: (likes + comments + shares + saves)
                                    / views x 100
                              description: >-
                                Gains over the range: each day counts what the
                                post gained that day, so a platform correction
                                can make a day negative.
                      page:
                        type: integer
                      limit:
                        type: integer
                      sort:
                        type: string
                      min_views:
                        type: integer
                        nullable: true
                        description: The views floor applied (engagement sort only)
                  meta:
                    type: object
                    properties:
                      scope:
                        type: string
                        enum:
                          - family
                          - brand
                          - campaign
                        description: >-
                          family: your organization and its brands; brand: one
                          child brand; campaign: the campaign_ids
                      organization_id:
                        type: integer
                      campaign_ids:
                        type: array
                        items:
                          type: integer
                      platform:
                        type: string
                        nullable: true
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: >-
            `organization_id` isn't an active child brand of your organization,
            or the record doesn't exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: Invalid or missing params. `error` says which
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            Rate limited: 2 seconds between calls and an hourly cap per API key.
            See `Retry-After` and the `X-RateLimit-*` headers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    ApiError:
      type: object
      properties:
        error:
          type: string
          description: What went wrong
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.