Bible Web Service

One of the most powerful and exciting trends in technology is the emergence of "web services." You can read my full description of what this is all about here.

We will look for opportunities to enable many websites to add functionality without burdening themselves with the resources required for that functionality using webservices. Our first such capability is Bible searching and passage lookup. We have implemented a web service for any website to be able to search any of six Bible translations that are in the public domain (KJV: King James Version, AKJV: American KJV, ASV: American Standard Version, YLT: Young's Literal Translation, WEB: World English Bible, HNV: Hebrew Names Version) and to lookup passages from those translations.

We aren't the first in providing a web services interface to the Bible. According to their website, "The ESV Bible is a new, essentially literal Bible translation that combines word-for-word precision and accuracy with literary excellence, beauty, and readability." The publishers of the ESV have provided a web services interface so that you can similarly include the ESV in your website. If their terms of use are too restrictive, you can also purchase expanded access from them. Check it out here.

This web services concept is a whole lot easier to demonstrate than explain. So, let's try it out.

Here's the Bible lookup form from Seek First. Select what you want to lookup.

Read Passage: :
To: :

When you hit the "Seek" button above, these selections get translated into this REST request:


When you hit the "Send" button above, this request will be sent to the web services server, for example using the PHP file_get_contents function. (Note, this demo is actually using another interesting technology development: AJAX, asynchronous javascript and xml so that this query can be completed without redrawing this entire page.) The Living Stones web services server will then respond with the information you requested:

To search for specific words in the Bible, a similar request structure is sent and received to the server. The request type changes from "lookup" to "search." Again, it's easier to demonstrate than to explain.

Here's a simplifed version of the search form from Seek First. Enter a phrase to search for in the Bible.

Query:

When you hit the "Seek" button above, your query get translated into this REST request:


When you hit the "Send" button above, this request will be sent to the web services server (again using AJAX). The Living Stones web services server will then respond with the information you requested: