Sefaria API
Free Sefaria API with no key: Hebrew and English texts of the Tanakh, Talmud, Mishnah and commentaries, with version metadata, licensing and interlinked references. Tested example included.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the Sefaria API?
The Sefaria API is a free, key-free interface to the largest open digital library of Jewish texts. It returns the Tanakh, Talmud, Mishnah, Midrash and centuries of commentary in Hebrew and English, addressed by canonical references such as `Genesis.1.1`, with full version and licensing metadata.
Sefaria's achievement is not just digitising these texts but structuring them. Every passage has a canonical reference, and the library is densely interlinked — a verse in Genesis connects to the Talmudic passages that discuss it, the medieval commentaries that gloss it and the later works that cite it. The API exposes that link graph, which is what makes it far more than a text dump.
The v3 endpoint's most important characteristic is that it returns an array of `versions` rather than a single text. A passage may exist in several editions — different manuscripts, different translations, different vocalisations — each with its own `license`, `versionNotes` and `priority`. That matters practically: some versions are public domain, others are CC BY-SA, and picking the wrong one has licensing consequences. Read the `license` field before you display or redistribute anything.
Quick facts
- Base URL
https://www.sefaria.org/api- Authentication
- No API key or account. Sefaria asks for attribution and a link back; individual texts carry their own licences, stated per version in the response.
- Rate limit
- No hard published limit. Sefaria asks that bulk consumers use their downloadable data exports rather than crawling the API.
- Pricing
- Free. Sefaria is a non-profit; most texts are public domain or CC BY / CC BY-SA.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Sefaria API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Fetch Genesis 1:1 with all available versions
GET https://www.sefaria.org/api/v3/texts/Genesis.1.1
curl 'https://www.sefaria.org/api/v3/texts/Genesis.1.1'const res = await fetch("https://www.sefaria.org/api/v3/texts/Genesis.1.1");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://www.sefaria.org/api/v3/texts/Genesis.1.1", timeout=20)
res.raise_for_status()
print(res.json()){
"versions": [
{
"status": "locked",
"priority": 2.0,
"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 hParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tref | path segment | Required | A canonical Sefaria reference: book, chapter and verse joined by dots. Genesis.1.1 |
version | query | Optional | Request a specific version by language and title, for example `hebrew` or `english`. Defaults to returning several. english |
return_format | query | Optional | `default` keeps the source HTML markup; `text_only` strips it to plain text. text_only |
fill_in_missing_segments | query | Optional | Pull segments from another version when the primary one has gaps. 1 |
(links) | path segment | Optional | The `/links/{tref}` endpoint returns every connected passage — commentaries, quotations and cross-references. |
Response fields
versionsarray- All available editions of the passage. This is an array, not a single text — you must choose which version to display.
versions[].textstring or array- The passage itself. It contains HTML markup for vowel points, footnotes and formatting unless you set `return_format=text_only`.
versions[].licensestring- Licence for that specific edition, such as `CC-BY-SA` or `Public Domain`. Different versions of the same verse carry different licences — check before redistributing.
versions[].versionTitle / versionNotesstring- Which edition this is and editorial notes about it, including manuscript basis and vocalisation choices.
versions[].prioritynumber- Sefaria's own ranking of which version to prefer when showing just one.
versions[].statusstring- `locked` means the text is final and will not be edited further.
What you can build with the Sefaria API
- Build a Torah or Talmud study app with parallel Hebrew and English
- Show daily study cycle passages such as Daf Yomi or the weekly parashah
- Explore commentary connections through the links endpoint
- Research citation networks across centuries of rabbinic literature
Common errors and how to fix them
404
The reference could not be parsed.
Fix: References use dots between components and Sefaria's own book spellings: `Genesis.1.1`, `Berakhot.2a`. The `/name/{text}` endpoint resolves a human-typed string into a valid reference.
HTML tags in the text
Not an error — Sefaria stores markup for vowels, footnotes and emphasis.
Fix: Pass `return_format=text_only` for plain text, or sanitise and render the HTML deliberately.
Empty versions array
The passage exists but has no digitised version in the requested language.
Fix: Drop the `version` filter to see everything available, then choose.
Sefaria API — frequently asked questions
Is the Sefaria API free?
Yes, free with no API key. Sefaria is a non-profit and asks for attribution and a link back. Individual texts carry their own licences, which the API states per version.
Why does one verse return several versions?
Because a passage often exists in several editions — different manuscripts, translations and vocalisations. Each carries its own licence, editorial notes and priority ranking, so the API hands you the choice rather than making it for you.
How do I get plain text without HTML?
Pass `return_format=text_only`. By default Sefaria returns the stored markup, which encodes vowel points, footnotes and emphasis that would be lost in a naive strip.
How do I find commentaries on a verse?
Use the links endpoint with the same reference. It returns every connected passage — commentaries, quotations and cross-references — which is the interlinking that makes Sefaria more than a digitised text collection.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Strip HTML Tags
Remove all HTML tags and convert markup to clean plain text. Decode HTML entities and keep line breaks for block elements like paragraphs and headings.
Word Counter
Count words, characters, sentences, paragraphs and estimated reading time instantly. Free online word counter for essays, blogs and social media.
Sefaria is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.