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

# clipper_demographics

> Extracts demographic data from social media screen recordings

## Overview

Extracts demographic data from screen recordings that show social media analytics pages. Analyzes video frames to extract platform, username, date verification, audience demographics (countries, age ranges, gender), and analytics UI language.

Supports **Instagram**, **YouTube**, **TikTok**, and **X (Twitter)** analytics formats.

## Configuration

<ParamField body="config.allowed_discord_channels" type="string[]" default="[]">
  Discord channel names to require in the recording. When non-empty, the detector verifies that the recording shows one of the listed Discord channels. Leave empty (or omit) to skip the Discord check.
</ParamField>

<ParamField body="config.allowed_date_buffer_days" type="integer" default="1">
  How many days back from today the extracted calendar date can be and still be considered valid. A 1 day buffer is always applied for timezone handling.
</ParamField>

<ParamField body="config.required_analytics_language" type="string">
  ISO 639-1 language code (e.g., `"en"`, `"fr"`, `"es"`) that the analytics UI must be displayed in. Set to `null` or omit to skip the language check.
</ParamField>

## Example Configuration

### Basic (no Discord check, no language requirement)

```json theme={null}
{
  "detector_name": "clipper_demographics",
  "config": {}
}
```

### With Discord verification and language requirement

```json theme={null}
{
  "detector_name": "clipper_demographics",
  "config": {
    "allowed_discord_channels": ["verify-demographics", "submit-proof"],
    "allowed_date_buffer_days": 2,
    "required_analytics_language": "en"
  }
}
```

## Result Schema

```json theme={null}
{
  "detector_name": "clipper_demographics",
  "pass_check": true,
  "score": 1.0,
  "rationale": "Successfully extracted all demographic data",
  "metrics": {
    "platform": "instagram",
    "demographics": {
      "analytics_page": "Views",
      "analytics_period": "Last 30 days",
      "analytics_date_range": "5 Feb - 7 Mar 2026",
      "gender": { "men": 85.0, "women": 15.0 },
      "countries": [
        { "name": "United States", "percentage": 49.5 },
        { "name": "United Kingdom", "percentage": 12.3 }
      ],
      "age_ranges": [
        { "range": "18-24", "percentage": 47.9 },
        { "range": "25-34", "percentage": 32.1 }
      ]
    },
    "username": "creator_handle",
    "date": {
      "extracted_date": "2026-03-07",
      "current_date_utc": "2026-03-07",
      "extracted_date_valid": true
    },
    "analytics_language": "en",
    "extraction_status": {
      "date_extracted": true,
      "username_extracted": true,
      "countries_extracted": true,
      "age_extracted": true,
      "gender_extracted": true
    }
  }
}
```

### With Discord verification enabled

When `allowed_discord_channels` is non-empty, the result includes additional fields:

```json theme={null}
{
  "metrics": {
    "extraction_status": {
      "discord_verified": true,
      "date_extracted": true,
      "username_extracted": true,
      "countries_extracted": true,
      "age_extracted": true,
      "gender_extracted": true
    },
    "discord_channel_name": "verify-demographics"
  }
}
```

### With language requirement enabled

When `required_analytics_language` is set, `extraction_status` includes:

```json theme={null}
{
  "metrics": {
    "extraction_status": {
      "analytics_language_match": true
    }
  }
}
```

## Pass/Fail Logic

The detector returns `pass_check: true` only when **all** enabled checks pass:

* **Date extracted** - Calendar date was found in the recording
* **Username extracted** - Social media @handle was identified
* **Countries extracted** - At least one country with percentage was found
* **Age extracted** - At least one age range with percentage was found
* **Gender extracted** - Gender breakdown was found
* **Discord verified** (only when `allowed_discord_channels` is non-empty) - Recording shows an allowed Discord channel
* **Analytics language match** (only when `required_analytics_language` is set) - UI language matches the required language

The `score` is the fraction of checks that passed (0.0 to 1.0).
