---
title: "Texts (v1)"
method: GET
path: "/api/texts/{tref}"
tags: ["Text"]
deprecated: true
---

# Texts (v1)

`GET /api/texts/{tref}`

> **Deprecated.**

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

## Path parameters

- `tref` string, 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.

## Query parameters

- `callback` string
- `context` '0' | '1'
- `commentary` integer
- `pad` '0' | '1'
- `ven` string
- `firstAvailableRef` '0' | '1'
- `vhe` string
- `layer` string
- `alts` '0' | '1'
- `wrapLinks` '0' | '1'
- `stripItags` '0' | '1'
- `multiple` '0' | '1'
- `transLangPref` string
- `fallbackOnDefaultVersion` '0' | '1'
- `sheets` '0' | '1'

## Response `200`

Successful response

- TextAPIReponse — Expected reponse data from Sefaria's Text API
  - `ref` string — 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.
  - `heRef` string — 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.
  - `isComplex` boolean — 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.
  - `text` union — The default, or specified text written in LTR characters for the query (Usually English). It is structured as a `JaggedArray` (nested arrays), with the lowest level being an array of strings with some HTML text.
    - string
    - array[]
      - string[]
    - string[]
    - unknown[]
      - unknown
  - `he` union — The default, or specified 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.
    - string[]
    - string
  - `versions` VersionData[]
    - `title` string
    - `versionTitle` string
    - `versionSource` string
    - `language` string
    - `status` string
    - `license` string
    - `versionNotes` string
    - `digitizedBySefaria` string
    - `priority` integer
    - `versionTitleInHebrew` string
    - `versionNotesInHebrew` string
    - `extendedNotes` string
    - `extendedNotesHebrew` string
    - `purchaseInformationImage` string
    - `purchaseInformationURL` string
    - `shortVersionTitle` string
    - `shortVersionTitleInHebrew` string
    - `firstSectionRef` string
  - `textDepth` integer
  - `sectionNames` string[] — 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.
  - `addressTypes` string[] — A list which length reflects the depth of the text structure, with string values indicating class names for address types for each level
  - `lengths` integer[]
  - `length` integer
  - `heTitle` string
  - `titleVariants` string[]
  - `heTitleVariants` string[]
  - `type` string
  - `primary_category` string
  - `book` string — The title of the book that the response comes from.
  - `categories` string[] — A list of categories that a text belongs to.
  - `order` integer[]
  - `sections` integer[] — 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"_
  - `toSections` integer[]
  - `isDependant` boolean
  - `indexTitle` string
  - `heIndexTitle` string
  - `sectionRef` string — 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.
  - `firstAvailableSectionRef` string
  - `heSectionRef` string — 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.
  - `isSpanning` boolean
  - `versionTitle` string
  - `versionTitleInHebrew` string
  - `shortVersionTitle` string
  - `shortVersionTitleInHebrew` string
  - `versionSource` string
  - `versionStatus` string
  - `versionNotes` string
  - `extendedNotes` string
  - `extendedNotesHebrew` string
  - `versionNotesInHebrew` string
  - `digitizedBySefaria` union — Was the `text` response initially digitized by Sefaria
    - boolean
    - string
  - `license` string
  - `formatEnAsPoetry` union
    - boolean
    - string
  - `heVersionTitle` string
  - `heVersionTitleInHebrew` string
  - `heShortVersionTitle` string
  - `heShortVersionTitleInHebrew` string
  - `heVersionSource` string
  - `heVersionStatus` string
  - `heVersionNotes` string
  - `heExtendedNotes` string
  - `heExtendedNotesHebrew` string
  - `heVersionNotesInHebrew` string
  - `heDigitizedBySefaria` union — Was the `he` response initially digitized by Sefaria `1` or was it initially generated by another digital publisher `0`
    - boolean
    - string
  - `heLicense` string
  - `formatHeAsPoetry` union
    - boolean
    - string
  - `alts` unknown[]
    - unknown
  - `index_offsets_by_depth` object
  - `next` string, nullable — Next segment reference in sequence, if last ref, field will be `null`.
  - `prev` string, nullable — Previous segment reference in sequence, if first ref, field will be `null`.
  - `commentary` unknown[]
    - unknown
  - `sheets` unknown[]
    - unknown
  - `layer` unknown[]
    - unknown

---

[API](https://skmtc.net/sefaria/apis/sefaria-api.md) · [All operations](https://skmtc.net/sefaria/apis/sefaria-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sefaria/sefaria-api/revisions/d29296717011/schema)
