Readcrumbs API
A simple JSON API to pull Today’s Quote, react to it, and import the source document into your library. This page is public; endpoints require you to be signed in (session cookie) and to send the correct headers.
Base URL & Headers
Base: https://read-crumbs.com
Always send: Accept: application/json.
For POSTs also include Content-Type: application/json.
curl -H 'Accept: application/json' /quotes/today
Get Today’s Quote
Returns the current quote plus your prior reaction (if any) and import info for the source document.
GET /quotes/today
# Example (JavaScript)
fetch('/quotes/today', {
headers: { 'Accept': 'application/json' },
credentials: 'include' // use your session
}).then(r => r.json()).then(console.log)
React to a Quote
Set or update your reaction. Valid reactions: like, meh, dislike. Comment optional.
POST /quotes/:id/reactions
Headers:
Accept: application/json
Content-Type: application/json
Body:
{
"reaction": "like",
"comment": "Inspiring!"
}
# Example (curl)
curl -X POST '/quotes/123/reactions' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"reaction":"like","comment":"Inspiring!"}' \
-b 'your_session_cookie_here'
Import the Source Document
Imports the quote’s source into your Docs if available. Calling again is idempotent and returns the existing document path.
POST /quotes/:id/import
Headers:
Accept: application/json
# Example (curl)
curl -X POST '/quotes/123/import' \
-H 'Accept: application/json' \
-b 'your_session_cookie_here'
Success payload contains status (imported or already_exists),
a document_path to open in the app, and an import object with details.
Auth & Errors
- Endpoints use your existing session. Log in, then call with
credentials: include(fetch) or a cookie jar (curl/browser). - Unauthenticated requests return
401with JSON. - Unavailable sources return
422with anerrormessage.
SDK Quickies
// JS fetch (session cookie)
const r = await fetch('/quotes/today', {
headers: { 'Accept': 'application/json' },
credentials: 'include'
});
console.log(await r.json());
// Ruby (Net::HTTP) with cookie
require 'net/http'
uri = URI('/quotes/today')
req = Net::HTTP::Get.new(uri)
req['Accept'] = 'application/json'
req['Cookie'] = 'your_session_cookie_here'
puts Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') { |h| h.request(req).body }