v1

latestOpenAPI 3.0.2GNU AGPLv32026-07-245983524.8 KB
Term

Name

Serves primarily as an autocompleter, returning potential keyword matches for Refs, book titles, authors, topics, and collections available on Sefaria.

get/api/name/{name}

Query parameters

limitinteger

Number of results to return (0 indicates no limit)

type'ref' | 'Collection' | 'Topic' | 'TocCategory' | 'Term' | 'User'

By default the Name API returns Refs, book titles, authors, topics, and collections. If the type is set, the response will only contain items of that type. Note: Topic includes authors, topics and people without differentiation.

Response

Successful response

lang'en' | 'he'

The language of the completion results.

type'ref' | 'Topic' | 'AuthorTopic' | 'PersonTopic' | 'User'
completionsstring[]

A list of autocompletion responses for the submitted text.

is_bookboolean

Returns true if the submitted text is a book level reference. e.g. (Genesis)

is_nodeboolean

Returns true if the submitted text is a node in a complex text. (For example, the query Abarbanel on Torah, Genesis is a node in the index of the complex text Abarbanel on Torah).

is_sectionboolean

Returns true if the submitted text is a section Ref (e.g. Genesis 4, as opposed to a segment Ref such as Genesis 4.1).

is_segmentboolean

Returns true if the submitted text is a segment level Ref (e.g. Genesis 43:3, as opposed to a section Ref such as Genesis 43)

is_rangeboolean

Returns true if the submitted text is a a ranged Ref (one that spans multiple sections or segments.) e.g. Genesis 4-5

refstring

If type=ref, this returns the canonical ref for the submitted text.

urlstring

If type=ref, this returns the URL path to link to the submitted text on Sefaria.org

indexstring

If type=ref, this returns the canonical name of the index of the submitted text.

bookstring

If the submitted response is a Ref, this returns the book it belongs to.

internalSectionsinteger[]
internalToSectionsinteger[]
sectionsstring[]
toSectionsstring[]
sectionNamesstring[]

Given a reference, this returns the names of the sections and segments at each depth of that text.

heSectionNamesstring[]

Given a Ref, this returns the names of the sections and segments at each depth of that text in Hebrew.

addressExamplesstring[]

Given a partial Ref, this will return an array of strings of possible ways that it might be completed.

heAddressExamplesstring[]

Given a partial Ref, this will return an array of Hebrew strings of possible ways that it might be completed.

Example response

{
  "lang": "en",
  "type": "ref",
  "completions": [
    "Job",
    "Rashi on Job",
    "Rashi on Amos",
    "Rashi on Arachin",
    "Rashi on Beiah",
    "Rashi on Bechorot",
    "Rashi on Berachoth",
    "Rashi on Chag.",
    "Rashi on Hullin",
    "Rashi on Dan."
  ],
  "completion_objects": [
    {
      "title": "Job",
      "key": "Job",
      "type": "ref",
      "is_primary": true,
      "order": 1000000
    },
    {
      "title": "Job",
      "type": "Topic",
      "key": "job-and-his-friends",
      "is_primary": false,
      "order": 4999978
    },
    {
      "title": "Rashi on Job",
      "key": "Rashi on Job",
      "type": "ref",
      "is_primary": true,
      "order": 1000000
    },
    {
      "title": "Rashi on Amos",
      "key": "Rashi on Amos",
      "type": "ref",
      "is_primary": true,
      "order": 1000000
    },
    {
      "title": "Rashi on Arachin",
      "key": "Rashi on Arakhin",
      "type": "ref",
      "is_primary": false,
      "order": 1000000
    },
    {
      "title": "Rashi on Beiah",
      "key": "Rashi on Beitzah",
      "type": "ref",
      "is_primary": false,
      "order": 1000000
    },
    {
      "title": "Rashi on Bechorot",
      "key": "Rashi on Bekhorot",
      "type": "ref",
      "is_primary": false,
      "order": 1000000
    },
    {
      "title": "Rashi on Berachoth",
      "key": "Rashi on Berakhot",
      "type": "ref",
      "is_primary": false,
      "order": 1000000
    },
    {
      "title": "Rashi on Chag.",
      "key": "Rashi on Chagigah",
      "type": "ref",
      "is_primary": false,
      "order": 1000000
    },
    {
      "title": "Rashi on Hullin",
      "key": "Rashi on Chullin",
      "type": "ref",
      "is_primary": false,
      "order": 1000000
    },
    {
      "title": "Rashi on Dan.",
      "key": "Rashi on Daniel",
      "type": "ref",
      "is_primary": false,
      "order": 1000000
    }
  ],
  "is_book": false,
  "is_node": false,
  "is_section": false,
  "is_segment": true,
  "is_range": false,
  "ref": "Rashi on Job 1:3:3",
  "url": "Rashi_on_Job.1.3.3",
  "index": "Rashi on Job",
  "book": "Rashi on Job",
  "internalSections": [
    1,
    3,
    3
  ],
  "internalToSections": [
    1,
    3,
    3
  ],
  "sections": [
    "1",
    "3",
    "3"
  ],
  "toSections": [
    "1",
    "3",
    "3"
  ],
  "examples": [],
  "sectionNames": [
    "Chapter",
    "Verse",
    "Comment"
  ],
  "heSectionNames": [
    "פרק",
    "פסוק",
    "פירוש"
  ],
  "addressExamples": [
    "3",
    "6",
    "9"
  ],
  "heAddressExamples": [
    "ג׳",
    "ו׳",
    "ט׳"
  ]
}