API Directory › 📚 Data, Text & Words › ZenQuotes
No authHTTPSCORS

ZenQuotes API

Free inspirational quotes API with random and quote-of-the-day endpoints.

Auth
No auth needed
HTTPS
Yes
CORS
Yes
Open ZenQuotes docs ↗

What it does

ZenQuotes is an inspirational-quotes API: a random quote, the ‘quote of the day’, a batch of 50 random quotes, and (paid) quotes by keyword or author. Responses are a small JSON array.

Base URL

https://zenquotes.io/api

Authentication

None for the free endpoints (/random, /today, /quotes). Free use requires attribution — a visible hyperlink to zenquotes.io near where you display the quote. An API key (paid) removes attribution and rate limits and unlocks keyword/author search.

Code examples

curl
curl -s https://zenquotes.io/api/random
curl -s https://zenquotes.io/api/today
Python
import requests

q = requests.get("https://zenquotes.io/api/random", timeout=10).json()[0]
print(f'"{q["q"]}" - {q["a"]}')

Rate limits & quotas

Free tier: 5 requests per 30 seconds per IP — over that, the array contains a single object whose q is a ‘too many requests’ message. The /quotes endpoint returns 50 at once, so fetch a batch and rotate through it client-side rather than calling /random repeatedly.

Key response fields

[].qThe quote text
[].aThe author
[].hPre-formatted HTML blockquote (includes the required attribution when used as-is)
[].cCharacter count (some endpoints)

Common errors

(rate-limit sentinel)A 200 response whose q reads ‘Too many requests. Obtain an auth key...’ — you exceeded 5/30s.
(missing attribution)Not an API error, but a terms violation on the free tier — show the zenquotes.io link.
429Sometimes returned instead of the sentinel — treat both as ‘back off’.

When to use it (and alternatives)

A quick hosted option for quote-of-the-day features and motivational widgets, as long as you can show the attribution link. If you need to avoid the backlink or want topic filtering without paying, self-host Quotable.

FAQ

Why does my quote say 'Too many requests'?

The free limit is 5 requests per 30 seconds per IP. Call /quotes once for 50 quotes and cycle through them, or cache /today for the day.

Do I have to link back to ZenQuotes?

Yes, on the free tier — a visible hyperlink to zenquotes.io is required. Using the provided h (HTML) field verbatim satisfies this.

Can I search quotes by topic?

Only with a paid API key (/keyword/{word}, /author/{name}). The free endpoints are random / today / batch only.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

Word CounterJSON Formatter

Related Data, Text & Words APIs

← Back

More Data, Text & Words APIs · All 196 APIs