Read text API
POST https://read.heimdallapp.org/read/v1/api/process
Before you start
Unstructured API key. For bulk labeled text, use Lake zip ingest.
Request
Headers: X-api-key, X-username
Body JSON: { "text": "..." }
Avoid line breaks and double quotes in text.
Response fields
| Group | Fields |
|---|---|
| Counts | length, word_count, sentence_count, avg_word_length, avg_sentence_length |
| Vocab | oov_ratio, oov_ratio_2 |
| POS | noun_count, verb_count, adjective_count, adverb_count, pronoun_count, stopword_count |
| Terms | tfidf_top1, tfidf_top2, tfidf_top3 |
| Sentiment | sentiment, compound_sentiment_score |
| Quality | line_punct_ratio, short_line_ratio, dup_line_char_frac, top_2gram_char_frac, alpha_ratio, frac_all_caps_words, unigram_entropy, compression_ratio |
| Embedding | emb_00 … emb_63 (64-d; zeros for empty text) |
Example
import requests
url = "https://read.heimdallapp.org/read/v1/api/process"
headers = {"X-api-key": "YOUR-API-KEY", "X-username": "YOUR-USERNAME"}
response = requests.post(url, headers=headers, json={"text": "Short sample sentence."})
print(response.status_code, response.json().get("sentiment"))
422
Wrong body shape or missing headers.