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).
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"
},
"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
"bible", or a work id such as "bhagavad-gita" (its ref prefix also works: "bg").
Required string length:
1 - 64A unit (John 3:16, 2.47, Dhp 183), a short range (John 3:16-18, 2.47-49), or a whole chapter (John 3, 2).
Required string length:
1 - 40Response
The units
Show child attributes
Show child attributes
⌘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"
},
"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"
}
