# Apache log parser analyzer

**Use case:** 

Parse Apache access logs into structured records with IPs, paths, methods, status codes, user agents, and traffic summaries.

## Input

```json
{
  "logText": "83.149.9.216 - - [17/May/2015:10:05:03 +0000] \"GET /presentations/logstash-monitorama-2013/images/kibana-search.png HTTP/1.1\" 200 203023 \"http://semicomplete.com/presentations/logstash-monitorama-2013/\" \"Mozilla/5.0\"\n10.0.0.5 - admin [17/May/2015:10:05:15 +0000] \"POST /api/login HTTP/1.1\" 401 120 \"-\" \"curl/7.88.1\"",
  "logFormat": "apache_combined",
  "maxLines": 1000,
  "includeStats": true,
  "topN": 10
}
```

## Output

```json
{
  "ip": {
    "label": "IP Address",
    "format": "text"
  },
  "timestamp": {
    "label": "Timestamp",
    "format": "text"
  },
  "method": {
    "label": "Method",
    "format": "text"
  },
  "path": {
    "label": "Path",
    "format": "text"
  },
  "protocol": {
    "label": "Protocol",
    "format": "text"
  },
  "statusCode": {
    "label": "Status",
    "format": "number"
  },
  "responseBytes": {
    "label": "Bytes",
    "format": "number"
  },
  "referrer": {
    "label": "Referrer",
    "format": "text"
  },
  "userAgent": {
    "label": "User Agent",
    "format": "text"
  },
  "logFormat": {
    "label": "Detected Format",
    "format": "text"
  },
  "parseError": {
    "label": "Parse Error",
    "format": "text"
  }
}
```

## About this Actor

This example demonstrates how to use [Apache & Nginx Log Parser](https://apify.com/automation-lab/apache-log-parser) with a specific input configuration. Visit the [Actor detail page](https://apify.com/automation-lab/apache-log-parser) to learn more, explore other use cases, and run it yourself.