v1

latestOpenAPI 3.0.2GNU AGPLv32026-07-245983524.8 KB
Related

Links

Returns a list of known connections for the submitted text ref along with some additional metadata. Category filters apply to the derived category value returned in the API payload, such as Commentary, Midrash, Essay, or Quoting Commentary.

get/api/links/{tref}

Query parameters

with_text'0' | '1'

with_text is an optional parameter that determines whether or not the API response will include the text of any connected links. Defaults to 1

with_sheet_links'0' | '1'

with_sheet_links is an optional parameter that determines whether or not the API response will include links to user generated source sheets from Sefaria. Defaults 0

categorystring

Optional repeatable filter. Only include links whose API response category exactly matches this value. May be passed multiple times, e.g. ?category=Commentary&category=Midrash.

categoriesstring

Optional multi-value category filter. Only include links whose API response category exactly matches one of the provided values. Values may be separated by commas or pipes, e.g. ?categories=Commentary,Midrash or ?categories=Commentary|Midrash.

Response

Successful response

_idstring
index_titlestring

The canonical title of the text in the Sefaria library.

categorystring

The primary category this ref belongs to on Sefaria.

typestring

An arbitrary string assigned to the connection to identify it. Most commonly commentary, reference, or an empty string.

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.

anchorRefstring

The submitted ref in the GET request at times may fall within a more encompassing ranged ref that includes multiple text segments. The anchorRef is that complete range the that the link is associated with, and will contain within it the specific ref that was passed.

anchorRefExpandedstring[]

An array of strings, where each string is a segment level ref of the ref passed in as a parameter. If a segment level ref is passed in, this array will have a length of 1, and only contain that segment level ref. If the ref passed in is ranged, this array will contain each of the segment level refs within that range.

For example, if someone was searching for links for Esther 4.14-15, the anchorRefExpanded would contain Esther 4.14 and Esther 4.15.

sourceRefstring

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.

sourceHeRefstring

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.

anchorVerseinteger
sourceHasEnboolean
compDateinteger[]

The estimated year of completion of the work according to the Gregorian calendar. If its length is zero the completion date is unknown. If its length is one, then the completion date is that single year. If its length is 2 then the date is a potential range with the first int in the array is the lower end of the range and the latter the higher.

commentaryNumnumber double
hestring

The default text written in RTL characters for the query (Usually Hebrew). It is structured as a JaggedArray (nested arrays), with the lowest level being an array of strings with some html text.

heVersionTitlestring

The title of the work in English for where the default he text came from.

heLicensestring

A string of text documenting the license for the text in Hebrew.

heVersionTitleInHebrewstring

The title of the work in Hebrew for where the default he text came from.

versionTitlestring

A descriptive string which describes what version of a text this is. Is it from a particular printing or edition of a book? An online resource? This string should describe it in English

licensestring

A string of text documenting the license for the text in English.

versionTitleInHebrewstring

A descriptive string which describes what version of a text this is. Is it from a particular printing or edition of a book? An online resource? This string should describe it in Hebrew.

Example response

[
  {
    "_id": "578b4ad1d6e4a90d260c2d9a",
    "index_title": "Tosafot Yom Tov on Mishnah Peah",
    "category": "Commentary",
    "type": "commentary",
    "ref": "Tosafot Yom Tov on Mishnah Peah 4:2:1",
    "anchorRef": "Mishnah Peah 4:2",
    "anchorRefExpanded": [
      "Mishnah Peah 4:2"
    ],
    "sourceRef": "Tosafot Yom Tov on Mishnah Peah 4:2:1",
    "sourceHeRef": "תוספות יום טוב על משנה פאה ד׳:ב׳:א׳",
    "anchorVerse": 2,
    "sourceHasEn": false,
    "compDate": [
      1613,
      1617
    ],
    "commentaryNum": 2.0001,
    "collectiveTitle": {
      "en": "Tosafot Yom Tov",
      "he": "תוספות יום טוב"
    },
    "he": "<b>[*ואחד אומר לחלק לזה שומעין וכו'</b>. שאפילו הוא זקן ותש כח או חולה שהרי מה שאמר לחלק מפני חלישותו הוא אפילו הכי שומעין לו כך מצאתי בפירוש הנ\"ל]: \n",
    "heVersionTitle": "Mishnah, ed. Romm, Vilna 1913",
    "heLicense": "Public Domain",
    "heVersionTitleInHebrew": "משנה, מהדורת בית דפוס ראם, וילנא 1913",
    "text": []
  }
]