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

# Related

`GET /api/related/{tref}`

A single API endpoint to return all of the content (links, sheets, notes, media, manuscripts, and topics) related to the given `Ref` in the query.

## Response `200`

All content related to the queried `Ref`.

- RelatedJSON
  - `links` RelatedLinkJSON[] — An array of JSON containing the metadata for links to the reference.
    - `_id` string
    - `index_title` string — English title of the linked work.
    - `category` string — Category of the type of link, for example a link between `Rashi on Exodus` and `Exodus` would have a category of `Commentary`.
    - `type` 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 — 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.
    - `anchorRefExpanded` Ref[] — 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
    - `sourceHeRef` string — Hebrew `Ref` of the linked source.
    - `anchorVerse` integer
    - `sourceHasEn` boolean — Does the source have an English translation?
    - `compDate` integer[] — Date of the two books in the link were composed. Negative values indicate dates BCE.
    - `commentaryNum` number, double
    - `collectiveTitle` object
      - `en` string
      - `he` string
    - `heTitle` string — Hebrew title of the linked work
  - `sheets` SheetsJSON[] — All public source sheets linked to a given `Ref` or containing that `Ref` on the sheet.
    - `owner` integer — the Sefaria User ID of the sheet's owner.
    - `id` string — The `id` of the sheet. This is used in the URL to retrieve sheets, for example, a sheet with an `id` of 1, would be accessible on [Sefaria](sefaria.org) at [sefaria.org/sheets/1](sefaria.org/sheets/1).
    - `public` boolean — Is this sheet public.
    - `title` string — Title of the Source Sheet.
    - `sheetUrl` string, nullable — URL to this source sheet.
    - `anchorRef` 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.
    - `anchorRefExpanded` Ref[], nullable — An array containing the individual segments `Ref`s which comprise the `anchorRef`. Example 1: Ranged `Ref` If the `anchorRef` is `Genesis 2:14-16`, the `anchorRefExpanded` is `["Genesis 2:14", "Genesis 2:15", "Genesis 2:16"]`. Example 2: Segment Ref If the `anchorRef` itself is a segment `Ref`, the `anchorRefExpanded` will contain that identical value. For example, `anchorRef` of `Genesis 2:11` will have an `anchorRefExpanded` of `["Genesis 2:11"]`
    - `options` object, nullable — A JSON object containing document level options related to how this source sheet should be displayed in Sefaria's Source Sheet editor.
      - `numbered` number — Should the sources be automatically numbered in the Sefaria editor view
      - `boxed` union — Should the sources be boxed on the page in the Sefaria editor view
        - boolean
        - number
      - `assignable` union — Is this source sheet an assignment for students in the Sefaria editor view
        - boolean
        - number
      - `bsd` union — Should the source sheet include בס"ד at the top of the page in the Sefaria editor view
        - boolean
        - number
      - `language` 'bilingual' | 'hebrew' | 'english' — Default display language of the source sheet in the Sefaria editor view
      - `layout` string — Default display layout of the source sheet in the Sefaria editor view
      - `langLayout` string — Default display side of the language in a bilingual side-by-side view in the Sefaria editor view
      - `divineNames` string — Should the Tetragrammaton (Shem Hashem) and other variants of the divine name be replaced, and if so in what form?
      - `highlightMode` integer
      - `collaboration` string
    - `collectionTOC` object, nullable
    - `ownerName` string, nullable — Name of the owner of the sheet.
    - `via` string, nullable — Some source sheets are made by copying another users. If this is one of them, the original owner's user ID will be listed here.
    - `viaOwnerName` string, nullable — Some source sheets are made by copying another users. If this is one of them, the original owner's display name will be listed here.
    - `assignerName` string, nullable — Some source sheets are created as assignments by a teacher to be completed by students. If this is one of those sheets the name of the assigner will be found here.
    - `viaOwnerProfileUrl` string, nullable — Some source sheets are made by copying another users. If this is one of them, the path to the original owner's profile page will be listed here.
    - `assignerProfileUrl` string, nullable — Some source sheets are created as assignments by a teacher to be completed by students. If this is one of those sheets this will be the URL path to their profile.
    - `ownerProfileUrl` string, nullable — The URL Path that will link to a user's profile on the Sefaria site.
    - `ownerImageUrl` string, nullable — Sheet owner image.
    - `status` 'public' | 'unlisted' — a string indicating whether the sheet is `public` or `unlisted`
    - `views` integer — Number of source sheet views.
    - `topics` SheetTopicJSON[], nullable — Topics linked to the source sheet.
      - `slug` string — Slug of the topic
      - `asTyped` string — How the user typed the topic
      - `he` string — Hebrew topic title
      - `en` string — English topic title
    - `likes` unknown[], nullable — An array of user IDs who have favorited or liked this source sheet.
      - unknown
    - `summary` string, nullable — A user generated description of the source sheet
    - `attribution` string, nullable — Some source sheets are made by copying another users. If so, an attribution field will be created and displayed here.
    - `is_featured` boolean, nullable — Previously a source sheet flagged with `is_featured` would be promoted throughout the site in various places. This behavior was removed in 2022 but some of the data remains.
    - `category` string, nullable — This will always return `Sheets`
    - `type` string, nullable
  - `notes` unknown[] — Any notes a user has on a given `Ref`. **Note:** This data is only available for logged-in users to view their own notes on a text. This field will always present as an empty array for third party developers.
    - unknown
  - `topics` RelatedTopicJSON[] — Topics related to a given `Ref`.
    - `linkType` string — The type of link between the topic and the `Ref`. For more on Sefaria's topic ontology, see [here](https://developers.sefaria.org/docs/topic-ontology).
    - `class` 'refTopic' | 'intraTopic' — A classification of the link as either `refTopic` (i.e. a ref to a topic) or `intraTopic` (topic-to-topic). In this case, it would be expected that all returned topic links would be of type `refTopic`.
    - `dataSource` DataSourceJSON — JSON containing the information as to the source of the data for a given ref-to-topic link.
      - `en` string — English title of the data source.
      - `he` string — Hebrew title of the data source.
      - `slug` string — Unique slug describing the data source.
    - `is_sheet` boolean — Is this ref-to-topic link one that was generated by a user-created source sheet?
    - `generatedBy` string — How the topic was generated (i.e. by a user, aspaklaria, Sefaria staff)
    - `order` OrderTopicLinkJSON — This JSON includes the various metrics that are relevant for ordering the link on a topics page. We use these metrics at [Sefaria.org](sefaria.org) to change the order on the topics page.
      - `tfidf` number, double — Results of the [tfidf algorithm](https://en.wikipedia.org/wiki/Tf%E2%80%93idf) run on the `Ref`s within a given topic, as another metric for evaluating the relevance of a given source on a topic page.
      - `numDatasource` integer — The number of datasources which connect this `Ref` to the topic. A value of `2` will occur when two sources (i.e. `aspaklaria` and `sefaria sheets` both have connections between this `Ref` and this topic.)
      - `availableLangs` string[] — This topic is available in a list of languages represented as strings with their language code.
      - `comp_date` integer — The date when the book referenced in the `Ref` was composed. Negative numbers indicate the work was composed BCE, whereas positive numbers indicate the book was composed CE.
      - `order_id` string — Unique ID for the `order` JSON.
      - `pr` number, double — `PageRank`. Sefaria calculates `PageRank` for the sources on a given topic page using the internal Sefaria links to create a link graph and then running the [PageRank algorithm](https://en.wikipedia.org/wiki/PageRank) on that. Sources with higher `PageRank` are considered to be more centrally linked and more relevant.
      - `curatedPrimacy` object — This field is used for manually ordering a source on a topics page. It has a separate order value for each language.
        - `en` integer
        - `he` integer
    - `topic` string — Topic slug
    - `title` object — The title of the topic in Hebrew (`he`) and English (`en`).
    - `titleIsTransliteration` object — A boolean value for the `he` and `en` fields inside the title JSON, indicating whether or not either translation is a transliteration.
    - `description` object — JSON containing descriptions for a given topic in various languages. Each language contains a title for the topic description, as well as a prompt which previews the source and asks questions to help the user engage with the text.
    - `anchorRef` 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.
    - `anchorRefExpanded` Ref[] — The segment `Ref`s within the `anchorRef`.
  - `manuscripts` ManuscriptJSON[] — An array of manuscript objects containing data of related manuscripts.
    - `manuscript_slug` string — A unique slug for the given manuscript
    - `page_id` string — The ID for the specific page within the manuscript being referenced.
    - `image_url` string — The URL to the image of the manuscript, hosted by Sefaria. All URLs will be prefaced by `https://manuscripts.sefaria.org/`
    - `thumbnail_url` string — The url to the thumbnail image of the manuscript.
    - `anchorRef` string — A manuscript image will in most cases be associated with a range of `refs` (i.e. an image of a page of Tanakh will display multiple verses). The `anchorRef` is that complete range the manuscript is associated with, and will contain within it the specific textual `Ref` passed in as a parameter.
    - `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 manuscript data for `Esther 4.14-15`, the `anchorRefExpanded` would contain `Esther 4.14` and `Esther 4.15`.
    - `manuscript` ManuscriptVersionMetaData, required — The specific metadata for the version of the manuscript.
      - `slug` string, required — The unique slug for the manuscript.
      - `title` string, required — The title of the manuscript.
      - `he_title` string, required — The manuscript title in Hebrew.
      - `source` string, required — The url for the source of the manuscript images.
      - `description` string, required — A description of the manuscript, oftening containing details about the archivists or where the physical manuscript images can be found, as well as other library details.
      - `he_description` string, required — A Hebrew description of the manuscript, oftening containing details about the archivists or where the physical manuscript images can be found, as well as other library details.
  - `media` MediaJSON[] — An array of JSON containing any media related to the `Ref`.
    - `media_url` string — The URL for the media.
    - `source` string — Source of the media.
    - `source_he` string — Hebrew title of the media source.
    - `start_time` string — Start time of the media associated with this `Ref`.
    - `end_time` string — End time of the portion of the associated media which correlates to this `Ref`.
    - `anchorRef` 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.
    - `license` string — The license on the media.
    - `source_site` string — Website of the source.
    - `description` string — A description of the associated media in English.
    - `description_he` string — A description of the associated media 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)
