ERF Bibleserver for Webmasters

The developer tools of ERF Bibleserver support you with the manual and automatic link of Bible passages on your website. The official API of ERF Bibleserver will be explained in detail below.

Note: ERF 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 ERF Bibleserver is simple and clear. Without prior experience, any Bible passage or search result can be linked with ERF Bibleserver. Since version 2019 of ERF 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:

https://www.bibleserver.com/{Translation}/{Bible passage}

Example for John 3:16 from the English Standard Version:

https://www.bibleserver.com/ESV/John3:16

It is also possible to link a translation comparison:

https://www.bibleserver.com/ESV.KJV/John3:16

Link search queries

Search queries can be linked as follows:

https://www.bibleserver.com/search/{Translation}/{Search term}

Example for "God" from the English Standard Version:
https://www.bibleserver.com/search/ESV/God

Search queries with translation comparison can be linked as follows:

https://www.bibleserver.com/search/ESV.KJV/God

Explanations on how to state the translation

Translations are indicated in shortened form. The following table gives an overview of available translations.

Overview of available translations

Explanations on how to state the particulate Bible passage

ERF 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

ERF 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 https://www.bibleserver.com/api/parser.
The following parameters can be passed per GET or POST:

  • key - Domain-specific API key
  • text - Content to be parsed
  • lang - Language: ar, bg, cs, da, de, en, es, fa, fr, hr, hu, it, nl, no, pl, pt, ro, ru, sk, sv, tr, uk, zh_CN (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: <span class="nolink">Joh 3:16</span>) (optional)

The following PHP example shows how to use the API on the server side:


// Define post data
$text = 'Read John 3:16 in the Bible.';
$param = array(
    'key' => 'YOUR_API_KEY',
    'text' => $text,
    'lang' => 'en',
    'trl' => 'ESV'
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://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);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

if ($httpcode === 200) {
    $text = $result;
}

curl_close($ch);
                
php

Result of the PHP example:

Read John 3:16 in the Bible.

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 = 'https://www.bibleserver.com/api/parser.js?key=YOUR_API_KEY&lang=en';
        ga.setAttribute('async', 'true');
        document.documentElement.firstChild.appendChild(ga);
    })();
 
    var bsQuery = '.article'; // CSS-Selektor für Wrapper der Suche (optional)
    var bsTrl   = 'ESV';      // Verlinkte Übersetzung (optional)
    </script>
</head>
<body>
    [...]
    <h1>Johannes 3</h1>
    <div class="article">
        <p>Read John 3:16 in the Bible.</p>
    </div>
    [...]
</body>
</html>
html

Result of the JavaScript example:

John 3

Read John 3:16 in the Bible.

Parameter for calling the API:

  • key - Domain-specific API key
  • lang - Language, Bible passages will be recognized depending on language: ar, bg, cs, da, de, en, es, fa, fr, hr, hu, it, nl, no, pl, pt, ro, ru, sk, sv, tr, uk, zh_CN; default: 'de' (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)
  • cssIgnore - Bible passages that are embedded by a HTML tag with this CSS class will not be replaced; default: nolink (example: <span class="nolink">Joh 3:16</span>) (optional)

Wordpress plugin

The Wordpress plugin "Link to Bible" automatically links Bible verses to ERF Bibleserver 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: ERF Bibleserver maintains the right to limit the daily API accesses per domain.

Privacy Policy ERF Bibleserver API

Your privacy is important to us!

Therefore, no personal data will be stored while using the ERF Bibleserver API. However, we offer an API, which enables you to link passages of scripture to ERF Bibleserver. The client-side automatic linking which is executed on your device and communicates with our server does not submit any content to ERF Bibleserver.

However, when using the server-side automatic linking contents will be transmitted to ERF Bibleserver. For the linking of Bible passages these data will analyzed, processed and transmitted back to the client by algorithms on our webserver. None of the transmitted data will be saved or passed on to third parties, though. In order to continually develop the website and analyze errors only statistical data like time and length of API calls will be saved for a duration of 120 days.

Legal basis for the use of the server-side linking is art 6 section 1, page 1 lit. f of the GDPR.