Advice Slip API
Free advice API with no key. Returns random advice slips as JSON, with search and id lookup. CORS enabled. Tested curl example and live response.
Endpoint tested and returned HTTP 200 on 19 Aug 2026
What is the Advice Slip API?
The Advice Slip API is a free, key-free API that returns random pieces of advice as JSON. It also supports fetching a specific slip by id and searching the advice database by keyword.
The Advice Slip API returns a single short piece of advice per request, wrapped in a `slip` object with an id and the text. Its simplicity is the appeal — it is one of the smallest useful JSON payloads available for teaching HTTP requests.
One quirk is worth knowing before you build against it: the API caches aggressively, so rapid repeated calls to `/advice` can return the same slip. Appending a cache-busting query parameter is the usual workaround when you genuinely need a fresh result each time.
Quick facts
- Base URL
https://api.adviceslip.com- Authentication
- No key required.
- Rate limit
- No published limit, but responses are cached.
- Pricing
- Free.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Advice Slip API
Every request below was executed against the live API on 19 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. Fetch a random piece of advice
GET https://api.adviceslip.com/advice
curl 'https://api.adviceslip.com/advice'const res = await fetch("https://api.adviceslip.com/advice");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.adviceslip.com/advice", timeout=20)
res.raise_for_status()
print(res.json()){
"slip": {
"id": 172,
"advice": "If it still itches after a week, go to the doctors."
}
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
<id> | path | Optional | Fetch a specific slip with /advice/{id}. 42 |
<query> | path | Optional | Search with /advice/search/{query}. love |
Response fields
slip.idinteger- Identifier of the advice slip.
slip.advicestring- The advice text itself.
What you can build with the Advice Slip API
- Show a daily advice card on a homepage or dashboard
- Build a beginner project demonstrating fetch and JSON parsing
- Add an advice command to a chat bot
- Practise handling nested JSON, since the payload wraps data in a `slip` object
Common errors and how to fix them
Same advice repeatedly
Responses are cached by the API and by intermediaries.
Fix: Append a cache-busting parameter such as ?t=<timestamp> when you need a genuinely new slip.
message.text instead of slip
A search returned no results; the shape changes.
Fix: Check whether `slip` exists before reading it — the error shape is different from the success shape.
Advice Slip API — frequently asked questions
Why does the Advice Slip API keep returning the same advice?
It caches responses aggressively. Add a cache-busting query parameter such as a timestamp to force a fresh slip on each call.
Is the Advice Slip API free?
Yes, completely free with no API key or signup.
Can I search for advice on a topic?
Yes, use /advice/search/{query}. Note that when nothing matches, the response shape changes to a `message` object rather than returning an empty list.
Why is the data nested inside a slip object?
The API wraps every response in a container object. It is a small thing, but it makes this a useful example for teaching nested JSON access.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Word Counter
Count words, characters, sentences, paragraphs and estimated reading time instantly. Free online word counter for essays, blogs and social media.
Alternatives to Advice Slip API
If Advice Slip 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.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| Official Joke API | Free 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 key | Yes | 19 Aug 2026 |
| icanhazdadjoke | Free 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 key | Yes | 19 Aug 2026 |
| chucknorris.io | Free 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 key | Yes | 19 Aug 2026 |
| Open Trivia Database | Free trivia and quiz API with no key: 24 categories, three difficulty levels, multiple choice and true/false questions. Tested curl example and live JSON. | No key | Yes | 19 Aug 2026 |
| Affirmations.dev | 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 key | No | 20 Aug 2026 |
| Animechan | Animechan 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 key | Yes | 21 Aug 2026 |
Advice Slip is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 19 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.