Works
Read a Work by Reference
The units of a reference, in order, at most 200: one verse or passage, a short range of up to 50, or a whole chapter. Each has its link. The prefix of the reference is optional: for the Bhagavad Gita, BG 2.47 and 2.47 are the same; for the Bible, name the book (John 3:16, Jn 3:16). With lang=es the catalog words are Spanish (an AI translation, CC0), and the text stays English (textLanguage).
GET
/
works
/
{work}
/
{ref}
Read a work by reference
curl --request GET \
--url https://api.urantia.dev/works/{work}/{ref}import requests
url = "https://api.urantia.dev/works/{work}/{ref}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.urantia.dev/works/{work}/{ref}', 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/works/{work}/{ref}",
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/works/{work}/{ref}"
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/works/{work}/{ref}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.urantia.dev/works/{work}/{ref}")
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": [
{
"work": {
"id": "bhagavad-gita",
"title": "The Bhagavad Gita",
"tradition": "Hindu",
"textLanguage": "eng"
},
"reference": "BG 2.47",
"text": "Thy business is with the action only, never with its fruits; so let not the fruit of action be thy motive, nor be thou to inaction attached.",
"url": "https://en.wikisource.org/wiki/Bhagavad-Gita_(Besant_4th)/Discourse_2#:~:text=Thy%20business%20is%20with",
"urantiaParallels": []
}
]
}{
"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"
}{
"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.
Available options:
eng, es, fr, pt, de, ko ⌘I
Read a work by reference
curl --request GET \
--url https://api.urantia.dev/works/{work}/{ref}import requests
url = "https://api.urantia.dev/works/{work}/{ref}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.urantia.dev/works/{work}/{ref}', 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/works/{work}/{ref}",
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/works/{work}/{ref}"
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/works/{work}/{ref}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.urantia.dev/works/{work}/{ref}")
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": [
{
"work": {
"id": "bhagavad-gita",
"title": "The Bhagavad Gita",
"tradition": "Hindu",
"textLanguage": "eng"
},
"reference": "BG 2.47",
"text": "Thy business is with the action only, never with its fruits; so let not the fruit of action be thy motive, nor be thou to inaction attached.",
"url": "https://en.wikisource.org/wiki/Bhagavad-Gita_(Besant_4th)/Discourse_2#:~:text=Thy%20business%20is%20with",
"urantiaParallels": []
}
]
}{
"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"
}{
"type": "https://urantia.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Paragraph not found"
}
