v1

latestOpenAPI 3.0.2GNU AGPLv32026-07-245983524.8 KB
Text

Texts (v3)

The most up-to-date way to retrieve texts from Sefaria via the API, with enhanced control over language, language direction, and other parameters.

get/api/v3/texts/{tref}

Response

Successful retrieval of the desired texts.

refstring

A string representing a citation to a Jewish text.

A valid Ref consists of a title string followed optionally by a section string or a segment string.

A title string is any one of the known text titles or title variants in the Sefaria Database.

heRefstring

Hebrew Ref for the segment.

sectionRefstring

A string representing a citation to a Jewish text.

A valid Ref consists of a title string followed optionally by a section string or a segment string.

A title string is any one of the known text titles or title variants in the Sefaria Database.

heSectionRefstring
firstAvailableSectionRefstring
isSpanningboolean
nextstring

Next segment reference in sequence, if last ref, field will be null.

prevstring

Previous segment reference in sequence, if first ref, field will be null.

titlestring

The title of the book these versions correspond to.

bookstring

The title of the book that the response comes from.

heTitlestring
primary_categorystring
typestring
indexTitlestring

The book title

categoriesstring[]

A list of categories that a text belongs to.

heIndexTitlestring
isComplexboolean

Whether or not the text is a "complex" text or not.

In Sefaria, a complex text is any text which has a more complicated index structure beyond Chapters/Verses, (e.g. the Talmud). There are a variety of structural differences for a complex text, having to do primarily with its Index, and the way the data is stored. For more on complex texts, see the documentation here.

isDependantboolean
orderinteger[]
collectiveTitlestring

A shortened name of the Index for display in the connection panel (i.e. Rashi on Genesis will have a collective title of Rashi)

heCollectiveTitlestring

A Hebrew shortened name of the Index for display in the connection panel (i.e. רש״י על בראשית will have a collective title of רש״י)

lengthsinteger[]
lengthinteger
textDepthinteger

The depth of the text. For example, Genesis will have depth of 2, since it is comprised of two layers, chapters and verses. Whereas a commentary on Genesis will have a depth of 3, since it is organized by chapter, verse, and then specific comment on a verse.

sectionNamesstring[]

An array containing the type names of the sections of this text. The length of sectionNames gives the depth of the structure of this text. For example, Kohelet (["Chapter", "Verse"]) has depth 2, while Mishneh Torah (["Book", "Topic", "Section", "Law"]) has depth 4. Comparing this depth to the depth of sections will show if the request was for the lowest level, or a higher level, of the text.

addressTypesstring[]

A list which length reflects the depth of the text structure, with string values indicating class names for address types for each level

titleVariantsstring[]

Various alternative titles used for the text.

heTitleVariantsstring[]
index_offsets_by_depthobject

Example response

{
  "versions": [
    {
      "status": "locked",
      "priority": 2,
      "license": "CC-BY-SA",
      "versionNotes": "<i>Miqra According to the Masorah</i> (MAM) is a digital Hebrew edition of the Tanakh based on the Aleppo Codex and related manuscripts. It is designed for readers, and as such it contains added elements to aid vocalization of the text. For instance: When an accent is marked in an unstressed syllable, an extra accent is added in the proper place (<i>pashta</i>, <i>zarqa</i>, <i>segol</i>, <i>telisha</i>). <i>Legarmeih</i> and <i>paseq</i> are visibly distinguished. <i>Qamaz qatan</i> is indicated by its designated Unicode character (alternatives are documented where traditions differ about its application).<br>The text of MAM is fully documented. The <a href=\"https://he.wikisource.org/wiki/%D7%9E%D7%A9%D7%AA%D7%9E%D7%A9:Dovi/%D7%9E%D7%A7%D7%A8%D7%90_%D7%A2%D7%9C_%D7%A4%D7%99_%D7%94%D7%9E%D7%A1%D7%95%D7%A8%D7%94/%D7%9E%D7%99%D7%93%D7%A2_%D7%A2%D7%9C_%D7%9E%D7%94%D7%93%D7%95%D7%A8%D7%94_%D7%96%D7%95\">complete introduction</a> to the edition (Hebrew) explains the types of editorial decisions that have been made and the reasons for them (<a href=\"https://en.wikisource.org/wiki/User:Dovi/Miqra_according_to_the_Masorah#About_this_Edition_(English_Abstract)\">English abstract</a>). In addition, every word in the Bible about which there is some textual concern or ambiguity includes a documentation note; these notes can be viewed conveniently <a href=\"https://bdenckla.github.io/MAM-with-doc/\">here</a>. If an error is discovered, it may be reported to <a href=\"https://he.wikisource.org/wiki/%D7%A9%D7%99%D7%97%D7%AA_%D7%9E%D7%A9%D7%AA%D7%9E%D7%A9:Dovi\">User:Dovi</a> at Hebrew Wikisource. Please check the documentation notes before reporting an error.",
      "formatAsPoetry": "",
      "digitizedBySefaria": "",
      "method": "",
      "heversionSource": "",
      "versionUrl": "",
      "versionTitleInHebrew": "מקרא על פי המסורה",
      "versionNotesInHebrew": "",
      "shortVersionTitle": "",
      "shortVersionTitleInHebrew": "",
      "extendedNotes": "",
      "extendedNotesHebrew": "",
      "purchaseInformationImage": "",
      "purchaseInformationURL": "",
      "hasManuallyWrappedRefs": "",
      "actualLanguage": "he",
      "languageFamilyName": "hebrew",
      "isSource": true,
      "isPrimary": true,
      "direction": "rtl",
      "language": "he",
      "versionSource": "https://he.wikisource.org/wiki/%D7%9E%D7%A9%D7%AA%D7%9E%D7%A9:Dovi/%D7%9E%D7%A7%D7%A8%D7%90_%D7%A2%D7%9C_%D7%A4%D7%99_%D7%94%D7%9E%D7%A1%D7%95%D7%A8%D7%94",
      "versionTitle": "Miqra according to the Masorah",
      "text": [],
      "firstSectionRef": "Obadiah 1"
    }
  ],
  "available_versions": [],
  "ref": "Obadiah",
  "heRef": "עובדיה",
  "sections": [],
  "toSections": [],
  "sectionRef": "Obadiah",
  "heSectionRef": "עובדיה",
  "firstAvailableSectionRef": "Obadiah 1",
  "isSpanning": false,
  "spanningRefs": [],
  "next": "Obadiah 1",
  "prev": "Obadiah 1",
  "title": "Obadiah",
  "book": "Obadiah",
  "heTitle": "עובדיה",
  "primary_category": "Tanakh",
  "type": "Tanakh",
  "indexTitle": "Obadiah",
  "categories": [
    "Tanakh",
    "Prophets"
  ],
  "heIndexTitle": "עובדיה",
  "isComplex": false,
  "isDependant": false,
  "order": [
    18,
    13
  ],
  "collectiveTitle": "",
  "heCollectiveTitle": "",
  "alts": [],
  "lengths": [
    1,
    21
  ],
  "length": 1,
  "textDepth": 2,
  "sectionNames": [
    "Chapter",
    "Verse"
  ],
  "addressTypes": [
    "Perek",
    "Pasuk"
  ],
  "titleVariants": [
    "Ovadiah",
    "Ob.",
    "Oba.",
    "Ovadyah",
    "Ovadia",
    "Ovadya",
    "Abdias",
    "Obad",
    "Obadiah"
  ],
  "heTitleVariants": [
    "עובדיה"
  ],
  "index_offsets_by_depth": {},
  "warnings": []
}
All 59 operations