Appearance
Defining a Schema
Your schema is the contract. Get it right and Runo extracts cleanly; get it wrong and you'll see nulls where you expect data.
Field Shape
json
{
"field": "price",
"type": "float",
"example": 29.99,
"hint": "Use sale price if present."
}| Key | Required | Notes |
|---|---|---|
field | yes | The output key. Use the names your code expects. CamelCase is optimal. |
type | yes | See the type table below. |
example | yes | A representative value of the right type. Strongly recommended. |
hint | no | Plain-English guidance for edge cases. Kept short (under ~140 chars). |
Supported Types
| Type | What It Accepts | Example Coercion |
|---|---|---|
string | Anything; always a string | "Hello" |
integer | Numbers, parsed from text | "35 years old" → 35 |
float | Numbers, parsed from text | "$1.2M" → 1200000.0 |
boolean | True/false signals | "✓ Verified" → true |
date | ISO 8601 (YYYY-MM-DD); relative dates resolved to absolute | "yesterday" → "2026-05-07" |
array<string> | JSON array of strings | ["actress", "writer"] |
array<integer> | JSON array of integers | [1, 2, 3] |
array<float> | JSON array of floats | [1.5, 2.0] |
Unresolvable fields return null.
Hints (When to Use Them)
Default behavior is usually fine. Reach for hint when:
- A page shows two values for the same concept and you want a specific one (
"Use sale price if present.") - The field name is ambiguous (
"author"on a republished article - author of what?) - The site uses non-obvious wording (
"likes"is sometimes called"reactions")
Use them sparingly and only when necessary to avoid confusion.
Worked Examples
Product Page
json
[
{ "field": "title", "type": "string", "example": "MacBook Pro 14\"" },
{ "field": "price", "type": "float", "example": 1999.00, "hint": "Use sale price if present." },
{ "field": "currency","type": "string", "example": "USD" },
{ "field": "inStock", "type": "boolean", "example": true },
{ "field": "rating", "type": "float", "example": 4.6 },
{ "field": "tags", "type": "array<string>", "example": ["laptop", "apple"] }
]Article / Blog Post
json
[
{ "field": "headline", "type": "string", "example": "OpenAI ships o3" },
{ "field": "author", "type": "string", "example": "Cade Metz" },
{ "field": "publishedAt", "type": "date", "example": "2024-12-20" },
{ "field": "summary", "type": "string", "example": "A short summary of the article.", "hint": "1–3 sentences." }
]Profile Page
json
[
{ "field": "firstName", "type": "string", "example": "Rachel" },
{ "field": "lastName", "type": "string", "example": "McAdams" },
{ "field": "age", "type": "integer", "example": 35 },
{ "field": "netWorth", "type": "float", "example": 12500000.00 },
{ "field": "isVerified", "type": "boolean", "example": true },
{ "field": "tags", "type": "array<string>", "example": ["actress", "producer"] }
]Tips
- Keep schemas tight. 4–10 fields extract more accurately than 30. If you need more, split into two calls or a static key with a curated set.
- Use
array<T>over delimiter strings. Don't ask for"tags"as a comma-joined string and split client-side. Declarearray<string>and let Runo do it. - Names matter.
firstNameandgivenNameproduce subtly different extractions. Use the term your target sites tend to use.