apyhub
Back

Text Entity & Date Extraction API

What it does

Text Entity & Date Extraction API pulls structured facts out of free text. Send a sentence or passage as the text query parameter and get back JSON listing every named entity or date mention found, each with its exact character position in the input.

Extract Entities takes text and returns an entities array; each item carries the matched value, its type (such as person, location, or organization), an image URL where one is available, and start_position/end_position offsets. Extract Dates takes text and returns a dates array; each item carries the matched date string, a normalized_date timestamp, a tag, and start_position/end_position offsets.

Text Entity & Date Extraction API is a good fit when you need to tag people, places, and organizations in articles, turn natural-language dates in emails or notes into machine-readable values, or highlight extracted spans directly in a UI.

▣ ENDPOINT 01 / 02
GET
Extract Entities API
https://api.eu.apyhub.com/skycraft/text-entity-date-extraction/extract-entities

QUICKSTART

GUIDE

Quickstart

Find entities in a piece of text by passing the text as a query parameter.

curl -X GET "https://api.eu.apyhub.com/skycraft/text-entity-date-extraction/extract-entities?text=Jim%20Carrey%20is%20an%20actor%20from%20Canada" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with an entities array. Each entity is an object with type, image, value, end_position, and start_position fields.

{
  "entities": [
    {
      "type": "PER",
      "value": "Jim Carrey",
      "start_position": 0,
      "end_position": 10,
      "image": "https://upload.wikimedia.org/wikipedia/commons/8/8b/Jim_Carrey_2008.jpg"
    },
    {
      "type": "LOC",
      "value": "Canada",
      "start_position": 28,
      "end_position": 34,
      "image": null
    }
  ]
}
TRY ITLIVE · 20 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Extracts named entities from the provided text and identifies their type, such as people, locations, and organizations.

Query Parameter(s)

AttributeTypeDescription
textStringThe text from which entities should be extracted. Maximum length: 2,000 characters for Latin-script text (about 800 for other scripts, because the text is sent in the URL).

Response

Returns a JSON object containing an entities array. Each entity includes its type, extracted value, position in the original text, and an optional image.

ParameterTypeDescription
entitiesObject ArrayList of entities extracted from the provided text.
entities[].typeStringType of the extracted entity, such as PER for a person or LOC for a location.
entities[].valueStringThe text identified as an entity.
entities[].start_positionIntegerStarting character position of the entity in the input text.
entities[].end_positionIntegerEnding character position of the entity in the input text.
entities[].imageStringImage URL associated with the entity, if available.
▣ ENDPOINT 02 / 02
GET
Extract Dates API
https://api.eu.apyhub.com/skycraft/text-entity-date-extraction/extract-dates

QUICKSTART

GUIDE

Quickstart

Send the text to scan in the query string to extract any dates it contains.

curl -X GET "https://api.eu.apyhub.com/skycraft/text-entity-date-extraction/extract-dates?text=On%205th%20of%20April%2C%202035%20there%20will%20be%20flying%20cars%20-%202023-02-12." \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a dates array. Each item in dates is an object with tag, date, end_position, start_position, and normalized_date fields describing each detected date.

{
  "dates": [
    {
      "tag": "DATETIME",
      "date": "2023-02-12",
      "end_position": 60,
      "start_position": 50,
      "normalized_date": 1676160000000
    }
  ]
}
TRY ITLIVE · 20 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Extracts date mentions from the input text and returns them in a JSON object. The response contains a dates array with one object per extracted date span.

Query Parameter(s)

AttributeTypeDescription
textStringText to analyze for date extraction. Maximum length: 2,000 characters for Latin-script text (about 800 for other scripts, because the text is sent in the URL).

Response

Returns a JSON object with a dates array field. Each item in dates is an object describing one extracted date occurrence.

ParameterTypeDescription
datesObject ArrayArray of extracted date objects.
dates[].tagStringExtracted date tag; nullable.
dates[].dateStringThe date text; nullable.
dates[].end_positionIntegerEnd position of the extracted span.
dates[].start_positionIntegerStart position of the extracted span.
dates[].normalized_dateNumberNormalized date value.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.