Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Ninjas Bible API
description: 'Combined OpenAPI specification for every API Ninjas endpoint. Requests go to https://api.api-ninjas.com with an `X-Api-Key` header; get a free key at https://api-ninjas.com/register. Human-readable docs: https://api-ninjas.com/api. Index for LLMs: https://api-ninjas.com/llms.txt.'
version: 1.0.0
contact:
name: API Ninjas
url: https://api-ninjas.com
license:
name: Proprietary
servers:
- url: https://api.api-ninjas.com
description: API Ninjas Production
security:
- ApiKeyAuth: []
tags:
- name: Bible
description: The Bible API returns any verse, passage, chapter or book of the Bible as JSON in over 35 public domain translations in 20 languages, a random verse and the verse of the day, keyword, phrase, Strong's number and meaning-based search, and a quote checker that tells you whether a quote is really in the Bible and where. Every endpoint and parameter is available on every plan.
paths:
/v1/bible:
get:
tags:
- Bible
summary: Get Bible passages, a random verse or the verse of the day
description: Returns Bible passages by reference, in one translation or up to five side by side, a random verse, or the verse of the day. A passage can be a single verse, a range, a whole chapter or a whole book. Provide ref, or set random or daily to true.
operationId: getBiblePassage
parameters:
- name: ref
in: query
required: false
description: 'One or more references separated by commas or semicolons (up to 10): John 3:16, jn 3:16-18, 1 Cor 13:4-7, Psalm 23, Genesis 1-3, Rom 8:28-9:2, John 3:16, 18; 4:1-6, Ruth (a whole book) or Ps 119:1-end. Book names and abbreviations work in English and in the language of each translation (Juan 3:16, Jean 3:16). With random=true, ref sets where the random verse comes from (Psalms, John 14, OT or NT).'
schema:
type: string
example: John 3:16-17
- name: translation
in: query
required: false
description: 'Translation id, or up to 5 comma-separated ids, e.g. bsb,kjv. Default bsb. Ids: bsb, web, kjv, asv, msb, ylt, darby, dra, webster, bbe, geneva, rv, wmb, rv1909, bpm, lsg, ostervald, luther1912, elberfelder, diodati, riveduta, nld1917, synodal, kulish, kralicka, cuv, cuvt, kor1910, vie1923, vandyck, opv, judson, hat, vulgate, wlc, tr, byz.'
schema:
type: string
example: bsb
- name: include_verse_numbers
in: query
required: false
description: true (default) puts each verse number in brackets, e.g. [16], before the verse in text.
schema:
type: boolean
default: true
- name: include_formatting
in: query
required: false
description: true adds per-verse headings, paragraph_start, poetry lines and words_of_jesus, and puts paragraph and line breaks in text.
schema:
type: boolean
default: false
- name: include_footnotes
in: query
required: false
description: true adds each verse's footnotes.
schema:
type: boolean
default: false
- name: include_strongs
in: query
required: false
description: true adds each verse's words with their Strong's numbers, in bsb, kjv, web, asv, wlc, tr and byz.
schema:
type: boolean
default: false
- name: random
in: query
required: false
description: true returns one random verse, from anywhere in the Bible or from within ref.
schema:
type: boolean
default: false
- name: daily
in: query
required: false
description: 'true returns the verse of the day: the same verse for every caller on a given date.'
schema:
type: boolean
default: false
- name: date
in: query
required: false
description: 'With daily=true: the date of the verse of the day (YYYY-MM-DD). Default today.'
schema:
type: string
format: date
- name: tz
in: query
required: false
description: 'With daily=true: the IANA time zone that decides what today is, e.g. America/New_York. Default UTC.'
schema:
type: string
security:
- ApiKeyAuth: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/BiblePassageResponse'
example:
reference: John 3:16–17
passages:
- reference: John 3:16–17
translation:
id: bsb
name: Berean Standard Bible
language: en
book: John
book_code: JHN
text: '[16] For God so loved the world that He gave His one and only Son, that everyone who believes in Him shall not perish but have eternal life. [17] For God did not send His Son into the world to condemn the world, but to save the world through Him.'
verses:
- chapter: 3
verse: 16
text: For God so loved the world that He gave His one and only Son, that everyone who believes in Him shall not perish but have eternal life.
- chapter: 3
verse: 17
text: For God did not send His Son into the world to condemn the world, but to save the world through Him.
previous: John 3:15
next: John 3:18
'400':
description: Bad Request. The body holds a readable error message and a machine-readable code.
content:
application/json:
schema:
$ref: '#/components/schemas/BibleError'
example:
error: John has 21 chapters.
code: INVALID_REFERENCE
'401':
description: Unauthorized
'500':
description: Internal Server Error
/v1/biblesearch:
get:
tags:
- Bible
summary: Search the Bible by keyword, phrase, Strong's number or meaning
description: Searches the Bible by keyword, exact phrase, Strong's number or meaning, and finds verses that are close in meaning to a given verse. Provide q or similar_to.
operationId: searchBible
parameters:
- name: q
in: query
required: false
description: 'What to search for, up to 500 characters: words, a "quoted phrase", OR and NOT, word* for words starting with word, or a Strong''s number such as G26 or H7225.'
schema:
type: string
example: do not worry about tomorrow
maxLength: 500
- name: mode
in: query
required: false
description: keyword (verses with every word), phrase (the exact words in order), semantic (verses with the same meaning) or hybrid (keyword and meaning combined). Default hybrid for English translations and keyword for the others. Meaning-based search understands English queries; other languages use keyword search.
schema:
type: string
enum:
- keyword
- phrase
- semantic
- hybrid
- name: translation
in: query
required: false
description: One translation id. Default bsb.
schema:
type: string
enum:
- bsb
- web
- kjv
- asv
- msb
- ylt
- darby
- dra
- webster
- bbe
- geneva
- rv
- wmb
- rv1909
- bpm
- lsg
- ostervald
- luther1912
- elberfelder
- diodati
- riveduta
- nld1917
- synodal
- kulish
- kralicka
- cuv
- cuvt
- kor1910
- vie1923
- vandyck
- opv
- judson
- hat
- vulgate
- wlc
- tr
- byz
default: bsb
- name: ref
in: query
required: false
description: Search within books, chapters or ranges, e.g. Psalms or Matthew 5-7, or within OT or NT.
schema:
type: string
- name: similar_to
in: query
required: false
description: A reference, e.g. John 3:16. Returns the verses closest in meaning to it, each with a score.
schema:
type: string
- name: limit
in: query
required: false
description: Number of results to return (1-50). Default 10.
schema:
type: integer
minimum: 1
maximum: 50
default: 10
- name: offset
in: query
required: false
description: Number of results to skip, for paging. Default 0.
schema:
type: integer
minimum: 0
default: 0
security:
- ApiKeyAuth: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/BibleSearchResponse'
example:
mode: hybrid
translation:
id: bsb
name: Berean Standard Bible
language: en
query: do not worry about tomorrow
results:
- reference: Matthew 6:34
book: Matthew
book_code: MAT
chapter: 6
verse: 34
text: Therefore do not worry about tomorrow, for tomorrow will worry about itself. Today has enough trouble of its own.
- reference: Proverbs 27:1
book: Proverbs
book_code: PRO
chapter: 27
verse: 1
text: Do not boast about tomorrow, for you do not know what a day may bring.
- reference: Luke 12:29
book: Luke
book_code: LUK
chapter: 12
verse: 29
text: And do not be concerned about what you will eat or drink. Do not worry about it.
'400':
description: Bad Request. The body holds a readable error message and a machine-readable code.
content:
application/json:
schema:
$ref: '#/components/schemas/BibleError'
example:
error: John has 21 chapters.
code: INVALID_REFERENCE
'401':
description: Unauthorized
'500':
description: Internal Server Error
/v1/bibleverify:
get:
tags:
- Bible
summary: Check whether a quote is really in the Bible
description: 'Checks whether a quote is really in the Bible: returns a verdict, where the words actually are, the Bible text, a similarity score and a word-by-word comparison, and flags quotes attributed to the wrong verse. With text, finds every Bible reference in a block of text and checks the quotation next to each one. Provide quote or text.'
operationId: verifyBibleQuote
parameters:
- name: quote
in: query
required: false
description: The quoted words to check, up to 2,000 characters. Three or more words give the most reliable result. Provide quote or text.
schema:
type: string
example: For God so loved the world that he gave his one and only Son
maxLength: 2000
- name: ref
in: query
required: false
description: The reference the quote is attributed to, e.g. John 3:16. When the words are at another reference, the verdict is wrong_reference.
schema:
type: string
example: Romans 3:23
- name: translation
in: query
required: false
description: 'Translation ids to check against, comma-separated, e.g. kjv or kjv,web. Default: every translation in the quote''s language.'
schema:
type: string
- name: text
in: query
required: false
description: A block of text up to 20,000 characters. Every reference written as book chapter:verse is found and the quotation next to it is checked. Send long text with POST.
schema:
type: string
maxLength: 20000
security:
- ApiKeyAuth: []
responses:
'200':
description: 'Successful response: a quote check, or count and references for text.'
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/BibleVerifyResponse'
- $ref: '#/components/schemas/BibleVerifyTextResponse'
example:
quote: For God so loved the world that he gave his one and only Son
claimed_reference: Romans 3:23
verdict: wrong_reference
reference: John 3:16
translation:
id: bsb
name: Berean Standard Bible
language: en
bible_text: For God so loved the world that He gave His one and only Son, that everyone who believes in Him shall not perish but have eternal life.
similarity: 1
diff:
- type: same
text: for god so loved the world that he gave his one and only son
other_matches:
- reference: John 3:16
translation: msb
similarity: 1
- reference: John 3:16
translation: kjv
similarity: 0.857
- reference: John 3:16
translation: web
similarity: 0.857
'400':
description: Bad Request. The body holds a readable error message and a machine-readable code.
content:
application/json:
schema:
$ref: '#/components/schemas/BibleError'
example:
error: John has 21 chapters.
code: INVALID_REFERENCE
'401':
description: Unauthorized
'500':
description: Internal Server Error
post:
tags:
- Bible
summary: Check a quote or every quoted reference in a block of text (JSON body)
description: The same check as GET /v1/bibleverify with the parameters in a JSON body. Use it for long text (up to 20,000 characters).
operationId: verifyBibleText
requestBody:
description: Provide quote or text.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BibleVerifyRequest'
security:
- ApiKeyAuth: []
responses:
'200':
description: 'Successful response: count and references for text, or a quote check for quote.'
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/BibleVerifyTextResponse'
- $ref: '#/components/schemas/BibleVerifyResponse'
example:
references:
- reference: John 3:16
start: 3
end: 12
matched_text: John 3:16
valid: true
quote: For God so loved the world that he gave his only Son.
verification:
quote: For God so loved the world that he gave his only Son.
claimed_reference: John 3:16
verdict: minor_variation
reference: John 3:16
translation:
id: kjv
name: King James Version
language: en
bible_text: For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
similarity: 0.923
diff:
- type: same
text: for god so loved the world that he gave his only
- type: missing
bible: begotten
- type: same
text: son
other_matches:
- reference: John 3:16
translation: web
similarity: 0.923
- reference: John 3:16
translation: asv
similarity: 0.923
- reference: John 3:16
translation: bsb
similarity: 0.857
count: 1
'400':
description: Bad Request. The body holds a readable error message and a machine-readable code.
content:
application/json:
schema:
$ref: '#/components/schemas/BibleError'
example:
error: John has 21 chapters.
code: INVALID_REFERENCE
'401':
description: Unauthorized
'500':
description: Internal Server Error
components:
schemas:
BibleOtherMatch:
type: object
properties:
reference:
type: string
translation:
type: string
description: Translation id.
similarity:
type: number
BibleTranslationInfo:
type: object
description: 'The translation: id, name and language code.'
properties:
id:
type: string
example: bsb
description: Translation id.
name:
type: string
example: Berean Standard Bible
language:
type: string
example: en
description: Language code, e.g. en, es or zh-Hans.
BibleDiffRun:
type: object
description: 'A run of words: same (text), changed (quote and bible), missing (bible words the quote leaves out) or extra (quote words not in the Bible text).'
properties:
type:
type: string
enum:
- same
- changed
- missing
- extra
text:
type: string
quote:
type: string
bible:
type: string
BiblePassage:
type: object
properties:
reference:
type: string
example: John 3:16–17
translation:
$ref: '#/components/schemas/BibleTranslationInfo'
book:
type: string
description: Book name in the translation's own language.
example: John
book_code:
type: string
description: Standard three-character book code, the same in every translation.
example: JHN
text:
type: string
description: The whole passage as one string, with verse numbers in brackets unless include_verse_numbers=false.
verses:
type: array
items:
$ref: '#/components/schemas/BibleVerse'
previous:
type:
- string
- 'null'
description: The reference just before the passage (the previous chapter for whole-chapter requests).
example: John 3:15
next:
type:
- string
- 'null'
description: The reference just after the passage (the next chapter for whole-chapter requests).
example: John 3:18
BibleTextReference:
type: object
properties:
reference:
type: string
start:
type: integer
description: Character position in text where the reference starts.
end:
type: integer
description: Character position in text just after the reference.
matched_text:
type: string
description: The reference as written in text.
valid:
type: boolean
description: True when the reference exists.
note:
type: string
description: 'When valid is false: why.'
quote:
type:
- string
- 'null'
description: The quotation next to the reference.
verification:
allOf:
- $ref: '#/components/schemas/BibleVerifyResponse'
description: The check of that quotation, or null when there is no quotation next to the reference.
BibleVerifyResponse:
type: object
properties:
quote:
type: string
claimed_reference:
type:
- string
- 'null'
description: 'When ref is sent: the claimed reference, in standard form.'
verdict:
type: string
enum:
- exact
- partial
- minor_variation
- paraphrase
- wrong_reference
- not_found
- known_non_biblical
description: 'exact: a complete verse word for word. partial: exact words covering part of a verse. minor_variation: a few words differ. paraphrase: same meaning, different wording. wrong_reference: real words at a different reference than ref. not_found: no matching verse. known_non_biblical: a popular saying that is not in the Bible (see note).'
reference:
type:
- string
- 'null'
description: Where the words actually are.
translation:
$ref: '#/components/schemas/BibleTranslationInfo'
bible_text:
type: string
description: The Bible text at reference in that translation.
similarity:
type:
- number
- 'null'
description: How closely the words match bible_text, from 0 to 1.
meaning_similarity:
type: number
description: 'When the quote matches a verse by meaning rather than wording: how close the meaning is, from 0 to 1 (similarity is then null).'
diff:
type: array
description: Word-by-word comparison with bible_text. Omitted for exact matches.
items:
$ref: '#/components/schemas/BibleDiffRun'
other_matches:
type: array
description: Up to three matches in other translations.
items:
$ref: '#/components/schemas/BibleOtherMatch'
note:
type: string
description: An explanation, when useful, e.g. where a known non-biblical saying comes from.
BibleError:
type: object
properties:
error:
type: string
description: A readable error message.
code:
type: string
enum:
- MISSING_PARAMETER
- INVALID_PARAMETER
- INVALID_REFERENCE
- AMBIGUOUS_REFERENCE
- UNKNOWN_TRANSLATION
- TOO_MANY_TRANSLATIONS
- TOO_MANY_REFERENCES
- RANGE_TOO_LARGE
- BOOK_NOT_IN_TRANSLATION
- INVALID_QUERY
- SEMANTIC_NOT_AVAILABLE
- STRONGS_NOT_AVAILABLE
- INVALID_BODY
- NOT_FOUND
- INTERNAL_ERROR
BibleWarning:
type: object
properties:
code:
type: string
enum:
- VERSE_NOT_IN_TRANSLATION
- NUMBERING_DIFFERS
- BOOK_NOT_IN_TRANSLATION
- RANGE_CLAMPED
- PARTIAL_VERSE
- OPEN_RANGE
- PARTIAL_MATCH
- SEMANTIC_NOT_AVAILABLE
message:
type: string
BibleVerse:
type: object
properties:
chapter:
type: integer
example: 3
verse:
type: integer
example: 16
verse_end:
type: integer
description: When a translation combines several verses into one, the last verse number it covers.
text:
type: string
description: The verse text.
headings:
type: array
description: 'With include_formatting=true: headings before the verse.'
items:
type: object
properties:
type:
type: string
enum:
- section
- subsection
- major
- psalm_title
- speaker
- acrostic
text:
type: string
paragraph_start:
type: boolean
description: 'With include_formatting=true: true when a new paragraph starts at this verse.'
lines:
type: array
description: 'With include_formatting=true: poetry lines.'
items:
type: object
properties:
text:
type: string
indent:
type: integer
words_of_jesus:
type: array
description: 'With include_formatting=true, in red-letter translations such as kjv and web: the words of Jesus as character positions in the verse text.'
items:
type: object
properties:
start:
type: integer
end:
type: integer
text:
type: string
footnotes:
type: array
items:
type: string
description: 'With include_footnotes=true: the verse''s footnotes.'
words:
type: array
description: 'With include_strongs=true: the verse''s words in order with their Strong''s numbers.'
items:
type: object
properties:
text:
type: string
strongs:
type: array
items:
type: string
example:
- G25
BibleVerifyTextResponse:
type: object
properties:
count:
type: integer
description: Number of references found.
references:
type: array
items:
$ref: '#/components/schemas/BibleTextReference'
BibleSearchResult:
type: object
properties:
reference:
type: string
example: Matthew 6:34
book:
type: string
example: Matthew
book_code:
type: string
example: MAT
chapter:
type: integer
example: 6
verse:
type: integer
example: 34
text:
type: string
score:
type: number
description: 'For semantic and similar_to searches: how close the verse is in meaning (higher is closer, 1 is the maximum).'
BibleSearchResponse:
type: object
properties:
query:
type: string
description: The search query, when q is used.
similar_to:
type: string
description: The reference, when similar_to is used.
mode:
type: string
enum:
- keyword
- phrase
- semantic
- hybrid
- strongs
- similar
description: The search mode used.
translation:
$ref: '#/components/schemas/BibleTranslationInfo'
total:
type: integer
description: Total number of matching verses, for keyword, phrase and Strong's number searches.
results:
type: array
items:
$ref: '#/components/schemas/BibleSearchResult'
warnings:
type: array
items:
$ref: '#/components/schemas/BibleWarning'
BibleVerifyRequest:
type: object
description: The same parameters as the GET request. Provide quote or text.
properties:
quote:
type: string
maxLength: 2000
description: The quoted words to check, up to 2,000 characters.
ref:
type: string
description: The reference the quote is attributed to.
translation:
type: string
description: Translation ids to check against, comma-separated.
text:
type: string
maxLength: 20000
description: 'A block of text up to 20,000 characters: every book chapter:verse reference is found and the quotation next to it is checked.'
example:
text: 'In John 3:16 we read: "For God so loved the world that he gave his only Son."'
BiblePassageResponse:
type: object
properties:
reference:
type: string
description: The references returned, in standard form, separated by "; ".
example: John 3:16–17
date:
type: string
format: date
description: 'With daily=true: the date of the verse of the day.'
passages:
type: array
description: One passage for each reference and translation, in the order requested.
items:
$ref: '#/components/schemas/BiblePassage'
warnings:
type: array
items:
$ref: '#/components/schemas/BibleWarning'
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-Api-Key
externalDocs:
description: API Ninjas documentation
url: https://api-ninjas.com/api