---
title: "Links"
method: GET
path: "/api/links/{tref}"
tags: ["Related"]
---

# Links

`GET /api/links/{tref}`

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

## Query parameters

- `with_text` '0' | '1'
- `with_sheet_links` '0' | '1'
- `category` string
- `categories` string

## Response `200`

Successful response

- LinkObj[]
  - `_id` string
  - `index_title` string — The canonical title of the text in the Sefaria library.
  - `category` string — The primary category this ref belongs to on Sefaria.
  - `type` string — An arbitrary string assigned to the connection to identify it. Most commonly `commentary`, `reference`, or an empty string.
  - `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.
  - `anchorRef` string — 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.
  - `anchorRefExpanded` string[] — 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 `ref`s 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`.
  - `sourceRef` 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.
  - `sourceHeRef` 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.
  - `anchorVerse` integer
  - `sourceHasEn` boolean
  - `compDate` integer[] — 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.
  - `commentaryNum` number, double
  - `collectiveTitle` object
    - `en` string
    - `he` string
  - `he` string — 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.
  - `heVersionTitle` string — The title of the work in English for where the default `he` text came from.
  - `heLicense` string — A string of text documenting the license for the text in Hebrew.
  - `heVersionTitleInHebrew` string — The title of the work in Hebrew for where the default `he` text came from.
  - `text` unknown[] — The default 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.
    - unknown
  - `versionTitle` string — 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
  - `license` string — A string of text documenting the license for the text in English.
  - `versionTitleInHebrew` string — 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.

---

[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)
