API.Bible Logo

Documentation Navigation

Verses

Overview

A Verse object represents a verse in the Bible. Each Verse is accessible via its Verse ID, a string consisting of a Book ID, a chapter number, and a verse number. A few examples are:

VerseVerse ID
Genesis 1:1GEN.1.1
John 3:16JHN.3.16
Revelation 21.4REV.21.4

Verse Data Structure

Below is the data structure for the Verse object, which is returned by all /verses API endpoints

{
"id": "string",
"orgId": "string",
"bibleId": "string",
"bookId": "string",
"chapterId": "string",
"content": "string",
"reference": "string",
"verseCount": 0,
"copyright": "string",
"next": {
"id": "string",
"bookId": "string"
},
"previous": {
"id": "string",
"bookId": "string"
}
}

Fetching a List of Verses for a Chapter

GET https://rest.api.bible/v1/bibles/{bibleId}/chapters/{chapterId}/verses

To fetch a list of verses for a chapter of the Bible, you must send a GET request to the above API endpoint using the appropriate Bible ID and Chapter ID you would like to fetch. If you are having trouble finding a specific Chapter ID, try fetching a list of chapters first.

You may also use the /chapters endpoint to fetch verse data. For more, see our guide on Fetching a List of Chapters for a Book .

Note: This endpoint does not return verse content, see Fetching a Single Verse to query verse content

Parameters

There are no additional parameters for this endpoint.

Response

Below is the expected output structure from a successful API request:

{
"data": [
{
"id": "string",
"orgId": "string",
"bibleId": "string",
"bookId": "string",
"chapterId": "string",
"reference": "string"
}
]
}

Code Samples

To make a simple curl request, copy the following snippet and insert your API key, Bible ID, and Chapter ID:

curl --request GET \
--url https://rest.api.bible/v1/bibles/{bibleId}/chapters/{chapterId}/verses \
--header 'api-key: YOUR_API_KEY'

For a JavaScript application, copy the following function and insert your API key:

const fetchChapterVersesList = async (bibleId, chapterId) => {
const url =
"https://rest.api.bible/v1/bibles/${bibleId}/chapters/${chapterId}";
try {
const response = await fetch(url, {
headers: {
"api-key": "YOUR_API_KEY",
},
});
if (!response.ok) {
throw new Error(`Response status: ${response.status}`);
}
const result = await response.json();
console.log(result);
return result;
} catch (error) {
console.error(error.message);
}
};

Note: To protect your API key, it is not recommended to use your API key in a client-side JS application (i.e. React)


Fetching a Single Verse

GET https://rest.api.bible/v1/bibles/{bibleId}/verses/{verseId}

To fetch information and content for a single verse, you must send a GET request to the above API endpoint using the appropriate Bible ID and Verse ID you would like to fetch. If you are having trouble finding a specific Verse ID, try fetching a list of verses first.

Parameters

You can use the following query parameters to alter the results of your request:

NameFormatDefaultDescription
content-typehtml | json | texthtmlDetermines the structure of returned verse content
include-notesBooleanfalseReturns footnotes in content
include-titlesBooleantrueReturns section titles in content
include-chapter-numbersBooleanfalseReturns chapter numbers in content
include-verse-numbersBooleantrueReturns verse numbers in content
include-verse-spansBooleanfalseReturns spans that wrap verse numbers and verse text in content
parallelsComma-separated list of Bible IDsReturns parallel verses from the given Bibles

Response

Below is the expected output structure from a successful API request:

{
"data": {
"id": "string",
"orgId": "string",
"bibleId": "string",
"bookId": "string",
"chapterId": "string",
"content": "string",
"reference": "string",
"verseCount": 0,
"copyright": "string",
"next": {
"id": "string",
"bookId": "string"
},
"previous": {
"id": "string",
"bookId": "string"
}
},
"meta": {
"fums": "string",
"fumsId": "string",
"fumsJsInclude": "string",
"fumsJs": "string",
"fumsNoScript": "string"
}
}

Code Samples

To make a simple curl request, copy the following snippet and insert your API key and a Verse ID:

