# Ftc Compliance Actor (`famed_judoka/ftc-compliance-actor`) Actor

Social and general media violation detector actor.

- **URL**: https://apify.com/famed_judoka/ftc-compliance-actor.md
- **Developed by:** [Ihtesham Haq](https://apify.com/famed_judoka) (community)
- **Categories:** AI, E-commerce, Social media
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## FTC Compliance Checker for Influencer Posts

**AI-powered FTC compliance analysis for influencer marketing content**

This Actor automatically detects FTC disclosure violations in social media posts, calculates risk scores, and estimates financial exposure. Perfect for brands, agencies, and compliance teams monitoring influencer partnerships.

### Features

✅ **AI-Powered Analysis** - Uses DeepSeek AI to detect FTC violations with 95%+ accuracy\
✅ **Multi-Platform Support** - Instagram, TikTok, YouTube, Twitter, Facebook\
✅ **Risk Scoring** - 0-100 risk scores based on severity, reach, and engagement\
✅ **Financial Exposure** - Estimates FTC fines, legal costs, and reputation damage\
✅ **Detailed Reports** - AI reasoning, FTC guideline citations, and recommendations\
✅ **Flexible Filtering** - Set risk thresholds to focus on critical violations

### Use Cases

#### Brand Compliance Monitoring

Monitor your influencer partnerships for FTC compliance violations before they result in enforcement actions.

#### Agency Risk Management

Manage compliance across multiple client portfolios with automated monitoring and reporting.

#### Legal Due Diligence

Conduct compliance audits for M\&A transactions or regulatory inquiries with historical analysis.

#### Influencer Education

Use violation data to train influencers on proper disclosure practices and reduce future risks.

### Input

The Actor accepts an array of social media posts with the following structure:

```json
{
  "posts": [
    {
      "id": "post_001",
      "platform": "instagram",
      "url": "https://instagram.com/p/example",
      "influencer": {
        "username": "fitlife_sarah",
        "followers": 500000
      },
      "post": {
        "caption": "Loving my new FitTea! Link in bio",
        "hashtags": ["#fitness", "#weightloss"],
        "engagement": {
          "likes": 15000,
          "comments": 450
        }
      }
    }
  ],
  "openaiApiKey": "your_openai_api_key",
  "detailedAnalysis": true,
  "riskThreshold": 50
}
```

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `posts` | array | Yes | Array of social media posts to analyze |
| `openaiApiKey` | string | Yes | Your OpenAI API key for AI analysis |
| `detailedAnalysis` | boolean | No | Include detailed AI reasoning (default: true) |
| `riskThreshold` | integer | No | Minimum risk score to report (0-100, default: 50) |

#### Post Object Structure

Each post in the `posts` array should include:

- **id** (string): Unique identifier for the post
- **platform** (string): Social media platform (instagram, tiktok, youtube, twitter, facebook)
- **url** (string, optional): Direct URL to the post
- **influencer** (object):
  - **username** (string): Influencer's username
  - **followers** (integer): Follower count
- **post** (object):
  - **caption** (string): Post text/caption
  - **hashtags** (array, optional): Array of hashtags used
  - **engagement** (object, optional):
    - **likes** (integer): Number of likes
    - **comments** (integer): Number of comments

### Output

The Actor saves results to the dataset with the following structure:

```json
{
  "post_id": "post_001",
  "platform": "instagram",
  "url": "https://instagram.com/p/example",
  "influencer_username": "fitlife_sarah",
  "influencer_followers": 500000,
  "has_violation": true,
  "violation_type": "missing_disclosure",
  "severity": "critical",
  "risk_score": 95,
  "risk_level": "critical",
  "estimated_exposure": 2600000,
  "ftc_fine": 95000,
  "legal_costs": 500000,
  "reputation_damage": 1000000,
  "confidence": 95,
  "reasoning": "Post promotes FitTea product without disclosure...",
  "ftc_guidelines": ["16 CFR 255.5", "16 CFR 255.1(d)"],
  "recommendation": "Add clear disclosure at beginning of caption",
  "risk_factors": {
    "base_score": 100,
    "reach_multiplier": 1.3,
    "engagement_multiplier": 1.3,
    "engagement_rate": 3.0
  }
}
```

#### Output Fields

| Field | Type | Description |
|-------|------|-------------|
| `post_id` | string | Post identifier |
| `platform` | string | Social media platform |
| `url` | string | Post URL |
| `influencer_username` | string | Influencer's username |
| `influencer_followers` | integer | Follower count |
| `has_violation` | boolean | Whether FTC violation was detected |
| `violation_type` | string | Type of violation (missing_disclosure, insufficient_disclosure, hidden_disclosure, none) |
| `severity` | string | Violation severity (critical, high, medium, low, none) |
| `risk_score` | integer | Calculated risk score (0-100) |
| `risk_level` | string | Risk level classification |
| `estimated_exposure` | integer | Total estimated financial exposure (USD) |
| `ftc_fine` | integer | Estimated FTC fine (USD) |
| `legal_costs` | integer | Estimated legal defense costs (USD) |
| `reputation_damage` | integer | Estimated reputation damage cost (USD) |
| `confidence` | integer | AI analysis confidence (0-100) |
| `reasoning` | string | Detailed AI explanation (if detailedAnalysis=true) |
| `ftc_guidelines` | array | Relevant FTC guideline citations (if detailedAnalysis=true) |
| `recommendation` | string | Recommended action (if detailedAnalysis=true) |
| `risk_factors` | object | Risk calculation breakdown (if detailedAnalysis=true) |

### How It Works

#### 1. AI Compliance Analysis

The Actor uses OpenAI's GPT-4 to analyze each post against FTC guidelines (16 CFR Part 255). The AI evaluates:

- Whether a material connection (sponsorship/partnership) is implied
- If adequate disclosure of this connection exists
- Specific violations and their severity
- Confidence level of the analysis

#### 2. Risk Scoring

A multi-factor algorithm calculates a 0-100 risk score based on:

- **Violation Severity**: Critical (100), High (75), Medium (50), Low (25)
- **Reach Factor**: Follower count multiplier (1.0x to 1.5x)
- **Engagement Factor**: Engagement rate multiplier (1.0x to 1.3x)

#### 3. Financial Exposure Calculation

Estimates total financial exposure including:

- **FTC Fines**: $50K base, scaled by risk score
- **Legal Costs**: $100K-$500K based on severity
- **Reputation Damage**: $2 per follower

#### 4. Results & Reporting

Results are saved to the Apify dataset and can be:

- Exported to CSV, JSON, or Excel
- Integrated with other tools via API
- Visualized in the Apify Console

### Example Usage

#### Analyze Sample Posts

```json
{
  "posts": [
    {
      "id": "post_001",
      "platform": "instagram",
      "influencer": {
        "username": "fitlife_sarah",
        "followers": 500000
      },
      "post": {
        "caption": "Loving my new FitTea! It's amazing for weight loss. Link in bio 🍵",
        "hashtags": ["#fitness", "#weightloss", "#fittea"],
        "engagement": {
          "likes": 15000,
          "comments": 450
        }
      }
    }
  ],
  "openaiApiKey": "sk-...",
  "detailedAnalysis": true,
  "riskThreshold": 50
}
```

#### Integration with Apify Scrapers

Combine this Actor with Apify's Instagram or TikTok scrapers for automated monitoring:

1. **Scrape Posts**: Use Instagram Post Scraper to collect influencer posts
2. **Analyze Compliance**: Pass scraped data to this Actor
3. **Alert on Violations**: Set up webhooks for critical violations
4. **Generate Reports**: Export results for compliance teams

### Requirements

- **OpenAI API Key**: Get one at https://platform.openai.com/api-keys
- **Apify Account**: Free tier includes 5,000 Actor runs per month

### Pricing

This Actor uses:

- **Compute Units**: ~0.01 CU per post analyzed
- **OpenAI API**: ~$0.02 per post (GPT-4 costs)

**Example**: Analyzing 100 posts costs ~$2.00 in OpenAI API fees + minimal Apify compute.

### FTC Guidelines Reference

This Actor evaluates compliance with:

- **16 CFR Part 255**: Guides Concerning the Use of Endorsements and Testimonials
- **16 CFR 255.5**: Disclosures of material connections
- **16 CFR 255.1(d)**: Clear and conspicuous disclosure requirements

### Limitations

- Requires manual data input (post text, engagement metrics)
- AI analysis is not a substitute for legal advice
- Confidence scores indicate AI certainty, not legal certainty
- Does not analyze visual content (images/videos)

### Support

For questions or issues:

- **GitHub**: https://github.com/tamaanzai-lgtm/guardian-ftc-compliance
- **Email**: support@guardian.ai
- **Apify Forum**: https://forum.apify.com

### License

MIT License - see LICENSE file for details

***

**Built for the Apify $1M Challenge**\
Part of the Guardian AI Agent Factory ecosystem

# Actor input Schema

## `postText` (type: `string`):

The text content or caption of the social media post to analyze

## `platform` (type: `string`):

Social media platform where the post was published

## `influencerUsername` (type: `string`):

Username of the influencer who created the post

## `followerCount` (type: `integer`):

Number of followers the influencer has

## `apiKey` (type: `string`):

Your DeepSeek API key for AI-powered compliance analysis (also supports OpenAI API keys)

## Actor input object example

```json
{
  "postText": "Loving my new FitTea! It's amazing for weight loss. Link in bio to get yours! 🍵✨ #fitness #weightloss",
  "platform": "instagram",
  "influencerUsername": "fitlife_sarah",
  "followerCount": 500000,
  "apiKey": "sk-..."
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing FTC compliance analysis for each analyzed post

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "postText": "Loving my new FitTea! It's amazing for weight loss. Link in bio to get yours! 🍵✨ #fitness #weightloss",
    "influencerUsername": "fitlife_sarah",
    "apiKey": "sk-..."
};

// Run the Actor and wait for it to finish
const run = await client.actor("famed_judoka/ftc-compliance-actor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "postText": "Loving my new FitTea! It's amazing for weight loss. Link in bio to get yours! 🍵✨ #fitness #weightloss",
    "influencerUsername": "fitlife_sarah",
    "apiKey": "sk-...",
}

# Run the Actor and wait for it to finish
run = client.actor("famed_judoka/ftc-compliance-actor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "postText": "Loving my new FitTea! It'\''s amazing for weight loss. Link in bio to get yours! 🍵✨ #fitness #weightloss",
  "influencerUsername": "fitlife_sarah",
  "apiKey": "sk-..."
}' |
apify call famed_judoka/ftc-compliance-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,famed_judoka/ftc-compliance-actor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/1Ny2m1RD1JWaG7zaI/builds/44wBmoel0njoSb3t6/openapi.json
