Get a Text and Its Chapters
Returns the corpus facts, its divisions (chapters, or books for the Analects), each with its first and last reference, and its reading pages: a division, or for a work with three reference levels (the Rig Veda, the Book of Mormon) a subdivision such as a hymn or a chapter. The corpus accepts its id, slug, or ref prefix: bhagavad-gita, bg, and bhagavad-gita-besant-1922 all work. With lang=es the catalog words are Spanish (an AI translation, CC0), and the text stays English (textLanguage).
curl --request GET \
--url https://api.urantia.dev/scriptures/{corpus}import requests
url = "https://api.urantia.dev/scriptures/{corpus}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.urantia.dev/scriptures/{corpus}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.urantia.dev/scriptures/{corpus}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.urantia.dev/scriptures/{corpus}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.urantia.dev/scriptures/{corpus}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.urantia.dev/scriptures/{corpus}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"id": "bhagavad-gita-besant-1922",
"slug": "bhagavad-gita",
"religion": "Hindu",
"title": "The Bhagavad Gita",
"translator": "Annie Besant (4th edition)",
"year": 1922,
"refPrefix": "BG",
"urantiaSection": "131:4",
"sourceUrl": "https://en.wikisource.org/wiki/Bhagavad-Gita_(Besant_4th)",
"license": "Public domain in the United States",
"divisionLabel": "chapter",
"unitLabel": "verse",
"passageCount": 701,
"refLevels": 2,
"notes": null,
"textLanguage": "eng",
"divisions": [
{
"division": 1,
"title": null,
"firstRef": "BG 1.1",
"lastRef": "BG 1.47",
"passageCount": 47
},
{
"division": 2,
"title": null,
"firstRef": "BG 2.1",
"lastRef": "BG 2.72",
"passageCount": 72
}
],
"pages": [
{
"division": 1,
"subdivision": null,
"title": null,
"firstRef": "BG 1.1",
"lastRef": "BG 1.47",
"passageCount": 47
},
{
"division": 2,
"subdivision": null,
"title": null,
"firstRef": "BG 2.1",
"lastRef": "BG 2.72",
"passageCount": 72
}
]
}
}{
"type": "https://urantia.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Paragraph not found"
}{
"type": "https://urantia.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Paragraph not found"
}{
"type": "https://urantia.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Paragraph not found"
}Path Parameters
Query Parameters
Language of the catalog words: titles, traditions, summaries, unit and division labels, chapter titles, and Bible book names. es gives them in Spanish: an AI translation, released as CC0, with a catalogTranslation label. The text of each work stays English (textLanguage). A word with no Spanish stays English, and the other languages give English.
eng, es, fr, pt, de, ko curl --request GET \
--url https://api.urantia.dev/scriptures/{corpus}import requests
url = "https://api.urantia.dev/scriptures/{corpus}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.urantia.dev/scriptures/{corpus}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.urantia.dev/scriptures/{corpus}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.urantia.dev/scriptures/{corpus}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.urantia.dev/scriptures/{corpus}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.urantia.dev/scriptures/{corpus}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"id": "bhagavad-gita-besant-1922",
"slug": "bhagavad-gita",
"religion": "Hindu",
"title": "The Bhagavad Gita",
"translator": "Annie Besant (4th edition)",
"year": 1922,
"refPrefix": "BG",
"urantiaSection": "131:4",
"sourceUrl": "https://en.wikisource.org/wiki/Bhagavad-Gita_(Besant_4th)",
"license": "Public domain in the United States",
"divisionLabel": "chapter",
"unitLabel": "verse",
"passageCount": 701,
"refLevels": 2,
"notes": null,
"textLanguage": "eng",
"divisions": [
{
"division": 1,
"title": null,
"firstRef": "BG 1.1",
"lastRef": "BG 1.47",
"passageCount": 47
},
{
"division": 2,
"title": null,
"firstRef": "BG 2.1",
"lastRef": "BG 2.72",
"passageCount": 72
}
],
"pages": [
{
"division": 1,
"subdivision": null,
"title": null,
"firstRef": "BG 1.1",
"lastRef": "BG 1.47",
"passageCount": 47
},
{
"division": 2,
"subdivision": null,
"title": null,
"firstRef": "BG 2.1",
"lastRef": "BG 2.72",
"passageCount": 72
}
]
}
}{
"type": "https://urantia.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Paragraph not found"
}{
"type": "https://urantia.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Paragraph not found"
}{
"type": "https://urantia.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Paragraph not found"
}
