ScriptureFlow Developer Portal / Examples

Developer code examples

Copy-ready browser, cURL, JavaScript, and Python requests for the ScriptureFlow public developer preview API.

Before you start

No API key is required during public preview.

Browser examples

Open any URL directly to inspect its JSON response.

List translations

https://scriptureflow-api-preview.pages.dev/translations.json

Get John 3:16

https://scriptureflow-api-preview.pages.dev/api/verse?version=en-kjv&reference=John%203%3A16

Get Amos 8:4–6

https://scriptureflow-api-preview.pages.dev/api/verse?version=en-kjv&book=Amos&chapter=8&verse=4&end_verse=6

Get Quick Verse

https://scriptureflow-api-preview.pages.dev/api/quick-verse?version=en-kjv

Get generated Verse of the Day

https://scriptureflow-api-preview.pages.dev/en-kjv/random.json

cURL examples

--fail-with-body makes HTTP failures visible and returns a non-zero exit code.

curl --fail-with-body --silent --show-error \
  "https://scriptureflow-api-preview.pages.dev/translations.json"

curl --fail-with-body --silent --show-error \
  "https://scriptureflow-api-preview.pages.dev/api/verse?version=en-kjv&reference=John%203%3A16"

curl --fail-with-body --silent --show-error \
  "https://scriptureflow-api-preview.pages.dev/api/verse?version=en-kjv&book=Amos&chapter=8&verse=4&end_verse=6"

curl --fail-with-body --silent --show-error \
  "https://scriptureflow-api-preview.pages.dev/api/quick-verse?version=en-kjv"

curl --fail-with-body --silent --show-error \
  "https://scriptureflow-api-preview.pages.dev/en-kjv/random.json"

Browse the public cURL files or open the cURL README directly.

JavaScript

Node.js 18+ includes fetch and URLSearchParams, so no dependency is required.

const params = new URLSearchParams({
  version: "en-kjv",
  reference: "John 3:16",
});

const response = await fetch(
  `https://scriptureflow-api-preview.pages.dev/api/verse?${params}`
);

if (!response.ok) {
  throw new Error(`HTTP ${response.status} ${response.statusText}`);
}

const data = await response.json();
if (data.ok !== true) {
  throw new Error(data.error || "Unknown ScriptureFlow API error");
}

console.log(`${data.reference} (${data.version})`);
console.log(data.text);

Browse the public JavaScript files: get-verse.js and quick-verse.js.

Python

This standard-library example uses urllib.request and urllib.parse.

import json
from urllib.parse import urlencode
from urllib.request import urlopen

query = urlencode({
    "version": "en-kjv",
    "reference": "John 3:16",
})
url = f"https://scriptureflow-api-preview.pages.dev/api/verse?{query}"

with urlopen(url, timeout=30) as response:
    if not 200 <= response.status < 300:
        raise RuntimeError(f"HTTP {response.status}")
    data = json.load(response)

if data.get("ok") is not True:
    raise RuntimeError(data.get("error", "Unknown ScriptureFlow API error"))

print(f"{data['reference']} ({data['version']})")
print(data["text"])

Browse the public Python files: get_verse.py and quick_verse.py.

Quick Verse behavior

/api/quick-verse selects a verse at request time and may return a different verse between runs. The generated /en-kjv/random.json resource is the translation’s published Verse of the Day.

n8n workflow files

Open or download the importable workflow JSON directly from the public docs site:

Read the n8n import and configuration guide.