# Nginx access log extractor

**Use case:** 

Extract structured traffic rows from Nginx access logs with request paths, response codes, bytes, referrers, and user agents.

## Input

```json
{
  "logText": "192.0.2.10 - - [24/Jun/2026:12:00:01 +0000] \"GET /pricing HTTP/1.1\" 200 5321 \"https://example.com/\" \"Mozilla/5.0\"\n192.0.2.11 - - [24/Jun/2026:12:00:03 +0000] \"GET /missing-page HTTP/1.1\" 404 321 \"-\" \"Googlebot/2.1\"",
  "logFormat": "nginx",
  "maxLines": 5000,
  "includeStats": true,
  "topN": 20
}
```

## 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.