Ref
Validates a text reference (tref) and returns structured metadata about it.
The response varies based on the node_type of the referenced text:
- JaggedArrayNode: Standard text nodes (e.g. biblical chapters/verses, Talmud pages). Returns depth, address_types, section_names, and positional indexes/labels.
- SchemaNode: Nodes with named children (e.g. a commentary with an introduction and main text). Returns children list.
- DictionaryEntryNode: Individual dictionary entries. Returns lexicon_name and headword, plus the JaggedArrayNode fields.
- DictionaryNode: Dictionary root nodes. Returns lexicon_name.
- SheetNode: User-created source sheets. Returns sheet_id.
If the node has a default child (a child node that represents the primary content), the response includes a default_child_node object with the child's node_type, node_index, and optionally depth, address_types and sectionNames (for JaggedArrayNode children) or lexicon_name (for DictionaryNode parents).
All types include navigation_refs with shortest_path_to_root (array of ancestor refs from immediate parent to book level) and first_available_section_ref. Segment-level refs also get prev_segment_ref/next_segment_ref, and section-level refs get prev_section_ref/next_section_ref.
Response
Returns reference metadata. If the reference string is invalid, returns {"is_ref": false} with HTTP 200.
Example response
{
"is_ref": true,
"normalized": "Genesis 1:1",
"hebrew": "בראשית א׳:א׳",
"url_ref": "Genesis.1.1",
"index_title": "Genesis",
"node_type": "JaggedArrayNode",
"navigation_refs": {
"shortest_path_to_root": [
"Genesis",
"Genesis 1"
],
"first_available_section_ref": "Genesis 1",
"prev_segment_ref": null,
"next_segment_ref": "Genesis 1:2"
},
"depth": 2,
"address_types": [
"Perek",
"Pasuk"
],
"section_names": [
"Chapter",
"Verse"
],
"start_indexes": [
1,
1
],
"start_labels": [
"1",
"1"
],
"end_indexes": [
1,
1
],
"end_labels": [
"1",
"1"
]
}