Using the Correct Base Url
This guide will help you to know which base url you will need for making your requests. The base url allows you to customize which version of the API you would like to use (and keep older versions of the API backwards compatable), and choose which language and denomination information you'd like as well.
Before you can make requests with the Open Scripture API, you will need to create an account and generate an API Key. You can learn more about how to do that at API Keys
The Makings of the Base URL
The base url is composed as follows:
/api/scriptures/[api-version]/[denomination]/[language]
- Name
api-version
- Type
- string
- Description
The version of the api you'd like to use, currently the only valid option is "v1"
- Name
denomination
- Type
- string
- Description
The denomination of the books you'd like to query. Different denominations will have different available volumes and scriptures. Currently the only valid option is "lds"
- Name
language
- Type
- string
- Description
The language of the resources which you'd like to query. This varies by denomination, but currently the only valid option is "en" for english.
Summing it all up
We've built the Open Scripture API to support various versions, denominations, and languages as it goes forward. But for right now since it is still in its early years, the only base url that you need to worry about is:
/api/scriptures/v1/lds/en
Use this base url before all queries, and on the end of the regular openscriptureapi.org domain. For example, if you'd like to get the list of available volumes:
GET openscriptureapi.org/api/scriptures/v1/lds/en/volumes