Torah Companion

Torah Companion · GPT-Aktionen

Get Jewish Texts

Retrieves texts and metadata from Sefaria.

  • GET /api/calendarsGetCalendars

    Find reading schedule info such as parashah and Daf Yomi

  • GET /api/texts/{ref}GetText

    Get a specific text segment with optional version and language parameters

  • POST /api/search-wrapperSearchTexts

    Search through texts, sheets, or merged indices

  • GET /api/name/{name}AutocompleteName

    Autocomplete API for matching strings against Sefaria data

Ursprüngliches API-Schema
{
  "openapi": "3.1.0",
  "info": {
    "title": "Get Jewish Texts",
    "description": "Retrieves texts and metadata from Sefaria.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://www.sefaria.org"
    }
  ],
  "paths": {
    "/api/calendars": {
      "get": {
        "description": "Find reading schedule info such as parashah and Daf Yomi",
        "operationId": "GetCalendars"
      }
    },
    "/api/texts/{ref}": {
      "get": {
        "description": "Get a specific text segment with optional version and language parameters",
        "operationId": "GetText",
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "description": "Text reference (e.g., 'Genesis 1')",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Language code (e.g., 'en' for English)",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "description": "Version title, spaces replaced by underscores",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/search-wrapper": {
      "post": {
        "description": "Search through texts, sheets, or merged indices",
        "operationId": "SearchTexts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Your search query"
                  },
                  "type": {
                    "type": "string",
                    "description": "The index to query: 'text', 'sheet', or 'merged'"
                  },
                  "field": {
                    "type": "string",
                    "description": "The field to query, defaults to 'exact'"
                  }
                },
                "required": [
                  "query",
                  "type"
                ]
              }
            }
          }
        },
        "responses": {}
      }
    },
    "/api/name/{name}": {
      "get": {
        "description": "Autocomplete API for matching strings against Sefaria data",
        "operationId": "AutocompleteName",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "String to match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {}
      }
    }
  }
}