The developer tools of the Bibleserver support you with the manual and automatic link of Bible passages on your website. The official API of the Bibleserver will be explained in detail below.
Note: The Bibleserver doesn’t offer API for the content of Bible verses. This is not possible due to license reasons.
Manually link Bible passages and search queries
The link structure of the Bible server is simple and clear. Without prior experience, any Bible passage or search result can be linked with the Bibleserver. With the current version 2010 of the Bibleserver, the linking has changed. However, links made with former versions still work.
Link Bible passages
The link of a Bible passage has the following structure: http://www.bibleserver.com/text/{Translation}/{Bible passage}
Example for John 3:16 from the Luther translation: http://www.bibleserver.com/text/LUT/Johannes3,16
Link search queries
Search queries can be linked as follows: http://www.bibleserver.com/search/{Translation}/{Search term}
Example for "Tempel" from the Luther translation: http://www.bibleserver.com/search/LUT/Tempel
Explanations on how to state the translation
Translations are indicated in shortened form. The following table gives an overview of available translations.
| Abbreviation | Name | Language | Section |
|---|---|---|---|
| LUT | Luther 1984 | German | OT, NT |
| ELB | Elberfelder Bibel | German | OT, NT |
| HFA | Hoffnung für alle | German | OT, NT |
| SLT | Schlachter 2000 | German | OT, NT |
| NGÜ | Neue Genfer Übersetzung | German | Psalms, NT |
| GNB | Gute Nachricht Bibel | German | OT, NT, Apocrypha |
| EU | Einheitsübersetzung | German | OT, NT, Apocrypha |
| NLB | Neues Leben. Die Bibel | German | OT, NT |
| NeÜ | Neue evangelistische Übersetzung | German | OT, NT |
| ESV | English Standard Version | English | OT, NT |
| NIV | New International Version | English | OT, NT |
| TNIV | Today's New International Version | English | OT, NT |
| NIRV | New Int. Readers Version | English | OT, NT |
| KJV | King James Version | English | OT, NT |
| BDS | Bible du Semeur | French | OT, NT |
| S21 | Segond 21 | French | OT, NT, Apocrypha |
| ITA | La Parola è Vita | Italian | NT |
| NRS | Nuova Riveduta 2006 | Italian | OT, NT |
| HTB | Het Boek | Dutch | OT, NT |
| CST | Version La Biblia al Dia | Spanish | OT, NT |
| NVI | Nueva Versión Internacional | Spanish | OT, NT |
| BTX | La Biblia Textual | Spanish | OT, NT |
| PRT | O Livro | Portuguese | OT, NT |
| NOR | En Levende Bok | Norwegian | NT |
| SVL | En Levande Bok | Swedish | OT, NT |
| DK | Bibelen på hverdagsdansk | Danish | OT, NT |
| POL | Słowo Życia | Polish | NT |
| CEP | Český ekumenický překlad | Czech | OT, NT, Apocrypha |
| SNC | Slovo na cestu | Czech | OT, NT |
| B21 | Bible, překlad 21. století | Czech | OT, NT |
| NPK | Nádej pre kazdého | Slovak | NT |
| KAR | IBS-fordítás (Új Károli) | Hungarian | OT |
| HUN | Hungarian | Hungarian | NT |
| NTR | Noua traducere în limba românã | Romanian | OT, NT |
| BLG | Българската Библия | Bulgarian | OT, NT |
| CRO | Hrvatski | Croatian | NT |
| RUS | Новый перевод на русский язык | Russian | OT, NT |
| CRS | Священное Писание | Russian | OT, NT |
| TR | Türkçe | Turkish | OT, NT |
| ARA | عربي | Arabic | OT, NT |
| CUVS | 中文和合本(简体) | Chinese | OT, NT |
Explanations on how to state the particulate Bible passage
The Bibleserver recognizes all common spellings of a Bible passage. Furthermore, several verses at once can be linked. In order to avoid problems, please use the language of the respective translation when stating the Bible passage.
Automatically link Bible passages on the server side
The Bibleserver offers an interface on the server side by which Bible verses within a text will automatically be recognized and linked. Stating API key is required in order to use the interface. The number of the daily API requests is limited. For this reason, it is recommended to parse the Bible passages while saving the text.
The API is available at http://www.bibleserver.com/api/parser.
The following parameters can be passed per GET or POST:
key
- Domain-specific API keytext
- Content to be parsedlang
- Language according to ISO 639: de, en, fr, it, nl, es, pt, no, sv, da, pl, cs, sk, hu, ro, bg, hr, ru, tr, zh, ar (optional)trl
- Abbreviation of the translation, see table above (optional)cssignore
- Bible passages that are embedded by a HTML tag with this CSS class will not be replaced; default: nolink (example: <a href="..." class="nolink">Joh 3,16</a>) (optional)
The following PHP example shows how to use the API on the server side:
// Define POST data
$param = array(
'key' => 'YOUR_API_KEY',
'text' => 'Read John 3:16 in the Bible.',
'lang' => 'en',
'trl' => 'LUT'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.bibleserver.com/api/parser');
curl_setopt($ch, CURLOPT_REFERER, 'http://'.$_SERVER['SERVER_NAME']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $param);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
Result of the PHP example:
Automatically link Bible passages on the client side
The JavaScript implementation of the API allows the recognition and linking of Bible passages in the browser. Stating API key is required in order to use the JavaScript API.
Note: The JavaScript implementation is a simplified version of the API on the server side. Maybe not every Bible passage will be recognized correctly. Furthermore, problems with JavaScript events may arise due to DOM manipulations.
The following HTML/JavaScript example shows how to use the API on the client side:
<!doctype html>
<html>
<head>
<title>[...]</title>
<!-- The following script needs to be adapted and integrated to your website. -->
<script type="text/javascript">
(function() {
var ga = document.createElement('script');
ga.src = document.location.protocol + '//www.bibleserver.com/api/parser.js?key=YOUR_API_KEY&lang=de';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
var bsQuery = '.article'; // jQuery selector for wrapper of search (optional)
var bsTrl = 'LUT'; // Linked translation (optional)
</script>
</head>
<body>
[...]
<h1>Johannes 3</h1>
<div class="article">
Read John 3:16 in the Bible.
</div>
[...]
</body>
</html>
Result of the JavaScript example:
Parameter for calling the API:
key
- Domain-specific API keylang
- Language according to ISO 639, Bible passages will be recognized depending on language: de, en, fr, it, nl, es, pt, no, sv, da, pl, cs, sk, hu, ro, bg, hr, ru, tr, zh, ar default: 'de' (optional)nojquery
- Don’t load jQuery since it’s already available on the website (optional)
Additional JavaScript options:
bsQuery
- jQuery selector to limit Bible passage search. Default is "body" - a limit is recommended. (optional)bsTrl
- Abbreviation of the translation, see table above (optional)
Wordpress plugin
The Wordpress plugin "Link to Bible" automatically links Bible verses to Bibleserver.com when saving the article. Please find further information on the plugin website.
Create API key
In order to automatically link Bible passages either on the client side or on the server side, an API key is required. This key depends on the domain and can be ordered here.
Note: Bibleserver.com maintains the right to limit the daily API accesses per domain.