# Bulk Image Optimizer & Compressor (`automation-lab/bulk-image-optimizer`) Actor

Compress, resize, and convert images between PNG, JPG, WebP, and AVIF formats in bulk. Strip EXIF metadata, set quality levels, and download optimized images with detailed size reports.

- **URL**: https://apify.com/automation-lab/bulk-image-optimizer.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

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

## Bulk Image Optimizer & Compressor

### What does Bulk Image Optimizer do?

**Bulk Image Optimizer & Compressor** lets you compress, resize, and convert images between **PNG, JPEG, WebP, and AVIF** formats at scale. Provide image URLs or upload files directly, and get optimized versions with detailed size reports — all without writing any code.

Built on the **sharp** image processing library (the fastest Node.js image tool), this actor handles everything from simple compression to bulk format conversion with resize. It works as a pure computation tool — **no browser, no proxy, no anti-bot complexity** — so it runs fast and cheap.

Try it now by clicking **Start** with the prefilled input, or read the full guide below.

### Who is Bulk Image Optimizer for?

**Web developers and performance engineers**
- Optimize entire image directories before deployment
- Convert legacy PNG/JPG assets to modern WebP/AVIF for faster page loads
- Automate image optimization in CI/CD pipelines via the API

**E-commerce teams**
- Compress product photos in bulk to reduce page weight
- Standardize image dimensions across catalog pages
- Strip EXIF metadata to protect photographer location data

**Content creators and marketers**
- Batch-resize social media images to platform specs
- Convert screenshots and graphics to web-friendly formats
- Reduce email attachment sizes by compressing images

**Data engineers and scrapers**
- Post-process scraped images into consistent formats
- Reduce storage costs by compressing downloaded image datasets
- Chain with other Apify actors for end-to-end image pipelines

### Why use Bulk Image Optimizer?

- **Fast and cheap** — pure computation, no browser or proxy overhead. Processes hundreds of images for pennies
- **All major formats** — supports PNG, JPEG, WebP, AVIF input and output, plus GIF, TIFF, and SVG input
- **Smart resize** — set max width/height and images resize proportionally. Never stretches smaller images
- **EXIF stripping** — remove GPS coordinates, camera info, and other metadata for privacy and smaller files
- **Detailed reports** — get original vs optimized size, savings percentage, dimensions, and download links for every image
- **No API key or account needed** — just provide image URLs and go
- **API and scheduling** — automate image optimization with the Apify API, webhooks, and 5,000+ app integrations via Zapier and Make
- **Download links** — every optimized image gets a direct download URL from the key-value store

### What data can you extract?

For each processed image, you get a complete optimization report:

| Field | Description |
|-------|-------------|
| `fileName` | Output file name with new extension |
| `sourceUrl` | Original image URL (if provided via URL) |
| `originalFormat` | Detected input format (png, jpg, webp, etc.) |
| `outputFormat` | Output format after conversion |
| `originalSizeKB` | Original file size in kilobytes |
| `optimizedSizeKB` | Optimized file size in kilobytes |
| `savingsPercent` | Size reduction as a percentage |
| `width` / `height` | Final image dimensions in pixels |
| `originalWidth` / `originalHeight` | Original dimensions before resize |
| `wasResized` | Whether the image was resized |
| `metadataStripped` | Whether EXIF data was removed |
| `downloadUrl` | Direct URL to download the optimized image |

### How much does it cost to optimize images?

This actor uses **pay-per-event** pricing — you pay only for what you process. No monthly subscription. All platform costs are included.

| | Free | Starter ($29/mo) | Scale ($199/mo) | Business ($999/mo) |
|---|---|---|---|---|
| **Per image** | $0.00345 | $0.003 | $0.00234 | $0.0018 |
| **100 images** | $0.35 | $0.30 | $0.23 | $0.18 |
| **1,000 images** | $3.45 | $3.00 | $2.34 | $1.80 |

Plus a one-time $0.005 start fee per run.

**On the free plan ($5 credits), you can optimize approximately 1,400 images.**

**Real-world cost examples:**

