API Directory › 🐾 Animals › Random Duck
No authHTTPSCORS

Random Duck API

Random duck images (and gifs) from a free, no-key API.

Category
Auth
No auth needed
HTTPS
Yes
CORS
Yes
Open Random Duck docs ↗

What it does

Random Duck (random-d.uck.nl) returns a random duck image — JPEG, PNG or GIF — via a small JSON endpoint or direct image paths. It also has a fun /quack endpoint.

Base URL

https://random-d.uck.nl/api

Authentication

None. /api/random → {"message": "...", "url": "https://random-d.uck.nl/uploads/N.jpg"}. Also /api/random?type=png, /api/quack, /api/{id}.jpg, /api/list.

Code examples

curl
curl -s https://random-d.uck.nl/api/random
curl -s "https://random-d.uck.nl/api/random?type=gif"
JavaScript
const { url } = await fetch("https://random-d.uck.nl/api/random").then(r => r.json());
img.src = url;

Rate limits & quotas

No documented rate limit. Finite image set (a few hundred). type can be png, jpg or gif; omit it for any type.

Key response fields

urlDirect image URL
messageA friendly status string
(/api/list) images[]All available image filenames

Common errors

404Unknown {id} in /api/{id}.jpg.
(type mismatch)Asking for type=gif returns only GIFs — a smaller pool.

When to use it (and alternatives)

A cheerful drop-in for random-animal features, error pages and demos. See also RandomFox, shibe.online and Cataas.

FAQ

What does /api/quack return?

The same shape as /api/random — it is an alias kept for fun. Use either.

Can I force a GIF?

Yes — ?type=gif. Note the GIF pool is smaller, so repeats come sooner.

How do I list every duck?

/api/list returns the full set of image filenames; combine with /api/{id}.jpg to fetch a specific one.

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 Animals APIs

← Back

More Animals APIs · All 196 APIs