Output Schemas
An output schema defines the exact JSON structure you want Meter to return from extractions. Instead of getting whatever field names the AI chooses, you specify the fields, types, and nesting — and Meter maps the extracted data to match.When to use output schemas
- You need consistent field names across different strategies (e.g., all product scrapers return
price, notcostorproduct_price) - You want type coercion (prices as numbers, not strings like
"$19.99") - Your downstream system expects a specific JSON shape
- You’re using strategy groups and want uniform output across all members
Defining a schema
A schema is a JSON object where keys are field names and values are type strings:Supported types
| Type | Description | Coercion behavior |
|---|---|---|
string | Text value | Converts to string, None if empty |
number | Decimal number | Strips $, €, £, commas; parses float (e.g., "$19.99" → 19.99) |
float | Same as number | Alias for number |
integer | Whole number | Same stripping as number, then rounds to int (e.g., "225 points" → 225) |
int | Same as integer | Alias for integer |
boolean | True/false | "true", "yes", "1" → True; "false", "no", "0" → False |
array | List of values | If string, splits on commas; if single value, wraps in list |
Nested schemas
You can define nested structures:product_name, product_pricing_amount) and then re-nests it to match your schema structure.
Wrapper array pattern
For schemas with a single top-level key containing an array, Meter automatically wraps results:Where schemas apply
Strategy generation
Pass anoutput_schema when generating a strategy to guide extraction and get consistent output from the start:
Strategy groups
Apply a schema to all strategies in a group at once:Bulk upload
When using Bulk Upload, you can define an output schema that applies to all generated strategies in the batch.URL field handling
Meter automatically detects URL fields in your schema (keys containingurl, link, or href) and optimizes extraction to capture the href attribute rather than link text. You don’t need to configure this — it happens automatically.
Examples
E-commerce product schema
Job listing schema
Next steps
Strategy Groups
Apply schemas to many strategies at once
Filtering
Filter extraction results post-processing
Strategies
Learn how strategies use output schemas
Bulk Upload
Create many strategies with a shared schema