Skip to content

Repository files navigation

YouVersion-API

Express Rest API for getting verses and such from YouVersion.

Building and Running

Note I use pnpm in these examples. NPM will also work if you don't have or want to install pnpm

First step is of course installing the modules

pnpm i

Building

To build I think you can just use the tsc command.

tsc

If you cannot use tsc try

npx tsc

Running

And to run use

pnpm run start

Making Requests

QueryDefaultRequiredExample
bookNonetrueJohn or JHN
chapter1false7 or 10
verses1false1-3 or 7-10
versionNIVfalseKJV or NLT

Examples

Gets John 1:1 NIV

https://serverAddress.com/api/v1/verse?book=John

Gets John 3:16 NLT

https://serverAddress.com/api/v1/verse?book=John&chapter=3&verses=16&version=NLT

Responses

Requests return a JSON object and a status code.

Good Responses

A good API call responds with a 200 OK and the requested verse(s).

{
"citation": "John 3:16 NLT",
"passage": "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
}

Checking the API status is pretty simple, just make a request to the following route and if everything is fine it'll respond with a 200 OK and no JSON object.

https://serverAddress.com/api/v1/status

Bad Responses

If no book is specified in the query, it will prompt a 400 Bad Response and an error message

{
"code": 400,
"message": "Missing field 'book'"
}

Trying to access a book that does not exist will prompt a similar 400 Bad Response but with a different error message

{
"code": 400,
"message": "Could not find book 'Coffee' by name or alias."
}

Options and Queries

Books and Aliases
BookAlias
GenesisGEN
ExodusEXO
LeviticusLEV
NumbersNUM
DeuteronomyDEU
JoshuaJOS
JudgesJDG
RuthRUT
1st Samuel1SA
2nd Samuel2SA
1st Kings1KI
2nd Kings2KI
1st Chronicles1CH
2nd Chronicles2CH
EzraEZR
NehemiahNEH
EstherEST
JobJOB
PsalmsPSA
ProverbsPRO
EcclesiastesECC
Song of SongsSNG
IsaiahISA
JeremiahJER
LamentationsLAM
EzekielEZK
DanielDAN
HoseaHOS
JoelJOL
AmosAMO
ObadiahOBA
JonahJON
MicahMIC
NahumNAM
HabakkukHAB
ZephaniahZEP
HaggaiHAG
ZechariahZEC
MalachiMAL
MatthewMAT
MarkMRK
LukeLUK
JohnJHN
ActsACT
RomansROM
1st Corinthians1CO
2nd Corinthians2CO
GalatiansGAL
EphesiansEPH
PhilippiansPHP
ColossiansCOL
1st Thessalonians1TH
2nd Thessalonians2TH
1st Timothy1TI
2nd Timothy2TI
TitusTIT
PhilemonPHM
HebrewsHEB
JamesJAS
1st Peter1PE
2nd Peter2PE
1st John1JN
2nd John2JN
3rd John3JN
JudeJUD
RevelationREV
Versions
VersionsID
AMP1588
ICL00D1196
KJV1
NIV111
NLT116
NR06122
VULG823

About

Express Rest API for getting verses and such from YouVersion.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages