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

# Get Widget Stats

> The Analytics of the user's widgets, as the Analytics page shows it (paid plans): views, clicks and visitors per day, the sites and countries that show the widgets, the devices, and the widgets with the most views. For one widget: the posts or reviews that visitors click most, and the Shoppable product clicks. Analytics counts Pro widgets and review widgets. visitors is the sum of each day's visitors. from and to: the first and the last day of the range. counted_from: null when every day of the range has counts; else {date, reason}, the first day with counts, and why the days before it have none (reason "counting": counting started that day; "widget": the widget was made that day). With days 365, each point of daily is a week (date: its first day), and its days field gives the number of days in it: the oldest week can have fewer than 7.



## OpenAPI

````yaml https://snapwidget.com/api/v1/openapi.json get /stats
openapi: 3.1.0
info:
  title: SnapWidget API
  version: '1'
  description: >-
    Make and change social feed and review widgets, connect social accounts and
    get the embed code. The MCP server at https://snapwidget.com/mcp has the
    same actions for AI agents.
  termsOfService: https://snapwidget.com/terms
  contact:
    name: SnapWidget
    email: support@snapwidget.com
    url: https://snapwidget.com/docs/api-reference/introduction
servers:
  - url: https://snapwidget.com/api/v1
security:
  - token: []
tags:
  - name: Sign-up
  - name: Account
  - name: Social accounts
  - name: Widgets
  - name: Reviews
  - name: Campaigns
paths:
  /stats:
    get:
      tags:
        - Widgets
      summary: Get Widget Stats
      description: >-
        The Analytics of the user's widgets, as the Analytics page shows it
        (paid plans): views, clicks and visitors per day, the sites and
        countries that show the widgets, the devices, and the widgets with the
        most views. For one widget: the posts or reviews that visitors click
        most, and the Shoppable product clicks. Analytics counts Pro widgets and
        review widgets. visitors is the sum of each day's visitors. from and to:
        the first and the last day of the range. counted_from: null when every
        day of the range has counts; else {date, reason}, the first day with
        counts, and why the days before it have none (reason "counting":
        counting started that day; "widget": the widget was made that day). With
        days 365, each point of daily is a week (date: its first day), and its
        days field gives the number of days in it: the oldest week can have
        fewer than 7.
      operationId: get_widget_stats
      parameters:
        - name: widget_id
          in: query
          description: >-
            One widget's id (the id in list_widgets). Leave it out for all the
            widgets.
          schema:
            type: string
        - name: days
          in: query
          description: >-
            The last 7, 30 or 90 days, today included (30 when not given), or
            365: the last 52 full weeks (364 days), one point a week.
          schema:
            enum:
              - 7
              - 30
              - 90
              - 365
            type: integer
      responses:
        '200':
          description: The answer, as JSON.
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/Invalid'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  responses:
    Unauthorized:
      description: No token, or the token is wrong, expired or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The token or the plan has no API access, or the plan does not allow the
        change.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No item with this id in the account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Invalid:
      description: An input is not valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Too many calls. The Retry-After header gives the seconds to wait.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
          description: What went wrong.
        errors:
          type: object
          description: The messages per input, when an input is not valid.
          additionalProperties:
            type: array
            items:
              type: string
        upgrade_url:
          type: string
          description: The upgrade page, when the plan does not allow it.
      required:
        - message
  securitySchemes:
    token:
      type: http
      scheme: bearer
      description: 'A token from the API page: https://snapwidget.com/settings/api'

````

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