BYTETOOLS

Affirmations.dev API

Free affirmations API with no key: returns a random positive affirmation as a one-field JSON object. Minimal payload, ideal for wellbeing apps. Tested.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 20 Aug 2026

What is the Affirmations.dev API?

Affirmations.dev is a free, key-free API that returns a random positive affirmation as a JSON object with a single `affirmation` field.

This is about as small as a useful API gets: one endpoint, no parameters, one field. It serves short positive statements intended for wellbeing and mindfulness applications.

The minimal surface makes it a good teaching example, and a genuinely practical one for daily-prompt features where you want fresh copy without writing and maintaining it yourself.

Quick facts

Base URL
https://www.affirmations.dev
Authentication
No API key required.
Rate limit
No published limit.
Pricing
Free and open source.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the Affirmations.dev API

Every request below was executed against the live API on 20 Aug 2026, and the response shown is the real body it returned — not an illustration.

1. Fetch a random affirmation

GET https://www.affirmations.dev/

curl
curl 'https://www.affirmations.dev/'
JavaScript (fetch)
const res = await fetch("https://www.affirmations.dev/");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://www.affirmations.dev/", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "affirmation": "The path to success is to take massive, determined action"
}

Response fields

affirmationstring
The affirmation text. That is the entire response.

What you can build with the Affirmations.dev API

  • Add a daily affirmation to a wellbeing or journaling app
  • Display an encouraging message on a dashboard
  • Build a mindfulness widget or browser extension
  • Teach fetch with a minimal, friendly payload

Common errors and how to fix them

Repeated affirmations

The pool is finite.

Fix: Expect repeats over many calls; deduplicate client-side if it matters.

CORS considerations

Check headers before calling from the browser.

Fix: Proxy through your server if the browser blocks it.

Affirmations.dev API — frequently asked questions

Is the Affirmations API free?

Yes, completely free and open source with no API key, rate limit or signup.

What does it return?

A JSON object with a single `affirmation` field containing a short positive statement. There is nothing else.

Can I filter by category or mood?

No, it has one endpoint with no parameters. For categorised content you would need a different service or your own curated set.

Is it suitable for a production wellbeing app?

For a light daily-prompt feature, yes. If affirmations are core to your product you would want your own curated content rather than depending on a third party.

Tools that pair with this API

Alternatives to Affirmations.dev API

If Affirmations.dev does not fit, these entertainment apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.

APIWhat it doesAuthCORSLast verified
Official Joke APIFree joke API with no key: random jokes with setup and punchline, filterable by type. Perfect for beginner projects. Tested curl example and live JSON.No keyYes19 Aug 2026
icanhazdadjokeFree dad joke API with no key. Returns jokes as JSON, plain text or image depending on the Accept header. Search supported. Tested curl example included.No keyYes19 Aug 2026
chucknorris.ioFree Chuck Norris jokes API with no key. Random jokes, 16 categories and full-text search. CORS enabled. Tested curl example and live JSON response.No keyYes19 Aug 2026
Advice SlipFree advice API with no key. Returns random advice slips as JSON, with search and id lookup. CORS enabled. Tested curl example and live response.No keyYes19 Aug 2026
AnimechanAnimechan is a free anime quotes API with no key: random quotes plus queryable anime and character indexes, so you can filter rather than only shuffle. Live example included.No keyYes21 Aug 2026
Corporate BS GeneratorFree corporate buzzword API with no key: generates plausible business jargon phrases. Useful for placeholder copy and demo data. Tested curl example.No keyNo20 Aug 2026
All Entertainment APIs

Affirmations.dev is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 20 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.