Texts (v1)

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

Path Params
string
required
Defaults to Kohelet 5:10

A valid textual Ref to a Sefaria text.

Query Params
string
string
enum

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.

Allowed:
integer
0 to 1

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

string
enum

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

Allowed:
string

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.

string
enum

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.

Allowed:
string

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.

string
string
enum

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

Allowed:
string
enum
Allowed:
string
enum

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.

Allowed:
string
enum

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].

Allowed:
string

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.

string
enum
Allowed:
string
enum

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.

Allowed:
Response

Language
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json