v1

latestOpenAPI 3.0.2GNU AGPLv32026-07-245983524.8 KB
Text

Texts (v1)

Retrieve the text and some additional metadata for a specific Sefaria textual Ref

get/api/texts/{tref}

Path parameters

trefstring required

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.

Example:Mishnah Peah 4:2

A valid textual Ref to a Sefaria text.

Query parameters

callbackstring
context'0' | '1'

The context param defaults to 1, which allows for the API to return the entire context for the desired segment. When you explicitly set context=0, only the desired segment is returned, without any of the accompanying context.

commentaryinteger

The commentary param defaults to 0, which turns off commentary being returned in the response. When you explicitly set commentary=1, all commentary to that specific connection is returned in a list of JSON objects containing the text of the commentaries

pad'0' | '1'

By default pad is set to 1, which ensures that any references at the title level will return only the first section of a book instead of its entirety. If you want the API to return the entire content of the book, set pad to 0

venstring

Unless explicitly specified, the Texts API returns a default version of a text with Roman characters as the content in the text response. Passing a specific versionTitle here will load that text version if it exists instead of the default.

firstAvailableRef'0' | '1'

If a given text reference doesn't return any content, setting this to 1 will return the first reference that does.

Sometimes this occurs when a text reference may pass our ref checking logic, but doesn't exist; for example https://www.sefaria.org/api/texts/Berakhot 1a?firstAvailableRef=1, and sometimes this occurs when a translation is incomplete. Defaults to 0.

vhestring

Unless explicitly specified, the Texts API returns a default version of a text with Hebrew characters as the content in the he response. Passing a specific versionTitle here will load that text version if it exists instead of the default.

layerstring
alts'0' | '1'

Returns the alt structures for the target text in the JSON response object.

wrapLinks'0' | '1'
stripItags'0' | '1'

Sefaria texts include footnotes and other iTags in the response. This param defaults to 0 which leaves them in. Changing it to 1 will remove them.

multiple'0' | '1'

If the absolute value of this param is greater than 1, the API will return|n| text responses which include |n|-1 additional consecutive sections of the targeted text if they exist. If the integer is positive, it will return the next consecutive chapter[s], and if negative it will return the previous consecutive chapter[s].

transLangPrefstring

Unless explicitly specified, the Texts API returns a default version for the he and text responses (usually in Hebrew & English respectfully). Passing an ISO 639-1 language code here will prioritize text versions in that target language if available.

fallbackOnDefaultVersion'0' | '1'
sheets'0' | '1'

The sheets param defaults to 0, which turns off user-generated Sefaria Sheet data from being returned in the response. When you explicitly set sheets=1, all of the user-generated sheet content to that specific connection is returned in list of JSON objects.

This usage is deprecated. Instead of this, you should use the Related API.

Response

Successful response

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

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.

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.

textDepthinteger
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

lengthsinteger[]
lengthinteger
heTitlestring
titleVariantsstring[]
heTitleVariantsstring[]
typestring
primary_categorystring
bookstring

The title of the book that the response comes from.

categoriesstring[]

A list of categories that a text belongs to.

orderinteger[]
sectionsinteger[]

An array which corresponds to sectionNames and represents the sections of the text requested. When sectionNames is ["Chapter", "Verse"] a request for chapter 4 looks like [4] while a request for chapter 4, verse 7 would look like [4, 7]. Note, for Talmud, Dafs are represented by a string like "42a" or "12b"

toSectionsinteger[]
isDependantboolean
indexTitlestring
heIndexTitlestring
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.

firstAvailableSectionRefstring
heSectionRefstring

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.

isSpanningboolean
versionTitlestring
versionTitleInHebrewstring
shortVersionTitlestring
shortVersionTitleInHebrewstring
versionSourcestring
versionStatusstring
versionNotesstring
extendedNotesstring
extendedNotesHebrewstring
versionNotesInHebrewstring
licensestring
heVersionTitlestring
heVersionTitleInHebrewstring
heShortVersionTitlestring
heShortVersionTitleInHebrewstring
heVersionSourcestring
heVersionStatusstring
heVersionNotesstring
heExtendedNotesstring
heExtendedNotesHebrewstring
heVersionNotesInHebrewstring
heLicensestring
index_offsets_by_depthobject
nextstring nullable

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

