Download Markdown

Read Transcripts, OCR & Facts

Besides the body, a document may have subtitles, text recognized in images, product specs, and structured fields such as price or company. By the end of this page you can read all of them.

Read subtitles, OCR and specs

These are called parts:

Bash
curl -sS "$WHALE_BASE_URL/v1/documents/$DOCUMENT_ID/parts?limit=500" \
  -H "Authorization: Bearer $WHALE_API_KEY"
JSON
{
  "parts": [
    {
      "id": "part_01J...",
      "part_type": "transcript_segment",
      "format": "plain",
      "language": "en",
      "text": "segment text",
      "start_ms": 12000,
      "end_ms": 15800,
      "sequence": 4
    }
  ]
}
part_typeContent
transcriptFull subtitles or transcript
transcript_segmentOne timed subtitle segment, with start_ms and end_ms
ocrText recognized in an image
specProduct specifications
chapterA chapter
commentAn attached comment
  • format: plain, srt, vtt or json.
  • Add ?version_id= for a specific version’s parts.
  • Parts with only a file and no text (such as an OCR source image) have no text.
  • Up to 500, no pagination.

Read structured fields

Fields such as price, company and location are called facts:

Bash
curl -sS "$WHALE_BASE_URL/v1/documents/$DOCUMENT_ID/facts?limit=500" \
  -H "Authorization: Bearer $WHALE_API_KEY"
JSON
{
  "facts": [
    {
      "id": "fact_01J...",
      "fact_type": "price",
      "name": "price",
      "value_number": 199.0,
      "unit": "USD",
      "confidence": 0.95,
      "source": "extractor",
      "observed_at": "2026-09-01T08:05:00Z"
    }
  ]
}
  • fact_type: price, company, location, skill, salary_range, category or custom.
  • The value is in exactly one of value_string, value_number, value_bool and value_time.
  • source says where it came from: extractor (automatic), collector (provided at collection) or platform.
  • Platforms provide different fields. A missing field doesn’t mean the value is 0.
  • You can’t search or aggregate by facts yet; process them after reading.

Read categories

External categories are facts with fact_type category; the code is in metadata.label_code.

To look up the category dictionary or filter by category, see browse.

Topics, native platform tags and author profiles aren’t facts. They live in document.metadata as topics, tags and author, each needing its field access.

Read in batch

When reading documents in batch, add "include_parts": true or "include_facts": true. Each document returns up to 20 parts and 50 facts by default; adjust with parts_limit and facts_limit.

When something fails

See Error codes.