# AI Content Detector (`novashieldai/ai-content-detector`) Actor

Detect AI-generated text using statistical analysis — perplexity, burstiness, vocabulary diversity, repetition patterns, sentence uniformity, and more. No external AI API calls — purely local heuristics.

- **URL**: https://apify.com/novashieldai/ai-content-detector.md
- **Developed by:** [Ali haydar Karadaş](https://apify.com/novashieldai) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 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/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## AI Content Detector

AI Content Detector analyzes text to determine whether it was written by a human or generated by AI, using statistical analysis without relying on any external AI APIs. Fast, private, and accurate -- your text never leaves the processing pipeline.

### What does AI Content Detector do?

This actor takes a piece of text and runs it through multiple statistical analyses to calculate the probability that it was AI-generated. It measures perplexity, burstiness, vocabulary diversity, sentence uniformity, repetition patterns, transition word density, punctuation regularity, and known AI phrase frequency. The result is a clear verdict -- likely_ai, likely_human, or uncertain -- along with a confidence score and a full breakdown of every metric.

Three modes are available. **Detect** analyzes a single text. **Bulk Detect** processes multiple texts at once. **Stats** returns basic text statistics (word count, sentence count, paragraph count, etc.) without running the AI detection.

The detection runs entirely on statistical methods. There are no calls to OpenAI, GPT, or any other external service. This means your text stays private and processing is fast.

### What data do you get?

- **ai_probability** -- overall probability the text is AI-generated (0.0 to 1.0)
- **verdict** -- likely_ai, likely_human, or uncertain
- **confidence** -- how confident the model is in its verdict
- **text_length** -- character count of the input
- **perplexity_score** -- language predictability (lower = more AI-like)
- **burstiness_score** -- sentence length variation (uniform = AI-like)
- **vocabulary_diversity** -- type-token ratio
- **repetition_score** -- repeated n-gram frequency
- **transition_word_density** -- transition words per total words
- **ai_phrase_count** -- number of common AI-generated phrases detected
- **sentence_uniformity** -- how uniform sentence lengths are
- **avg_sentence_length** -- average words per sentence
- **std_sentence_length** -- standard deviation of sentence lengths
- **unique_word_ratio** -- unique words divided by total words
- **punctuation_regularity** -- regularity of punctuation patterns

Stats mode returns: **word_count**, **sentence_count**, **paragraph_count**, **avg_word_length**, **char_count**.

### Who is this for?

- **Content teams and editors** -- verify that submitted articles are human-written before publishing
- **Academic institutions** -- screen student submissions for AI-generated content
- **SEO professionals** -- check whether competitor content or outsourced articles are AI-generated
- **Publishers and media companies** -- maintain editorial integrity by flagging AI content
- **Developers** -- integrate AI detection into your own content management tools

### How to use it

1. Open the actor in Apify Console and choose a mode (detect, bulk_detect, or stats).
2. Paste your text into the text field, or provide an array of texts for bulk mode.
3. Click "Start" to run the analysis.
4. Review the results in the Dataset tab -- you'll get a verdict, probability score, and detailed breakdown.
5. Export results or pull them via the Apify API for automated workflows.

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| mode | string | detect | Operation mode: detect, bulk_detect, or stats |
| text | string | -- | Text to analyze (for detect and stats modes) |
| texts | array | -- | Array of texts to analyze in bulk (for bulk_detect mode) |
| language | string | en | Language of the input text (currently English only) |

### Sample output

```json
{
  "text_length": 1847,
  "ai_probability": 0.82,
  "verdict": "likely_ai",
  "confidence": 0.76,
  "details": {
    "perplexity_score": 0.71,
    "burstiness_score": 0.85,
    "vocabulary_diversity": 0.43,
    "repetition_score": 0.38,
    "transition_word_density": 0.062,
    "ai_phrase_count": 7,
    "sentence_uniformity": 0.79,
    "avg_sentence_length": 18.4,
    "std_sentence_length": 3.2,
    "unique_word_ratio": 0.51,
    "punctuation_regularity": 0.67
  }
}
````

### How much does it cost?

Each result costs **$0.003**. Analyzing 1,000 texts costs $3, and 10,000 texts costs $30.

Apify gives every new user $5 in free monthly credits, so you can analyze roughly 1,600 texts for free.

### Common questions

**How accurate is the detection?**
The detector uses multiple statistical signals combined into a weighted score. It works well for standard-length content (300+ words). Very short texts or heavily edited AI content may produce uncertain results, which is why the actor returns a confidence score alongside the verdict.

**Does it send my text to any external AI service?**
No. All analysis is done locally using statistical methods. Your text never leaves the actor's runtime environment.

**Does it support languages other than English?**
Currently, the analysis is optimized for English text. The statistical models (AI phrase detection, transition word lists, etc.) are English-specific. Support for additional languages may be added in the future.

### Contact & Custom Solutions

Need a custom scraper, higher volume, or a specific integration? We're here to help.

If anything isn't working right or you need support, don't hesitate to reach out.

- Telegram: [t.me/novashield\_dev](https://t.me/novashield_dev)
- Email: novashield.dev@gmail.com

# Actor input Schema

## `mode` (type: `string`):

Operation mode: 'detect' for single text, 'bulk\_detect' for multiple texts, 'stats' for text statistics.

## `text` (type: `string`):

The text to analyze for AI-generated content. Required for 'detect' and 'stats' modes.

## `texts` (type: `array`):

Array of texts to analyze in bulk. Required for 'bulk\_detect' mode.

## `language` (type: `string`):

Language of the input text (currently only English supported).

## Actor input object example

```json
{
  "mode": "detect",
  "language": "en"
}
```

# 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 = {
    "text": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("novashieldai/ai-content-detector").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 = { "text": "" }

# Run the Actor and wait for it to finish
run = client.actor("novashieldai/ai-content-detector").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "text": ""
}' |
apify call novashieldai/ai-content-detector --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=novashieldai/ai-content-detector",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "AI Content Detector",
        "description": "Detect AI-generated text using statistical analysis — perplexity, burstiness, vocabulary diversity, repetition patterns, sentence uniformity, and more. No external AI API calls — purely local heuristics.",
        "version": "1.0",
        "x-build-id": "W1uUk8B3qgumzw9md"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/novashieldai~ai-content-detector/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-novashieldai-ai-content-detector",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/novashieldai~ai-content-detector/runs": {
            "post": {
                "operationId": "runs-sync-novashieldai-ai-content-detector",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/novashieldai~ai-content-detector/run-sync": {
            "post": {
                "operationId": "run-sync-novashieldai-ai-content-detector",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "detect",
                            "bulk_detect",
                            "stats"
                        ],
                        "type": "string",
                        "description": "Operation mode: 'detect' for single text, 'bulk_detect' for multiple texts, 'stats' for text statistics.",
                        "default": "detect"
                    },
                    "text": {
                        "title": "Text",
                        "type": "string",
                        "description": "The text to analyze for AI-generated content. Required for 'detect' and 'stats' modes."
                    },
                    "texts": {
                        "title": "Texts (Bulk)",
                        "type": "array",
                        "description": "Array of texts to analyze in bulk. Required for 'bulk_detect' mode.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "language": {
                        "title": "Language",
                        "enum": [
                            "en"
                        ],
                        "type": "string",
                        "description": "Language of the input text (currently only English supported).",
                        "default": "en"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