prevstring nullable

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

Example response

{
  "ref": "Mishnah Peah 4:2",
  "heRef": "משנה פאה ד׳:ב׳",
  "isComplex": false,
  "text": [
    "Peah is given from [the crop] while it is still connected with the soil. But in the case of hanging vine-branches and the date-palm, the owner brings down [the fruit] and distributes it among the poor. Rabbi Shimon says: the same applies to smooth nut trees. Even if ninety-nine [of the poor] say [to the owner] to distribute it and one says to leave it in the field, this latter is listened to, since he spoke in accordance with the halakhah.",
    "With hanging vine-branches and date-palm trees it is not so; even if ninety-nine [of the poor] say [to the owner] to leave it in the field and one says to distribute it, this latter is listened to, since he spoke in accordance with the halakhah.",
    "If [a poor man] took some of the peah [already collected] and threw it onto the remainder [not yet collected], he gets none of it. If he fell down upon it, or spread his cloak over it, they take the peah away from him. The same applies to gleanings and the forgotten sheaf.",
    "[The poor] may not harvest peah with scythes or tear it out [of the ground] with spades, so that they might not strike one another [with these implements].",
    "There are three times a day [the poor] make a search [in the field for peah]: morning, noon, and sunset. Rabban Gamaliel says: these [times] were only set lest they reduce them. Rabbi Akiva says: these were set lest they add to them. [The men] of Bet Namer used to have the poor harvest [the peah] with the aid of a rope, and they left peah at the end of each furrow.",
    "A non-Jew who harvested his field and then converted, he is exempt from [leaving] gleanings, the forgotten sheaf and peah. Rabbi Judah makes him liable to leave the forgotten sheaf, since he becomes liable for the forgotten sheaf at the time of their binding.",
    "One who dedicated standing grain [to the Temple] and then redeemed it while it was still standing grain, he is liable [to give the agricultural gifts to the poor]. [If he dedicated] sheaves and redeemed them while they were still sheaves, he is liable. [If he dedicated] standing grain and redeemed it [when it was already in] sheaves, he is exempt, since at the time when it became liable it was exempt.",
    "Similarly one who dedicates his produce prior to the stage when they are subject to tithes and then redeemed them, they are liable [to be tithed]. If [he dedicated them] when they had already become subject to tithes and then redeemed them, they are liable [to be tithed]. If he dedicated them before they had ripened, and they became ripe while in the possession of the [Temple] treasurer, and he then redeemed them, they are exempt, since at the time when they would have been liable, they were exempt.",
    "One who collected peah and said, “This is for so-and-so a poor man:” Rabbi Eliezer says: he has thus acquired it for him. The sages say: he must give it to the first poor man he finds. Gleanings, the forgotten sheaf and the peah of non-Jews are subject to tithes, unless he [the non-Jew] had declared them ownerless.",
    "What are gleanings? That which falls down at the time of harvesting. If while he was harvesting, he harvested a handful, or plucked a fistful, and then a thorn pricked him, and what he had in his hand fell to the ground, it still belongs to the owner. [That which drops from] inside the hand or the sickle [belongs] to the poor, but [that which falls from] the back of the hand or the sickle [belongs] to the owner. [That which falls from] the top of the hand or sickle: Rabbi Ishmael says: to the poor; But Rabbi Akiva says: to the owner.",
    "[Grain found in] ant holes where the stalks are still standing, behold it still belongs to the owner. After the harvesters [had passed over them], those found in the top parts [of the ant holes belong] to the poor, but [those found] on the bottom parts [belong] to the owner. Rabbi Meir says: it all belongs to the poor, for gleanings about which there is any doubt are regarded as gleanings."
  ],
  "he": [
    "הַפֵּאָה נִתֶּנֶת בִּמְחֻבָּר לַקַּרְקָע. בְּדָלִית וּבְדֶקֶל, בַּעַל הַבַּיִת מוֹרִיד וּמְחַלֵּק לָעֲנִיִּים. רַבִּי שִׁמְעוֹן אוֹמֵר, אַף בַּחֲלִיקֵי אֱגוֹזִים. אֲפִלּוּ תִשְׁעִים וְתִשְׁעָה אוֹמְרִים לְחַלֵּק וְאֶחָד אוֹמֵר לָבוֹז, לָזֶה שׁוֹמְעִין, שֶׁאָמַר כַּהֲלָכָה: \n",
    "בְּדָלִית וּבְדֶקֶל אֵינוֹ כֵן, אֲפִלּוּ תִשְׁעִים וְתִשְׁעָה אוֹמְרִים לָבוֹז וְאֶחָד אוֹמֵר לְחַלֵּק, לָזֶה שׁוֹמְעִין, שֶׁאָמַר כַּהֲלָכָה: \n",
    "נָטַל מִקְצָת פֵּאָה וּזְרָקָהּ עַל הַשְּׁאָר, אֵין לוֹ בָהּ כְּלוּם. נָפַל לוֹ עָלֶיהָ, וּפֵרֵשׂ טַלִּיתוֹ עָלֶיהָ, מַעֲבִירִין אוֹתָהּ הֵימֶנּוּ. וְכֵן בְּלֶקֶט, וְכֵן בְּעֹמֶר הַשִּׁכְחָה: \n",
    "פֵּאָה אֵין קוֹצְרִין אוֹתָהּ בְּמַגָּלוֹת, וְאֵין עוֹקְרִין אוֹתָהּ בְּקַרְדֻּמּוֹת, כְּדֵי שֶׁלֹּא יַכּוּ אִישׁ אֶת רֵעֵהוּ: \n",
    "שָׁלשׁ אַבְעָיוֹת בַּיּוֹם, בַּשַּׁחַר וּבַחֲצוֹת וּבַמִּנְחָה. רַבָּן גַּמְלִיאֵל אוֹמֵר, לֹא אָמְרוּ אֶלָּא כְּדֵי שֶׁלֹּא יִפְחֲתוּ. רַבִּי עֲקִיבָא אוֹמֵר, לֹא אָמְרוּ אֶלָּא כְּדֵי שֶׁלֹּא יוֹסִיפוּ. שֶׁל בֵּית נָמֵר הָיוּ מְלַקְּטִין עַל הַחֶבֶל, וְנוֹתְנִים פֵּאָה מִכָּל אֻמָּן וְאֻמָּן: \n",
    "עוֹבֵד כּוֹכָבִים שֶׁקָּצַר אֶת שָׂדֵהוּ וְאַחַר כָּךְ נִתְגַּיֵּר, פָּטוּר מִן הַלֶּקֶט וּמִן הַשִּׁכְחָה וּמִן הַפֵּאָה. רַבִּי יְהוּדָה מְחַיֵּב בְּשִׁכְחָה, שֶׁאֵין הַשִּׁכְחָה אֶלָּא בִשְׁעַת הָעִמּוּר: \n",
    "הִקְדִּישׁ קָמָה וּפָדָה קָמָה, חַיָּב. עֳמָרִין וּפָדָה עֳמָרִין, חַיָּב. קָמָה וּפָדָה עֳמָרִין, פְּטוּרָה, שֶׁבִּשְׁעַת חוֹבָתָהּ הָיְתָה פְטוּרָה: \n",
    "כַּיּוֹצֵא בוֹ, הַמַּקְדִּישׁ פֵּרוֹתָיו עַד שֶׁלֹּא בָאוּ לְעוֹנַת הַמַּעַשְׂרוֹת, וּפְדָאָן, חַיָּבִין. מִשֶּׁבָּאוּ לְעוֹנַת הַמַּעַשְׂרוֹת, וּפְדָאָן, חַיָּבִין. הִקְדִּישָׁן עַד שֶׁלֹּא נִגְמְרוּ וּגְמָרָן הַגִּזְבָּר, וְאַחַר כָּךְ פְּדָאָן, פְּטוּרִים, שֶׁבִּשְׁעַת חוֹבָתָן הָיוּ פְטוּרִים: \n",
    "מִי שֶׁלָּקַט אֶת הַפֵּאָה וְאָמַר הֲרֵי זוֹ לְאִישׁ פְּלוֹנִי עָנִי, רַבִּי אֱלִיעֶזֶר אוֹמֵר, זָכָה לוֹ. וַחֲכָמִים אוֹמְרִים, יִתְּנֶנָּה לֶעָנִי שֶׁנִּמְצָא רִאשׁוֹן. הַלֶּקֶט וְהַשִּׁכְחָה וְהַפֵּאָה שֶׁל עוֹבֵד כּוֹכָבִים חַיָּב בְּמַעַשְׂרוֹת, אֶלָּא אִם כֵּן הִפְקִיר: \n",
    "אֵיזֶהוּ לֶקֶט, הַנּוֹשֵׁר בִּשְׁעַת הַקְּצִירָה. הָיָה קוֹצֵר, קָצַר מְלֹא יָדוֹ, תָּלַשׁ מְלֹא קֻמְצוֹ, הִכָּהוּ קוֹץ וְנָפַל מִיָּדוֹ לָאָרֶץ, הֲרֵי הוּא שֶׁל בַּעַל הַבָּיִת. תּוֹךְ הַיָּד וְתוֹךְ הַמַּגָּל, לָעֲנִיִּים. אַחַר הַיָּד וְאַחַר הַמַּגָּל, לְבַעַל הַבָּיִת. רֹאשׁ הַיָּד וְרֹאשׁ הַמַּגָּל, רַבִּי יִשְׁמָעֵאל אוֹמֵר, לָעֲנִיִּים. רַבִּי עֲקִיבָא אוֹמֵר, לְבַעַל הַבָּיִת: \n",
    "חוֹרֵי הַנְּמָלִים שֶׁבְּתוֹךְ הַקָּמָה, הֲרֵי הֵן שֶׁל בַּעַל הַבָּיִת. שֶׁלְּאַחַר הַקּוֹצְרִים, הָעֶלְיוֹנִים לָעֲנִיִּים, וְהַתַּחְתּוֹנִים שֶׁל בַּעַל הַבָּיִת. רַבִּי מֵאִיר אוֹמֵר, הַכֹּל לָעֲנִיִּים, שֶׁסְּפֵק לֶקֶט, לֶקֶט: \n"
  ],
  "versions": [
    {
      "title": "Mishnah Peah",
      "versionTitle": "Torat Emet 357",
      "versionSource": "http://www.toratemetfreeware.com/index.html?downloads",
      "language": "he",
      "status": "locked",
      "license": "Public Domain",
      "versionNotes": "",
      "digitizedBySefaria": "",
      "priority": 3,
      "versionTitleInHebrew": "תורת אמת 357",
      "versionNotesInHebrew": "",
      "extendedNotes": "",
      "extendedNotesHebrew": "",
      "purchaseInformationImage": "",
      "purchaseInformationURL": "",
      "shortVersionTitle": "",
      "shortVersionTitleInHebrew": ""
    },
    {
      "title": "Mishnah Peah",
      "versionTitle": "Mishnah, ed. Romm, Vilna 1913",
      "versionSource": "https://www.nli.org.il/he/books/NNL_ALEPH001741739",
      "language": "he",
      "status": "locked",
      "license": "Public Domain",
      "versionNotes": "",
      "digitizedBySefaria": true,
      "priority": 2,
      "versionTitleInHebrew": "משנה, מהדורת בית דפוס ראם, וילנא 1913",
      "versionNotesInHebrew": "",
      "extendedNotes": "",
      "extendedNotesHebrew": "",
      "purchaseInformationImage": "",
      "purchaseInformationURL": "",
      "shortVersionTitle": "",
      "shortVersionTitleInHebrew": ""
    },
    {
      "title": "Mishnah Peah",
      "versionTitle": "Mishnah Yomit by Dr. Joshua Kulp",
      "versionSource": "http://learn.conservativeyeshiva.org/mishnah/",
      "language": "en",
      "status": "locked",
      "license": "CC-BY",
      "versionNotes": "",
      "digitizedBySefaria": "",
      "priority": 1,
      "versionTitleInHebrew": "",
      "versionNotesInHebrew": "",
      "extendedNotes": "",
      "extendedNotesHebrew": "",
      "purchaseInformationImage": "",
      "purchaseInformationURL": "",
      "shortVersionTitle": "Dr. Joshua Kulp",
      "shortVersionTitleInHebrew": ""
    },
    {
      "title": "Mishnah Peah",
      "versionTitle": "Mischnajot mit deutscher Übersetzung und Erklärung. Berlin 1887-1933 [de]",
      "versionSource": "https://www.nli.org.il/he/books/NNL_ALEPH002378149/NLI",
      "language": "en",
      "status": "locked",
      "license": "Public Domain",
      "versionNotes": "Ordnung Seraïm, übers. und erklärt von Ascher Samter. 1887.<br>Ordnung Moed, von Eduard Baneth. 1887-1927.<br>Ordnung Naschim, von Marcus Petuchowski u. Simon Schlesinger. 1896-1933.<br>Ordnung Nesikin, von David Hoffmann. 1893-1898.<br>Ordnung Kodaschim, von John Cohn. 1910-1925.<br>Ordnung Toharot, von David Hoffmann, John Cohn und Moses Auerbach. 1910-1933.",
      "digitizedBySefaria": true,
      "priority": 0.5,
      "versionTitleInHebrew": "",
      "versionNotesInHebrew": "",
      "extendedNotes": "",
      "extendedNotesHebrew": "",
      "purchaseInformationImage": "",
      "purchaseInformationURL": "",
      "shortVersionTitle": "",
      "shortVersionTitleInHebrew": ""
    },
    {
      "title": "Mishnah Peah",
      "versionTitle": "Talmud Bavli. German. Lazarus Goldschmidt. 1929 [de]",
      "versionSource": "https://www.nli.org.il/he/books/NNL_ALEPH001042448/NLI",
      "language": "en",
      "status": "locked",
      "license": "Public Domain",
      "versionNotes": "",
      "digitizedBySefaria": true,
      "priority": 0.25,
      "versionTitleInHebrew": "",
      "versionNotesInHebrew": "",
      "extendedNotes": "",
      "extendedNotesHebrew": "",
      "purchaseInformationImage": "",
      "purchaseInformationURL": "",
      "shortVersionTitle": "Lazarus Goldschmidt, 1929 ",
      "shortVersionTitleInHebrew": ""
    },
    {
      "title": "Mishnah Peah",
      "versionTitle": "Open Mishnah",
      "versionSource": "http://en.wikisource.org/wiki/Mishnah",
      "language": "en",
      "status": "locked",
      "license": "CC-BY-SA",
      "versionNotes": "",
      "digitizedBySefaria": "",
      "priority": "",
      "versionTitleInHebrew": "משנה פתוחה",
      "versionNotesInHebrew": "",
      "extendedNotes": "",
      "extendedNotesHebrew": "",
      "purchaseInformationImage": "",
      "purchaseInformationURL": "",
      "shortVersionTitle": "",
      "shortVersionTitleInHebrew": ""
    },
    {
      "title": "Mishnah Peah",
      "versionTitle": "Le Talmud de Jérusalem, traduit par Moise Schwab, 1878-1890 [fr]",
      "versionSource": "https://www.nli.org.il/he/books/NNL_ALEPH002182155/NLI",
      "language": "en",
      "status": "locked",
      "license": "Public Domain",
      "versionNotes": "",
      "digitizedBySefaria": "",
      "priority": "",
      "versionTitleInHebrew": "",
      "versionNotesInHebrew": "",
      "extendedNotes": "",
      "extendedNotesHebrew": "",
      "purchaseInformationImage": "",
      "purchaseInformationURL": "",
      "shortVersionTitle": "",
      "shortVersionTitleInHebrew": ""
    },
    {
      "title": "Mishnah Peah",
      "versionTitle": "Mishnah based on the Kaufmann manuscript, edited by Dan Be'eri",
      "versionSource": "https://archive.org/details/MishnaCorrectedKaufman00WHOLE",
      "language": "he",
      "status": "locked",
      "license": "PD",
      "versionNotes": "",
      "digitizedBySefaria": true,
      "priority": "",
      "versionTitleInHebrew": "",
      "versionNotesInHebrew": "",
      "extendedNotes": "",
      "extendedNotesHebrew": "",
      "purchaseInformationImage": "",
      "purchaseInformationURL": "",
      "shortVersionTitle": "",
      "shortVersionTitleInHebrew": ""
    }
  ],
  "textDepth": 2,
  "sectionNames": [
    "Chapter",
    "Mishnah"
  ],
  "addressTypes": [
    "Perek",
    "Mishnah"
  ],
  "lengths": [
    8,
    69
  ],
  "length": 8,
  "heTitle": "משנה פאה",
  "titleVariants": [
    "M Peah",
    "Mishna Peah",
    "M. Peah",
    "Mishnah Péah",
    "Pe’ah",
    "Pe'ah",
    "Peah",
    "Mishnah Peah"
  ],
  "heTitleVariants": [
    "פאה",
    "משנה פיאה",
    "משנה פאה"
  ],
  "type": "Mishnah",
  "primary_category": "Mishnah",
  "book": "Mishnah Peah",
  "categories": [
    "Mishnah",
    "Seder Zeraim"
  ],
  "order": [
    2,
    2
  ],
  "sections": [
    4,
    2
  ],
  "toSections": [
    4,
    2
  ],
  "isDependant": false,
  "indexTitle": "Mishnah Peah",
  "heIndexTitle": "משנה פאה",
  "sectionRef": "Mishnah Peah 4",
  "firstAvailableSectionRef": "Mishnah Peah 4:2",
  "heSectionRef": "משנה פאה ד׳",
  "isSpanning": false,
  "versionTitle": "Mishnah Yomit by Dr. Joshua Kulp",
  "versionTitleInHebrew": "",
  "shortVersionTitle": "Dr. Joshua Kulp",
  "shortVersionTitleInHebrew": "",
  "versionSource": "http://learn.conservativeyeshiva.org/mishnah/",
  "versionStatus": "locked",
  "versionNotes": "",
  "extendedNotes": "",
  "extendedNotesHebrew": "",
  "versionNotesInHebrew": "",
  "digitizedBySefaria": false,
  "license": "CC-BY",
  "formatEnAsPoetry": false,
  "heVersionTitle": "Torat Emet 357",
  "heVersionTitleInHebrew": "תורת אמת 357",
  "heShortVersionTitle": "",
  "heShortVersionTitleInHebrew": "",
  "heVersionSource": "http://www.toratemetfreeware.com/index.html?downloads",
  "heVersionStatus": "locked",
  "heVersionNotes": "",
  "heExtendedNotes": "",
  "heExtendedNotesHebrew": "",
  "heVersionNotesInHebrew": "",
  "heDigitizedBySefaria": false,
  "heLicense": "Public Domain",
  "formatHeAsPoetry": false,
  "alts": [],
  "index_offsets_by_depth": {},
  "next": "Mishnah Peah 5",
  "prev": "Mishnah Peah 3",
  "commentary": [],
  "sheets": [],
  "layer": []
}