# AI Bot Log Analyzer (`bmiller1009/ai-bot-log-analyzer`) Actor

Analyze web server access logs to classify AI-user traffic and likely agents or scripts — not just known bots and crawlers — and surface route-level visibility patterns.

- **URL**: https://apify.com/bmiller1009/ai-bot-log-analyzer.md
- **Developed by:** [Sentinel Signal](https://apify.com/bmiller1009) (community)
- **Categories:** Developer tools, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $100.00 / 1,000 log analysis (up to 100 mb)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Bot Log Analyzer

Analyze one uncompressed nginx, Caddy, or mapped JSONL access log to classify
**AI-user traffic and likely agents or scripts** in your requests — not just
known bots and crawlers. The Actor emits a privacy-safe dataset summary and
JSON, Markdown, and CSV report artifacts.

### Pricing

**This is a paid, pay-per-event Actor. Exactly one event is charged per completed run, priced by input size:**

| Input size | Event | Price |
|---|---|---:|
| Up to 100 MB | `agentlog-analysis-small` | **$0.10** |
| Over 100 MB, up to 500 MB | `agentlog-analysis-medium` | **$0.35** |
| Over 500 MB, up to the 1 GiB limit | `agentlog-analysis-large` | **$0.80** |

No charge is made for invalid input or a run that fails before an analysis
completes. There is no additional per-page, per-request, or per-GB charge
beyond the single event above. The Console "Maximum cost per run" field may
show "Unlimited" — Apify doesn't let an Actor set its own pre-filled default
there, but the actual charge is fixed and bounded by the table above
regardless of that field's value; it cannot exceed $0.80.

### Input

**Recommended: upload a file directly, or paste a URL to one.** This is the
primary way to run an analysis — no separate setup required.

Advanced: you can instead reference a record already sitting in an existing
Apify key-value store (`inputStoreId` / `inputRecordKey`), and set JSONL field
mapping, a strict analyzer configuration object, or a `since` / `until`
time-range filter. These controls are grouped under **Advanced** in the input
form.

### Privacy

The analyzer never emits raw IP addresses, raw lines, per-run salts, or
synthetic-session identifiers. It does not call external AI services.

### Resource envelope

For a 1 GiB input, run with at least 4096 MB memory and a 60-minute timeout.

# Actor input Schema

## `inputFileUrl` (type: `string`):

Upload an uncompressed access-log file directly, or paste a public HTTPS URL to one. This is the recommended way to run an analysis. (Alternative: reference an existing key-value store record under Advanced.)

## `format` (type: `string`):

Detect the format or select a supported parser.

## `outputFormats` (type: `array`):

Report artifacts to write to the run key-value store.

## `inputStoreId` (type: `string`):

Alternative to uploading a file above: select an existing store containing one uncompressed access-log record.

## `inputRecordKey` (type: `string`):

Key of the uncompressed log record in the selected store above.

## `sample` (type: `integer`):

Stop after this many valid events.

## `mapping` (type: `object`):

Dot-path mapping required for generic JSONL input.

## `config` (type: `object`):

Optional strict analyzer configuration object.

## `since` (type: `string`):

RFC 3339 timestamp.

## `until` (type: `string`):

Exclusive RFC 3339 timestamp.

## Actor input object example

```json
{
  "format": "auto",
  "outputFormats": [
    "json",
    "markdown",
    "csv"
  ],
  "inputRecordKey": "ACCESS_LOG",
  "mapping": {},
  "config": {}
}
```

# Actor output Schema

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

No description

## `jsonReport` (type: `string`):

No description

## `markdownReport` (type: `string`):

No description

## `routesCsv` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("bmiller1009/ai-bot-log-analyzer").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("bmiller1009/ai-bot-log-analyzer").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 '{}' |
apify call bmiller1009/ai-bot-log-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bmiller1009/ai-bot-log-analyzer"
        }
    }
}

```

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/TO2tl350s85AWKz2C/builds/pqfxNcUrxabbC42Fj/openapi.json
