Currently available for Batches. Support for scrapes, crawls, maps, and answers is coming soon.
Use Cases
Tracking & Organization
Link resources to internal systems with order IDs, customer IDs, or project names.
Filtering & Search
Tag resources for easy retrieval and filtering in your application.
Workflow Context
Store pipeline stage, priority level, or processing instructions.
Audit Trail
Record who initiated a request, timestamps, or version information.
Adding Metadata on Create
Include themetadata parameter when creating a resource:
Validation Rules
| Constraint | Limit | Error Example |
|---|---|---|
| Maximum keys | 50 | "Metadata can have a maximum of 50 keys. You provided 51 keys." |
| Key length | 40 characters | "Metadata key \"my_very_long_key_name...\" exceeds 40 character limit." |
| Key format | No square brackets | "Metadata key \"items[0]\" cannot contain square brackets ([ or ])." |
| Value length | 500 characters | "Metadata value for key \"description\" exceeds 500 character limit." |
| Value type | Strings only | "Metadata value for key \"count\" must be a string. Got object." |
Type Coercion: Numbers and booleans are automatically converted to strings.
42→"42"true→"true"3.14→"3.14"
Updating Metadata (PATCH)
Currently available for: Batches only.Crawls, Scrapes, Maps, and Answers do not yet support updating metadata after creation.
Update Operations
Add new keys
Add new keys
New keys are added while preserving existing ones.Before:
After:
{"project": "alpha"}After:
{"project": "alpha", "new_key": "new_value"}Update existing keys
Update existing keys
Existing keys are overwritten with new values.Before:
After:
{"project": "alpha", "priority": "high"}After:
{"project": "beta", "priority": "high"}Delete specific keys
Delete specific keys
Set a key to Before:
After:
null or "" (empty string) to delete it.{"project": "alpha", "priority": "high"}After:
{"project": "alpha"}Clear all metadata
Clear all metadata
Set the entire metadata field to Before:
After:
null or "" to remove all keys.{"project": "alpha", "priority": "high"}After:
{}Mixed operations
Mixed operations
Add, update, and delete keys in a single request.Before:
After:
{"project": "alpha", "old_field": "remove_me"}After:
{"project": "gamma", "new_field": "value"}PATCH Behavior Summary
| Operation | Request | Result |
|---|---|---|
| Add key | {"metadata": {"new": "value"}} | Key added, others preserved |
| Update key | {"metadata": {"existing": "new_value"}} | Key updated, others preserved |
| Delete key | {"metadata": {"key": null}} | Key removed, others preserved |
| Delete key | {"metadata": {"key": ""}} | Key removed, others preserved |
| Clear all | {"metadata": null} | All keys removed |
| Clear all | {"metadata": ""} | All keys removed |
| No-op | {"metadata": {}} | No changes |