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

# Pixel-stats get

> Read recent event activity directly from Meta's pixel/dataset stats edge, even when no ad sets use it. Default event_total_counts lists standard and custom event names (in value) and counts. Supports all SDK aggregations plus exact event, event_source (WEB_ONLY/SERVER_ONLY), agent and UTC Unix time filters. Use this for prelaunch 'is this dataset receiving Lead Generated?' checks; `adside meta insights get` and warehouse conversions measure attributed ad results and cannot answer that question. Meta retains only seven days of stats. Results are aggregate diagnostics, not individual event payloads or Events Manager Test Events. diagnostics_hourly_last_timestamp is Meta's diagnostic timestamp, not a guaranteed exact last firing time. Empty data means no results for this query, not never fired. Counts across different aggregations/sources may overlap; do not sum them.

CLI: `adside meta pixel-stats get`



## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/workspaces/{workspaceId}/meta/pixel-stats/get
openapi: 3.1.0
info:
  title: Adside API
  version: 1.0.0
  description: >-
    Campaigns, creatives, assets and reporting across your ad accounts. Call it
    with a personal API key as a bearer token, or with the `adside` CLI: each
    page names its command.
servers:
  - url: https://api.adside.ai
    description: Production
security:
  - userAccess: []
tags:
  - name: Account
  - name: Reporting
  - name: Meta
  - name: Google Ads
  - name: LinkedIn
  - name: TikTok
  - name: Reddit
  - name: Snapchat
  - name: X
  - name: Google Tag Manager
  - name: Creatives
  - name: Creative styles
  - name: Media
  - name: Characters
  - name: Assets
  - name: Brands
  - name: Brain
  - name: Research
  - name: Boards
  - name: Artifacts
  - name: Audiences
  - name: Ad comments
  - name: Publications
  - name: Routines
  - name: Skills
  - name: To-dos
  - name: Audit
  - name: Credits
paths:
  /v1/workspaces/{workspaceId}/meta/pixel-stats/get:
    post:
      tags:
        - Meta
      summary: Pixel-stats get
      description: >-
        Read recent event activity directly from Meta's pixel/dataset stats
        edge, even when no ad sets use it. Default event_total_counts lists
        standard and custom event names (in value) and counts. Supports all SDK
        aggregations plus exact event, event_source (WEB_ONLY/SERVER_ONLY),
        agent and UTC Unix time filters. Use this for prelaunch 'is this dataset
        receiving Lead Generated?' checks; `adside meta insights get` and
        warehouse conversions measure attributed ad results and cannot answer
        that question. Meta retains only seven days of stats. Results are
        aggregate diagnostics, not individual event payloads or Events Manager
        Test Events. diagnostics_hourly_last_timestamp is Meta's diagnostic
        timestamp, not a guaranteed exact last firing time. Empty data means no
        results for this query, not never fired. Counts across different
        aggregations/sources may overlap; do not sum them.


        CLI: `adside meta pixel-stats get`
      operationId: meta.get_pixel_stats
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                pixel_id:
                  type: string
                  pattern: ^\d+$
                  description: >-
                    Pixel/dataset ID from `adside meta account-pixels get`;
                    independent of ad-set attachment.
                aggregation:
                  default: event_total_counts
                  description: >-
                    event_total_counts lists standard/custom event names and
                    counts; event for time buckets; event_source for
                    browser/server mix; event_processing_results for
                    diagnostics; host/url for origins; match_keys/had_pii for
                    matching. Returns Meta's original aggregation/value/event
                    fields.
                  type: string
                  enum:
                    - browser_type
                    - custom_data_field
                    - device_os
                    - device_type
                    - event
                    - event_detection_method
                    - event_processing_results
                    - event_source
                    - event_total_counts
                    - event_value_count
                    - had_pii
                    - host
                    - match_keys
                    - pixel_fire
                    - url
                    - url_by_rule
                start_time:
                  description: >-
                    UTC Unix seconds. Defaults to the earliest retained time
                    (seven days before request time). Meta retains only the last
                    seven days.
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                end_time:
                  description: UTC Unix seconds, after start_time. Defaults to now.
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                event:
                  description: >-
                    Exact event name, including spaces/case, e.g. Lead Generated
                    or Schedule.
                  type: string
                  minLength: 1
                  maxLength: 256
                event_source:
                  description: >-
                    Meta event-source filter, e.g. WEB_ONLY or SERVER_ONLY. The
                    SDK defines this as a string; Meta validates supported
                    values.
                  type: string
                  minLength: 1
                  maxLength: 100
                agent:
                  description: >-
                    Optional SDK agent filter; omit unless diagnosing a specific
                    integration agent.
                  type: string
                  minLength: 1
                  maxLength: 256
                limit:
                  default: 25
                  description: >-
                    Maximum stats buckets requested per page; nested results
                    also have a response-size cap.
                  type: integer
                  minimum: 1
                  maximum: 100
                after:
                  description: >-
                    Next-page cursor; requires the same explicit
                    start_time/end_time and filters as the original query. The
                    requested window is preserved, but Meta's rolling retention
                    may remove oldest data between pages.
                  type: string
                  minLength: 1
                  maxLength: 4096
              required:
                - pixel_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
      security:
        - userAccess: []
components:
  securitySchemes:
    userAccess:
      type: http
      scheme: bearer
      description: >-
        A personal API key (`adside_pat_…`) or a token from `adside login`.
        Either carries the permissions of the person it belongs to.

````

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