Skip to main content
This tutorial shows you how to build a bot that fetches random inspiring quotes from the Urantia Book and shares them daily via Discord, Slack, email, or social media. Takes ~10 minutes to build.

Try the Live Demo

See the random quote feature in action at demo.urantia.dev

What You’ll Build

A bot that:
  1. Fetches a random paragraph from the Urantia Book
  2. Formats it with the reference citation
  3. Posts it to your chosen platform (Discord, Slack, email, etc.)
No API key needed — the Urantia API is completely free.

Prerequisites

  • Node.js 18+ or Python 3.10+
  • A platform to post to (Discord webhook, Slack webhook, email service, etc.)

The Complete Code

How It Works

1. Fetch a Random Paragraph

Returns a random paragraph with:
  • text — The paragraph content
  • standardReferenceId — Citation (e.g., “107:0.1”)
  • paperTitle — The paper’s title
  • paperId, sectionId, paragraphId — Numeric IDs

2. Format for Your Platform

The examples above show Discord and Slack formatting. Adapt for your platform:

Schedule It to Run Daily

Create .github/workflows/daily-quote.yml:
Add your webhook URL to repository secrets.

Enhance Your Bot

1. Filter by Topic

Search for quotes about specific topics instead of random:

2. Add Audio

Every paragraph has audio narration:

3. Track Quote History

Store sent quotes to avoid duplicates:

4. Theme Days

Rotate topics by day of week:

Next Steps

Use Cases

More ideas for what you can build with the API

Search Endpoint

Full documentation for the search endpoint

Interactive Demo

Try the API features live

Build an AI Chatbot

Next-level tutorial: RAG-powered Urantia chatbot

Troubleshooting

Rate limits: The API allows 100 requests/minute per IP. For a daily bot, this is more than enough. If you hit limits, add retry logic with exponential backoff. Quote is too long: Some paragraphs are lengthy. Truncate with text.substring(0, 300) + '...' or filter by character count before posting. Want specific topics? Use the curated quote collections as inspiration — each has 20 hand-picked quotes organized by theme.

Source Code

Full working example with tests and multiple platforms:
Questions? The API is fully documented at urantia.dev and the source code is MIT-licensed at github.com/urantia-hub.