| Scenario | Images | Duration | Cost (Free tier) |
|---|---|---|---|
| Product photos batch | 50 | ~15s | ~$0.18 |
| Website image audit | 200 | ~45s | ~$0.70 |
| Full catalog conversion | 1,000 | ~3min | ~$3.45 |

### How to optimize images in bulk

1. Go to the [Bulk Image Optimizer](https://apify.com/automation-lab/bulk-image-optimizer) page on Apify Store
2. Click **Start** to try it with the prefilled example
3. Add your image URLs to the **Image URLs** field (one per line)
4. Choose your **Output Format** — WebP gives the best size-to-quality ratio for web use
5. Adjust **Quality** (1-100) — 80 is a good default for most use cases
6. Optionally set **Max Width** or **Max Height** to resize images
7. Click **Start** and wait for the run to complete
8. Download optimized images from the **Key-Value Store** tab, or export the metadata report from **Dataset**

**Example input — convert to WebP:**
```json
{
    "imageUrls": [
        "https://example.com/photo1.jpg",
        "https://example.com/photo2.png"
    ],
    "outputFormat": "webp",
    "quality": 80
}
````

**Example input — resize and compress:**

```json
{
    "imageUrls": [
        "https://example.com/large-photo.jpg"
    ],
    "outputFormat": "jpg",
    "quality": 75,
    "maxWidth": 1200,
    "maxHeight": 800,
    "stripMetadata": true
}
```

**Example input — maximum PNG compression:**

```json
{
    "imageUrls": [
        "https://example.com/screenshot.png"
    ],
    "outputFormat": "png",
    "pngCompressionLevel": 9,
    "stripMetadata": true
}
```

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `imageUrls` | array | — | List of image URLs to optimize |
| `outputFormat` | string | `"original"` | Target format: `png`, `jpg`, `webp`, `avif`, or `original` (keep current) |
| `quality` | integer | `80` | Output quality 1-100. Lower = smaller file. Only affects lossy formats (JPG, WebP, AVIF) |
| `maxWidth` | integer | — | Max width in pixels. Images wider than this are resized proportionally |
| `maxHeight` | integer | — | Max height in pixels. Images taller than this are resized proportionally |
| `stripMetadata` | boolean | `true` | Remove EXIF, IPTC, and XMP metadata from images |
| `pngCompressionLevel` | integer | `9` | PNG compression 0-9. Higher = smaller file, slower processing |

### Output example

```json
{
    "fileName": "photo.webp",
    "sourceUrl": "https://example.com/photo.jpg",
    "sourceKey": null,
    "originalFormat": "jpg",
    "outputFormat": "webp",
    "originalSizeKB": 330,
    "optimizedSizeKB": 61.7,
    "savingsPercent": 81.3,
    "width": 800,
    "height": 450,
    "originalWidth": 1920,
    "originalHeight": 1080,
    "wasResized": true,
    "metadataStripped": true,
    "downloadUrl": "https://api.apify.com/v2/key-value-stores/abc123/records/optimized-photo.webp",
    "kvStoreKey": "optimized-photo.webp",
    "error": null
}
```

### Tips for best results

- **Start small** — try 5-10 images first to find the right quality/format settings before running large batches
- **WebP is the best all-rounder** — it gives 25-80% smaller files than JPEG at the same visual quality, and all modern browsers support it
- **AVIF gives the smallest files** — but encoding is slower and some older browsers don't support it yet
- **Quality 60-80 is the sweet spot** — below 60, artifacts become visible. Above 85, file size gains are minimal
- **Use `original` format for pure compression** — when you just want smaller files without changing format
- **Strip metadata to save space** — EXIF data can add 5-50KB per photo. It's removed by default
- **Resize before compressing** — downscaling a 4000px photo to 1200px can save more than any compression setting
- **Schedule regular runs** — set up a daily/weekly schedule to optimize new images automatically

### Integrations

- **Bulk Image Optimizer -> Google Sheets** — export optimization reports (original size, savings, download links) to a spreadsheet for team review
- **Bulk Image Optimizer -> Slack** — get notified when a large batch finishes with a summary of total space saved
- **Bulk Image Optimizer -> Make/Zapier** — chain with a file upload step to automatically optimize images uploaded to Google Drive, Dropbox, or S3
- **Scheduled runs** — set a daily schedule to optimize images from a CMS or asset pipeline
- **Webhooks** — trigger downstream processing (upload to CDN, update database) when optimization completes

### Using the Apify API

#### Node.js

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('automation-lab/bulk-image-optimizer').call({
    imageUrls: [
        'https://example.com/photo1.jpg',
        'https://example.com/photo2.png',
    ],
    outputFormat: 'webp',
    quality: 80,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) {
    console.log(`${item.fileName}: ${item.savingsPercent}% saved — ${item.downloadUrl}`);
}
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_API_TOKEN')

run = client.actor('automation-lab/bulk-image-optimizer').call(run_input={
    'imageUrls': [
        'https://example.com/photo1.jpg',
        'https://example.com/photo2.png',
    ],
    'outputFormat': 'webp',
    'quality': 80,
})

dataset = client.dataset(run['defaultDatasetId']).list_items().items
for item in dataset:
    print(f"{item['fileName']}: {item['savingsPercent']}% saved — {item['downloadUrl']}")
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~bulk-image-optimizer/runs?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "imageUrls": ["https://example.com/photo.jpg"],
    "outputFormat": "webp",
    "quality": 80
  }'
```

### Use with AI agents via MCP

Bulk Image Optimizer & Compressor is available as a tool for AI assistants that support the [Model Context Protocol (MCP)](https://docs.apify.com/platform/integrations/mcp).

Add the Apify MCP server to your AI client — this gives you access to all Apify actors, including this one:

#### Setup for Claude Code

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/bulk-image-optimizer"
```

#### Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com?tools=automation-lab/bulk-image-optimizer"
        }
    }
}
```

Your AI assistant will use OAuth to authenticate with your Apify account on first use.

#### Example prompts

Once connected, try asking your AI assistant:

- "Use automation-lab/bulk-image-optimizer to convert these 10 product photos to WebP with 75% quality"
- "Optimize all the images at these URLs and resize them to max 1200px wide"
- "Compress these PNG screenshots to AVIF format and strip all metadata"

Learn more in the [Apify MCP documentation](https://docs.apify.com/platform/integrations/mcp).

### Is it legal to optimize images?

Image optimization is a legitimate computational process. This actor processes images you provide (via URLs you have access to or files you upload). It does not scrape websites or bypass access controls.

Always ensure you have the rights to process the images you provide. Respect copyright and licensing terms. This actor does not store or redistribute images beyond the run's key-value store (which expires after the retention period).

### FAQ

**How fast is Bulk Image Optimizer?**
Very fast. Since it uses pure Node.js computation with the sharp library (libvips under the hood), it processes most images in under 1 second each. A batch of 100 typical web images completes in about 30-60 seconds.

**Which format gives the best compression?**
AVIF provides the smallest file sizes (40-60% smaller than JPEG), followed by WebP (25-35% smaller than JPEG). However, AVIF encoding is slower and has less browser support. WebP is the safest choice for web use — it's supported by all modern browsers and offers excellent compression.

**Can I upload images instead of providing URLs?**
Yes. Upload images to the run's key-value store with keys starting with `input-` (e.g., `input-photo1.jpg`, `input-banner.png`). The actor will detect and process them automatically alongside any URLs.

**Why are some images larger after optimization?**
This happens when the source image is already heavily optimized. Converting a well-compressed JPEG to WebP at quality 80, for example, might produce a slightly larger file. Try lowering the quality setting or keeping the original format for already-optimized images.

**Why does my image look blurry after optimization?**
The quality setting is too low. Try increasing it to 80-85 for photos or 90+ for images with text. PNG compression is always lossless regardless of the compression level setting.

### Other image and media tools

- [Google Images Scraper](https://apify.com/automation-lab/google-images-scraper) — search and download images from Google Image Search
- [NASA Images Scraper](https://apify.com/automation-lab/nasa-images-scraper) — extract NASA's public space and astronomy images
- [Image Alt Checker](https://apify.com/automation-lab/image-alt-checker) — audit missing or poor alt text on any website
- [Bing Images Scraper](https://apify.com/automation-lab/bing-images-scraper) — scrape image results from Bing Image Search
- [Base64 Converter](https://apify.com/automation-lab/base64-converter) — encode and decode Base64 strings in bulk

# Actor input Schema

## `imageUrls` (type: `array`):

Add URLs of images to optimize. Supports PNG, JPG, WebP, AVIF, GIF, TIFF, and SVG inputs.

## `outputFormat` (type: `string`):

Convert all images to this format. Leave as 'original' to keep each image's current format.

## `quality` (type: `integer`):

Set output quality (1-100). Lower = smaller file, worse quality. 80 is a good balance. Only applies to lossy formats (JPG, WebP, AVIF).

## `maxWidth` (type: `integer`):

Resize images wider than this value. Height adjusts proportionally. Leave empty to skip resizing.

## `maxHeight` (type: `integer`):

Resize images taller than this value. Width adjusts proportionally. Leave empty to skip resizing.

## `stripMetadata` (type: `boolean`):

Remove EXIF, IPTC, and XMP metadata from images. Reduces file size and protects privacy.

## `pngCompressionLevel` (type: `integer`):

Set PNG compression level (0-9). Higher = smaller file, slower processing. Default 9 (maximum compression).

## Actor input object example

```json
{
  "imageUrls": [
    "https://picsum.photos/800/600.jpg"
  ],
  "outputFormat": "webp",
  "quality": 80,
  "stripMetadata": true,
  "pngCompressionLevel": 9
}
```

# Actor output Schema

## `overview` (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 = {
    "imageUrls": [
        "https://picsum.photos/800/600.jpg"
    ],
    "outputFormat": "webp",
    "quality": 80
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/bulk-image-optimizer").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 = {
    "imageUrls": ["https://picsum.photos/800/600.jpg"],
    "outputFormat": "webp",
    "quality": 80,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/bulk-image-optimizer").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 '{
  "imageUrls": [
    "https://picsum.photos/800/600.jpg"
  ],
  "outputFormat": "webp",
  "quality": 80
}' |
apify call automation-lab/bulk-image-optimizer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/bulk-image-optimizer",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Bulk Image Optimizer & Compressor",
        "description": "Compress, resize, and convert images between PNG, JPG, WebP, and AVIF formats in bulk. Strip EXIF metadata, set quality levels, and download optimized images with detailed size reports.",
        "version": "0.1",
        "x-build-id": "3mIF7x2VhMHg0G1wV"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~bulk-image-optimizer/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-bulk-image-optimizer",
                "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/automation-lab~bulk-image-optimizer/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-bulk-image-optimizer",
                "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/automation-lab~bulk-image-optimizer/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-bulk-image-optimizer",
                "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": {
                    "imageUrls": {
                        "title": "Image URLs",
                        "type": "array",
                        "description": "Add URLs of images to optimize. Supports PNG, JPG, WebP, AVIF, GIF, TIFF, and SVG inputs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "outputFormat": {
                        "title": "Output Format",
                        "enum": [
                            "original",
                            "png",
                            "jpg",
                            "webp",
                            "avif"
                        ],
                        "type": "string",
                        "description": "Convert all images to this format. Leave as 'original' to keep each image's current format.",
                        "default": "original"
                    },
                    "quality": {
                        "title": "Quality",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Set output quality (1-100). Lower = smaller file, worse quality. 80 is a good balance. Only applies to lossy formats (JPG, WebP, AVIF).",
                        "default": 80
                    },
                    "maxWidth": {
                        "title": "Max Width (px)",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Resize images wider than this value. Height adjusts proportionally. Leave empty to skip resizing."
                    },
                    "maxHeight": {
                        "title": "Max Height (px)",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Resize images taller than this value. Width adjusts proportionally. Leave empty to skip resizing."
                    },
                    "stripMetadata": {
                        "title": "Strip EXIF Metadata",
                        "type": "boolean",
                        "description": "Remove EXIF, IPTC, and XMP metadata from images. Reduces file size and protects privacy.",
                        "default": true
                    },
                    "pngCompressionLevel": {
                        "title": "PNG Compression Level",
                        "minimum": 0,
                        "maximum": 9,
                        "type": "integer",
                        "description": "Set PNG compression level (0-9). Higher = smaller file, slower processing. Default 9 (maximum compression).",
                        "default": 9
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
