Skip to main content
Filter and format extracted data using the Type parameter in a Field object. For example, the following field returns null unless it finds data that Sensible recognizes as a number:
JSON
The following types are available: Address
Boolean
Compose
Currency
Custom
Date
Distance
Images
Name
Number
Paragraph
Percentage
Phone Number
String
Table
Weight
Deprecated types

Address

Returns USA-based addresses. By default, Sensible recognizes single- or multi-line addresses isolated from other lines in “block” format. For example, "type":"address" recognizes address such as: Click to enlarge Use the Block Format parameter to recognize addresses embedded in non-address lines, for example, use:
JSON
to find addresses in paragraphs: Click to enlarge Example output
JSON
Formats recognized With either block or in-line address, Sensible recognizes these formats:
  • City, State, Zip, and variant representations of these elements such as abbreviations
  • Digits, Street, City, State, Zip, and variant representations of these elements such as abbreviations
  • PO boxes with a number represented in digits
  • Lists of addresses in the preceding formats
  • Addresses that span multiple lines. To enable this behavior, Sensible joins the lines returned by the method using whitespaces as the separators, and finds the type in the joined text.
Sensible is less sensitive to non-address text if you configure "block_format": false: For example: Waverly Pl `# block format San Francisco, CA 94110 123 Waverly Pl San Francisco, CA 941104123 PO BOX 1058 San Francisco, CA 94110 123 Waverly Pl San Francisco, CA 941104123

inline format

the shipping address is 123 Waverly Pl San Francisco, CA, 94110. The billing address is the same.
Returns false for the following case-insensitive strings:
JSON
Example output:
JSON

Compose

Returns a transformed type you define using an array of types. In the array, each successive type in the array takes the previous type’s output as its input. For example, use this type:
  • As a more syntactically concise alternative to the Regex method or to Computed Field methods. For example, you can write a field to capture a date-typed field, then transform the field’s output with the Split method. Or, see the following example to transform dates using the Compose type.
  • To transform table cell contents. As an alternative, see the NLP table method to transform table cell contents using large language models(LLMs).

Parameters

Examples

Config
JSON
Example document
The following image shows the example document used with this example config:
Click to enlarge Output
JSON

Currency

You can define this type using concise syntax, or you can configure options with expanded syntax.

Simple syntax

Syntax example `“type”: “currency”``` Output example Returns USA dollars as absolute value. For example,
JSON
Formats recognized Sensible by default recognizes USA decimal notation (for example, 1,500.06). Recognizes abbreviated quantities, such as k for thousand. To recognize European decimal notation (for example, 1.500,06), see the following configurable syntax section. Recognizes digits with the following formatting:
  • dollar sign, optional commas every three digits, optional cents after period
  • commas every three digits, optional cents after period
  • no dollar sign, up to six digits without commas as sole line contents. Allow up to nine digits if cents are present.
Recognizes abbreviated and written-out quantities as follows:
  • thousand, k
  • million, mil, mm, m
  • billion, bil, b
  • trillion, t
For example:
This type doesn’t match text such as one million or 123456789.

Configurable syntax

Use configurable syntax to change the default recognized formats. Example syntax
JSON
Example output
JSON
Parameters

Custom

Returns a custom type you define using regular expressions. For example, define types for zip codes, time durations, customer IDs, and order numbers. Example syntax
JSON
Example output This type outputs strings. For example:
JSON
Parameters

Date

You can define this type using concise syntax, or you can configure options with expanded syntax. Sensible matches dates that span multiple lines. To enable this behavior, Sensible joins the lines returned by the method using whitespaces as the separators, and finds the type in the joined text.

Simple syntax

Syntax example
Output example Returns an ISO 8601-formatted date-time. For example:
JSON
Formats recognized Sensible recognizes the following date formats by default:
JSON
See the following configurable syntax section for definitions of the field descriptors in the preceding list. The following are examples of date formats that Sensible recognizes by default:

Configurable syntax

Syntax example The following example:
JSON
Recognizes the following date formats and ignores all default formats: Parameters The following table lists the field descriptors you can use to define a custom format other than the default formats listed in the simple syntax section.

Distance

Returns miles and kilometers. Recognizes digits followed optionally by kilometers, miles, or their abbreviations. For example:
Example output:
json

Images

Use this solely with the Document Range method to return image metadata.

Name

Simple syntax

Syntax example `“type”: “name”``` Output example Returns one or more names. For example:
JSON
Formats recognized Doesn’t recognize a list of names more than 6 words long. Doesn’t recognize lists of three or more names such as `last1, last2, & last3``` Recognizes names of the formats below, and variant representations of these elements such as abbreviations.
  • first last
  • first1 last1 and first2 last2
  • last, first1 and first2
  • first1 and first2 last
  • first1 last1, first2 last2,… firstN, lastN
For example:

Configurable syntax

Example syntax
JSON
Example output
JSON
Parameters

Number

Simple syntax

Syntax example `“type”: “number”``` Output example
JSON
Formats recognized Recognizes digits in USA decimal notation. Recognizes one or more digits, optionally followed either by:
  • commas preceding every three digits, optional digits after period, or by
  • digits after period
For example:
This type does not recognize text such as 3.061.534,45. Configure the Currency type instead.

Configurable syntax

Example syntax
JSON
Example output
JSON
Parameters

Paragraph

Use with methods that return paragraphs, for example Document Range or Paragraph, to format the extracted text. By default, returns paragraphs formatted with newline characters (\n), instead of formatted as a single string.

Simple syntax

Syntax example
Output example
JSON
Formats recognized Sensible recognizes paragraphs separated by configurable vertical gaps, or “paragraph breaks.” Sensible doesn’t use paragraph margins, for indentations, to detect paragraphs.

Configurable syntax

Use configurable syntax to change the formatting of the extracted text. Example syntax
JSON
Example output For the following document: Click to enlarge When you set"annotateSuperscriptAndSubscript": true , Sensible formats the footnote symbols to indicate they’re superscripted, for example, [^1]:
JSON
Parameters

Percentage

Returns percent as an absolute value. Recognizes a percent formatted as digits in USA decimal notation (for example, 1,500.06), followed optionally by a whitespace, followed by a percent sign (%) . For example:
JSON
Example output
JSON

Phone Number

Returns phone numbers:
  • Recognizes USA 10-digit phone numbers either with or without a country calling code. May be optionally formatted with parentheses, dashes, spaces, plus sign (+), or periods.
  • Recognizes international phone numbers if prefixed by a country calling code (for example, +91 for India).
Examples:
Example output
JSON
This type does not recognize country calling codes formatted with 00, for example, 0091 or 001.

String

Default type. Returns strings. Example output
JSON

Table

Required when you define a table method.

Weight

Returns pounds and kilograms. Recognizes digits in USA decimal notation (for example, 1,500.06):
  • digits are in the format recognized by the Number type
  • “pounds”, “kilograms”, or their abbreviations follow the digits
For example:
JSON
Example output
JSON

Deprecated types

Accounting Currency

Deprecated. See Currency Returns US dollar numbers. Supports negative numbers represented either with parentheses () or with the minus sign (-). Recognizes digits in USA decimal notation (for example, 1,500.06):
  • digits are in the format recognized by the Number type
  • digits are optionally preceded or succeeded by a negative sign (-)
  • digits are optionally preceded by a USA dollar sign ($)
Examples:
JSON
Example output
JSON