BYTETOOLS

RandomFox API

Free fox image API with no key. Returns a random fox photo URL as JSON. CORS enabled, minimal payload. Tested curl example and live response included.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-19

What is the RandomFox API?

RandomFox is a free API that returns the URL of a random fox photograph as JSON. It requires no API key, is CORS-enabled, and returns one of the smallest payloads of any public API.

RandomFox does one thing: return a random fox photo URL. The payload is two fields, which makes it about as simple as a JSON API can be and a good first target when teaching fetch.

Because the response is tiny and CORS is enabled, it is also a convenient fixture for testing image loading states, skeleton placeholders and error handling without the noise of a large response body.

Quick facts

Base URL
https://randomfox.ca
Authentication
No key required.
Rate limit
No published limit.
Pricing
Free.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the RandomFox API

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

1. Fetch a random fox image

GET https://randomfox.ca/floof/

curl
curl 'https://randomfox.ca/floof/'
JavaScript (fetch)
const res = await fetch("https://randomfox.ca/floof/");
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://randomfox.ca/floof/", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "image": "https://randomfox.ca/images/21.jpg",
  "link": "https://randomfox.ca/?i=21"
}

Response fields

imagestring
Direct URL of the fox photograph.
linkstring
Permalink to the image's page on randomfox.ca.

What you can build with the RandomFox API

  • Teach fetch and JSON parsing with the smallest possible payload
  • Test image loading, skeleton states and error fallbacks
  • Add a random image button to a demo or portfolio project
  • Provide lightweight avatar placeholders in prototypes

Common errors and how to fix them

Broken image URL

Occasional missing file on the origin.

Fix: Handle the img onError event and retry with a fresh request.

RandomFox API — frequently asked questions

Does the RandomFox API need an API key?

No. It is completely free with no key, no signup and no rate limit, and it sends CORS headers so it works directly from browser JavaScript.

What does the RandomFox API return?

A JSON object with two fields: `image`, the direct photo URL, and `link`, a permalink to that image's page.

Can I request a specific fox image?

The public endpoint returns a random image each time. Image URLs are numbered, so you can construct a direct URL yourself, but there is no documented parameter for it.

Are there similar animal image APIs?

Yes — Dog CEO for dogs, TheCatAPI for cats, and Shibe Online for shiba inus all follow the same key-free pattern.

Tools that pair with this API

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