curl --request GET \
--url https://rest.api.bible/v1/bibles/{bibleId}/verses/{verseId} \
--header 'api-key: YOUR_API_KEY'

For a JavaScript application, copy the following function and insert your API key and a Chapter ID:

const fetchVerse = async (bibleId, verseId) => {
const url = `https://rest.api.bible/v1/bibles/${bibleId}/verses/${verseId}`;
try {
const response = await fetch(url, {
headers: {
"api-key": "YOUR_API_KEY",
},
});
if (!response.ok) {
throw new Error(`Response status: ${response.status}`);
}
const result = await response.json();
console.log(result);
return result;
} catch (error) {
console.error(error.message);
}
};

Note: To protect your API key, it is not recommended to use your API key in a client-side JS application (i.e. React)


Verse Content

You can configure the format of verses returned from API.Bible three ways depending on your use-case: html, json, and text . Below you will see a quick overview and sample response for each, showing Genesis 1:1.

HTML

HTML-formatted verse content, alongside our scripture styles package, allows you to display your API results directly in your application without a need for additional styling or transformation.

{
"data": {
"id": "GEN.1.1",
"orgId": "GEN.1.1",
"bookId": "GEN",
"chapterId": "GEN.1",
"bibleId": "78a9f6124f344018-01",
"reference": "Gen. 1:1",
"content": "<p class=\"s1\">The Beginning</p><p class=\"p\"><span data-number=\"1\" data-sid=\"GEN 1:1\" class=\"v\">1</span>In the beginning God created the heavens and the earth. </p>",
"verseCount": 1,
"copyright": "The Holy Bible, New International Version® NIV® Copyright © 1973, 1978, 1984, 2011 by Biblica, Inc.® Used by Permission of Biblica, Inc.® All rights reserved worldwide.",
"next": { "id": "GEN.1.2", "number": "2" },
"previous": { "id": "GEN.intro.0", "number": "0" }
}
}

JSON

JSON-formatted verse content allows you to build your own display mechanism for Bible verses. The JSON output is structured as an array of content blocks with varying display attributes.

{
"data": {
"id": "GEN.1.1",
"orgId": "GEN.1.1",
"bookId": "GEN",
"chapterId": "GEN.1",
"bibleId": "78a9f6124f344018-01",
"reference": "Gen. 1:1",
"content": [
{
"name": "para",
"type": "tag",
"attrs": { "style": "s1" },
"items": [{ "text": "The Beginning", "type": "text" }]
},
{
"name": "para",
"type": "tag",
"attrs": { "style": "p" },
"items": [
{
"name": "verse",
"type": "tag",
"attrs": { "number": "1", "style": "v", "sid": "GEN 1:1" },
"items": [{ "text": "1", "type": "text" }]
},
{
"text": "In the beginning God created the heavens and the earth. ",
"type": "text",
"attrs": { "verseId": "GEN.1.1", "verseOrgIds": ["GEN.1.1"] }
}
]
}
],
"verseCount": 1,
"copyright": "The Holy Bible, New International Version® NIV® Copyright © 1973, 1978, 1984, 2011 by Biblica, Inc.® Used by Permission of Biblica, Inc.® All rights reserved worldwide.",
"next": { "id": "GEN.1.2", "number": "2" },
"previous": { "id": "GEN.intro.0", "number": "0" }
}
}

Text

Text-formatted verse content minimizes clutter and only returns the raw text of the given verse.

{
"data": {
"id": "GEN.1.1",
"orgId": "GEN.1.1",
"bookId": "GEN",
"chapterId": "GEN.1",
"bibleId": "78a9f6124f344018-01",
"reference": "Gen. 1:1",
"content": "The Beginning\n [1] In the beginning God created the heavens and the earth. \n",
"verseCount": 1,
"copyright": "The Holy Bible, New International Version® NIV® Copyright © 1973, 1978, 1984, 2011 by Biblica, Inc.® Used by Permission of Biblica, Inc.® All rights reserved worldwide.",
"next": { "id": "GEN.1.2", "number": "2" },
"previous": { "id": "GEN.intro.0", "number": "0" }
}
}