Bezplatné API pre Bibliu

„Zadarmo ste dostali, zadarmo dávajte.”
- Matúš 10:8b (SEB)

Cieľom nášho Biblického API je poskytnúť preklady Biblie tak otvorené a prístupné ako je len možné. Používajte ho vo vašich projektoch, webových aplikáciách, mobilných aplikáciách a počítačových programoch. API podporuje formát JSON. Nie je tu žiadne obmedzenie na používanie, jedine biblický text ponechajte nezmenený. Pre začiatok používania API, navštívte tento odkaz: https://bible4u.net/api/v1.

Podporované formáty

Momentálne, nasledovné formáty sú podporované: JSON (pôvodný), XML a Yaml. Pre odpoveď v požadovanom formáte, použite parameter ?format=<hodnota>, pričom <hodnota> je json, xml alebo yaml. Príklad: https://bible4u.net/api/v1?format=xml

Prípady použitia

Získanie zoznamu podporovaných Biblií

Ukážka požiadavky

GET https://bible4u.net/api/v1/bibles HTTP/1.1
Accept: application/json
Ukážka odpovede

{
  "data": [
    {
      "apiUrl": "https://bible4u.net/api/v1/bibles/KJV",
      "copytightInfo": "",
      "langId": "en",
      "language": "English (EN)",
      "name": "King James Version (KJV)",
      "publisher": "Public Domain",
      "ref": "KJV"
    },
    {
      "apiUrl": "https://bible4u.net/api/v1/bibles/RNKJV",
      "copytightInfo": "",
      "langId": "en",
      "language": "English (EN)",
      "name": "Restored Name King James Version",
      "publisher": "Public Domain",
      "ref": "RNKJV"
    }
  ],
  "success": true
}
                
Získanie informácií o kníh Biblie

Ukážka požiadavky

GET https://bible4u.net/api/v1/bibles/KJV HTTP/1.1
Accept: application/json
Ukážka odpovede

{
  "data": {
    "apiUrl": "https://bible4u.net/api/v1/bibles/KJV",
    "books": [
      {
        "apiUrl": "https://bible4u.net/api/v1/bibles/KJV/books/Gen",
        "chaptersCount": 50,
        "name": "Genesis",
        "order": 0,
        "ref": "Gen"
      },
      ...
    ],
    "copytightInfo": "",
    "langId": "en",
    "language": "English (EN)",
    "name": "King James Version (KJV)",
    "publisher": "Public Domain",
    "ref": "KJV"
  },
  "success": true
}
Získanie veršov z knihy Biblie

Ukážka požiadavky

GET https://bible4u.net/api/v1/bibles/KJV/books/Gen/chapters/1 HTTP/1.1
Accept: application/json
Ukážka odpovede

{
  "data": {
    "apiUrl": "https://bible4u.net/api/v1/bibles/KJV/books/Gen/chapters/1",
    "ref": 1,
    "verses": [
      {
        "ref": "1",
        "text": "In the beginning God created the heaven and the earth."
      },
      {
        "ref": "2",
        "text": "And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters."
      },
      ...
    ]
  },
  "success": true
}
Získanie konkrétnej pasáže z Biblie

Ukážka požiadavky

GET https://bible4u.net/api/v1/passage/KJV/Gen?start-chapter=1&start-verse=1&end-verse=5 HTTP/1.1
Accept: application/json
Ukážka odpovede

{
  "data": {
    "bibleRef": "KJV",
    "bookRef": "Gen",
    "endChapter": 1,
    "endVerse": 5,
    "startChapter": 1,
    "startVerse": 1,
    "verses": [
      {
        "chapter": 1,
        "text": "In the beginning God created the heaven and the earth.",
        "verse": 1
      },
      {
        "chapter": 1,
        "text": "And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters.",
        "verse": 2
      },
      {
        "chapter": 1,
        "text": "And God said, Let there be light: and there was light.",
        "verse": 3
      },
      {
        "chapter": 1,
        "text": "And God saw the light, that it was good: and God divided the light from the darkness.",
        "verse": 4
      },
      {
        "chapter": 1,
        "text": "And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.",
        "verse": 5
      }
    ]
  },
  "success": true
}