API Directory › 🎉 Fun & Random › Advice Slip
No authHTTPSCORS

Advice Slip API

Random pieces of advice served as JSON — free and no key.

Auth
No auth needed
HTTPS
Yes
CORS
Yes
Open Advice Slip docs ↗

What it does

The Advice Slip API returns a random piece of (often tongue-in-cheek) advice, a specific slip by id, or the results of a keyword search across the advice database.

Base URL

https://api.adviceslip.com

Authentication

None. /advice (random), /advice/{id}, /advice/search/{query}.

Code examples

curl
curl -s https://api.adviceslip.com/advice
curl -s https://api.adviceslip.com/advice/search/money
JavaScript
const { slip } = await fetch("https://api.adviceslip.com/advice").then(r => r.json());
console.log(slip.advice);

Rate limits & quotas

No key. The random endpoint is cached for a couple of seconds per client, so calling it in a tight loop returns the same slip — add a cache-buster query param or just wait. No hard rate limit documented.

Key response fields

slip.idThe slip’s id
slip.adviceThe advice text
(search) slips[]Array of matching slips
(search) total_resultsNumber of matches (as a string)
message.textPresent instead of slips when a search finds nothing

Common errors

(search miss)Returns {"message": {"type": "notice", "text": "No advice slips found..."}} — not an HTTP error.
(same result repeatedly)The 2-second cache on /advice — append ?t=Date.now().
500Rare — retry.

When to use it (and alternatives)

A one-line filler for a ‘random advice’ button, a CLI fortune command or a loading screen. Similar tiny text APIs: Affirmations, Useless Facts, ZenQuotes.

FAQ

Why do I keep getting the same advice?

The /advice endpoint is cached ~2 seconds per client. Add a unique query parameter (?t=timestamp) or space your calls out.

How does search work?

/advice/search/{query} does a substring match and returns a slips array. If nothing matches you get a message object instead — check which key is present.

Is there a total count of slips?

Not exposed directly, but ids are roughly sequential, so /advice/{n} for increasing n lets you walk the set.

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.

JSON Formatter

Related Fun & Random APIs

← Back

More Fun & Random APIs · All 196 APIs