Skip to content

Field Types

The type you declare on a schema field determines how Runo coerces the extracted value.

TypeStored asCoercion
stringstringAnything is stringified
integerintegerNumbers parsed from text - "35 years old"35
floatfloatNumbers parsed from text - "$1.2M"1200000.0
booleanbooleanTruthy/falsy signals normalized - "✓ Verified"true
datestring (YYYY-MM-DD)ISO 8601; relative dates resolved to absolute
array<string>array of stringsJSON array - empty [] if nothing matched
array<integer>array of integersJSON array of integers
array<float>array of floatsJSON array of floats

Behavior

  • Unresolvable values return null. Never silently dropped. The data object 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 warnings array.
  • Hard coercion failures return either null for that field, or a top-level TYPE_COERCION_FAILED error 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"]
  }
}

Released under the terms of Runo’s Terms of Use.