IQ Bible API v2.0.0-rc.17 Released

The API now serves Bible quizzes for every chapter. The canon filter is fixed. Garbled quotes are repaired in eight translations. And here is what happened on October 13.

Quiz endpoints, a canon filter fix and a repair to eight translations. Covers rc.10 through rc.17.

Eight releases since the last post. The big one is quizzes. The API now serves quiz questions for the Bible, one chapter at a time. We also fixed a few things, and two of the fixes were our mistakes. Those come after.

Quiz endpoints

There are three endpoints.

GET /books/{book}/chapters/{chapter}/quiz returns the questions for one chapter.

GET /books/{book}/quiz returns questions across a book.

GET /quiz/random returns a random sample.

Each question has its choices, the correct answer, a verse anchor and sometimes a short explanation. Questions are multiple choice or true or false.

You can set ?count=, which is 10 by default, or all. You can set ?type=. You can set ?seed= to get the same questions again. Set ?answers=false to hide the answers. Set ?language= for the language. Add ?hydrate=true&version= to get the verse text with each question.

Then there’s GET /quiz/coverage. It tells you how many questions exist for each book and each chapter, split by multiple choice and true or false. Ask it first and you know which chapters have a quiz before you ask for one. Add ?book= to narrow it down.

A chapter that exists in only some canons, like Daniel 13 or Psalm 151, resolves to the book that holds its questions. The response says so in alias_of.

How the questions were made

Some of the questions came from Biblical Elearning. Some we wrote from public domain texts, the KJV Apocrypha, Brenton and Ryle-James. We used AI for part of that work. Claude, from Anthropic. The credits page, GET /credits and the licensing terms say so.

No question is served until a person approves it. The API returns reviewed questions only. Until a book has some, its endpoints answer 404 quiz_not_available.

We checked the questions against the database text. That caught eight wrong answer keys. Genesis, Joshua, 1 Kings, 2 Corinthians, John and Amos had them. We cut about 275 questions whose answer depends on one translation’s wording.

We found one more problem. In 40 percent of our multiple choice questions the right answer was the longest one. A player could guess by length. We rewrote 280 questions so the wrong options are as long as the right one. It’s 24 percent now.

The Odes have no English source in our database. Their questions are not checked.

What the app does with it

IQ Bible App 1.28 uses these endpoints for chapter quizzes. Take a quiz at the end of a chapter and you’re calling them. Read the app post.

The canon filter

?canon=Jewish was returning New Testament books. So was ?canon=Dead Sea Scrolls. The filter counted all 66 core books as visible in every tradition. That was wrong.

It’s fixed on the quiz, commentary and cross-reference endpoints. If you filtered the New Testament out of those responses yourself, you can stop.

We also added books that were missing from some canons. 4 Maccabees, the Odes and the Psalms of Solomon are in the Eastern and Slavonic Orthodox canons. 1 Esdras, 2 Esdras and the Prayer of Manasseh are in the Anglican canon. Their quizzes used to return 404 under ?canon=.

Garbled quotes in eight translations

Matthew 2:2 in the Twentieth Century New Testament (eng_tcnt) began like this. “Where is the new-born King…

That’s not the text. The curly quotes and dashes had turned into junk. We imported the version over the wrong connection encoding. Windows-1252 instead of utf8mb4. We fixed Anderson for the same reason in beta-54. Then we ran a check and found more.

Seven other versions had the same fault. They are eng_kjva, eng_rlt, eng_haweis, pon_oldntpsalms, sml_bl_2008, tsg_injil and deu_bolut.

Migration 018 reverses it on about 16,800 verses. Before it changed a verse, it checked that the repair round-trips byte for byte. Seven more versions matched the detector but did not round-trip. We left them alone. They need a separate look.

If you cached text from any of those eight versions, clear it.

One outage

On October 13 the server rebooted for an update. The process didn’t start again. The API, the developer portal and the admin console returned 502 for about eight hours.

It runs under systemd now. It restarts after a crash and after a reboot. The deploy fails if the service isn’t active when it finishes.

What you need to do

Nothing breaks. The quiz endpoints are new. The canon fix changes what comes back for ?canon=Jewish and ?canon=Dead Sea Scrolls, and that’s the only change to existing responses. Clear any cached text for the eight versions above.

Already building on the API? Look at GET /quiz/coverage first. Don’t have a key? Get a free one at developer.iqbible.com and make your first call.

IQ Bible is biblical data for developers who build tools that help people read Scripture.

Gephen v0.24.0