A web API for returning Bible references and whole Bibles
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Josias 94617ea144 Fix typo in README.md pirms 2 gadiem
download Add download endpoint pirms 2 gadiem
text Add download endpoint pirms 2 gadiem
.gitignore Use config file instead of hardcoded values pirms 2 gadiem
COPYING Add license information pirms 2 gadiem
COPYING.LESSER Add license information pirms 2 gadiem
README.md Fix typo in README.md pirms 2 gadiem
example.config.toml Use config file instead of hardcoded values pirms 2 gadiem
go.mod Last bug fix pirms 2 gadiem
go.sum Fix crash on invalid chapter pirms 2 gadiem
main.go Add download endpoint pirms 2 gadiem



A Go API for Heb12 that makes reading the Bible over the Web simple.

It is basically a web overlay for heb12/heb12.




  • /get returns Bible text from references
  • /download returns a URL for a whole OSIS work

Note: The endpoints are subject to change at any time, and are not yet stable.


/get returns Bible text when given a reference and a version.

Example: https://api.heb12.com/get?reference=Hebrews 4.12-13&version=web

Return example:

  "errors": [],
  "data": {
    "text": [
        "version": "web",
        "language": "en",
        "reference": "Heb 4.12-13",
        "book": "Heb",
        "chapter": 4,
        "from": 12,
        "to": 13,
        "wholeChapter": false,
        "verses": [
          "For the word of God is living, and active, and sharper than any two-edged sword, and piercing even to the dividing of soul and spirit, of both joints and marrow, and quick to discern the thoughts and intents of the heart.",
          "There is no creature that is hidden from his sight, but all things are naked and laid open before the eyes of him with whom we have to do."

Quick Install

This is a basic installation guide (for a server).


  • Go (version 1.11 or higher)
  • git

Download the Gratis Bibles to a directory and choose the split Bible branch.

$ git clone https://github.com/gratis-bible/bible gratisbibles
$ cd gratisbibles
$ git checkout split

Next, download and build bibleget.

$ cd ~
$ git clone https://code.heb12.com/heb12/bibleget
$ cd bibleget
$ go build

Copy the example configuration to config.toml and edit Dir to the appropriate directory (see “Configuration” below)

$ cp example.config.toml config.toml
$ nano config.toml

Finally, run it.

$ screen # so you can detatch without killing it
(screen) $ ./api

Now bibleget will be running on port 5500 (or any other port you set in config.toml).


The default config file is config.toml, but you can move it wherever if you change the configFile variable in main.go.

To change the port that bibleget uses, change 5500 in Port: 5500 to whatever port you want it to run on.

To change the Bible translation returned when the user doesn’t specify one, change Version: "web" to the translation you would prefer.

Make sure to change the value of Dir under Bible to where you downloaded the Gratis Bibles (without the trailing slash). If you followed the above installation instructions exactly, it should be ../gratisbibles. Blank quotes ("") means it uses the default Heb12 Gratis Bible directory (~/.local/share/heb12/gratis).


Copyright (C) 2020 Josias Allestad justjosias@tutanota.com and other Heb12 contributors

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

See COPYING.LESSER for more license information.