Appearance
Field Types
The type you declare on a schema field determines how Runo coerces the extracted value.
| Type | Stored as | Coercion |
|---|---|---|
string | string | Anything is stringified |
integer | integer | Numbers parsed from text - "35 years old" → 35 |
float | float | Numbers parsed from text - "$1.2M" → 1200000.0 |
boolean | boolean | Truthy/falsy signals normalized - "✓ Verified" → true |
date | string (YYYY-MM-DD) | ISO 8601; relative dates resolved to absolute |
array<string> | array of strings | JSON array - empty [] if nothing matched |
array<integer> | array of integers | JSON array of integers |
array<float> | array of floats | JSON array of floats |
Behavior
- Unresolvable values return
null. Never silently dropped. Thedataobject always has the same keys as your schema. - Coercion is best-effort. When Runo coerces with a transformation worth flagging (e.g., stripping a currency symbol), a string is appended to the response's
warningsarray. - Hard coercion failures return either
nullfor that field, or a top-levelTYPE_COERCION_FAILEDerror if the value cannot be sensibly mapped at all.
Example
json
[
{ "field": "name", "type": "string", "example": "Alice" },
{ "field": "age", "type": "integer", "example": 30 },
{ "field": "rating", "type": "float", "example": 4.6 },
{ "field": "isVerified", "type": "boolean", "example": true },
{ "field": "publishedAt", "type": "date", "example": "2024-12-20" },
{ "field": "tags", "type": "array<string>", "example": ["one", "two"] }
]Result on a typical page:
json
{
"data": {
"name": "Alice Smith",
"age": 32,
"rating": 4.7,
"isVerified": true,
"publishedAt": "2024-11-08",
"tags": ["actress", "writer"]
}
}If rating were missing on the page entirely:
json
{
"data": {
"name": "Alice Smith",
"age": 32,
"rating": null,
"isVerified": true,
"publishedAt": "2024-11-08",
"tags": ["actress", "writer"]
}
}