📋 Textly / Text Extraction

Obtain structured information about a text

About Texly Text Extraction

Textly allows you to obtain a JSON structured object on a natural language text regardless of the language.

This way you will be able to understand for sure if a text includes something you want to detect.

Usage

Once we have created and configured our API object, it is quite simple, we just need to execute the following code.

import DymoAPI from "dymo-api";

const dymo = new DymoAPI({
  apiKey: ""
});

console.log(await dymo.extractWithTextly({
  data: "Javier is 17 years old and studies computer science at university.",
  format: {
      name: { type: "string" },
      age: { type: "number" },
      isStudent: { type: "boolean" },
      courses: {
          type: "array",
          items: { "type": "string" }
      }
  }
}));

Response

Textly uses AI and advanced algorithms for recognition so responses may take a little longer than usual.
{
  name: "Javier",
  age: 17,
  isStudent: true,
  courses: [
    "computer science"
  ]
}

Parameters

Authorization
String
required
ParameterTypeRequiredDescription
dataStringInput text
formatFormatOutput scheme

Types

Format

The maximum number of parameters of the scheme is 50.

Format must be a JSON object where the expected data type is indicated in objects.

And for the internal structure of format (each property inside format):

PropertyTypeRequiredDescription
type"string" | "number" | "boolean" | "array" | "object"Data type of the property
itemsJsonSchemaPropertySchema for array items (if type is "array")
propertiesRecord<string, JsonSchemaProperty>Schema for nested object properties (if type is "object")
requiredString[]List of required property names
descriptionStringDescription of the property
formatStringData format hint (e.g., date-time, email)
enumUnknown[]Allowed values
minimumNumberMinimum numeric value
maximumNumberMaximum numeric value
minLengthNumberMinimum string length
maxLengthNumberMaximum string length
patternStringRegex pattern string