Sefaria-Project
Sefaria-Project copied to clipboard
API documentation is not clear or with errors
Hello, I am trying to build a simple program to call the API on demand but I found hard to understand the doc. there are some errors and not enough examples. for example, the example shows GET http://www.sefaria.org/api/texts/Kohelet.5 when it is now https of course. it lists some parameters as pad=0 and I tried GET http://www.sefaria.org/api/texts/Kohelet.5 pad=0 and got an error. I found that using GET https://www.sefaria.org/api/texts/Genesis 1:1 ?pad=0 works better. May look evident to many but not to me. Same for GET /api/texts/:ref/lang/version when I used GET https://www.sefaria.org/api/texts/Genesis 1:1/he I got an error; but when I used GET https://www.sefaria.org/api/texts/Genesis 1:1 ?language=he I did not get an error even though I got both englsih and hebrew as always. Also, using this command GET https://www.sefaria.org/api/texts/Genesis 1:1 brought me the first chapter from bereishit to yom ha shishi, whenever I thought it should bring me only the first verse. Actually I used Genesis1:1 or Genesis1:1-2 or Genesis1:1-1:2 and I always got the same full chapter one. Are there some more detailed and accurate explanations somewhere?
thanks
i ran into simalar issuses using the api, the doc needs to be clarified,
the language=he
just puts the hebrew first (sometimes), which is quite pointless,
if you want to get only the requested pesukim and not the full chapter you have to add the context=0
parameter, for example https://www.sefaria.org/api/texts/Genesis.1.1?context=0&language=he