BYTETOOLS

Cat Facts API

Free cat facts API with no key. Random feline facts as JSON, with pagination and length filtering. CORS enabled. Tested curl example and live response.

No API key requiredCORS enabledHTTPSFree tier

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

What is the Cat Facts API?

The Cat Facts API is a free, key-free API that returns random facts about cats as JSON. It supports fetching a single fact, paginated lists, and filtering by maximum fact length.

Cat Facts is one of the most-used APIs in beginner tutorials, and it earns the position: the response is a two-field object, the endpoint needs nothing configured, and CORS is enabled so it works straight from browser JavaScript.

Beyond novelty, it is a genuinely convenient fixture for testing pagination. The `/facts` endpoint accepts `limit` and `page` parameters and returns a standard paginated envelope, which makes it useful for exercising list UI, infinite scroll and page controls.

Quick facts

Base URL
https://catfact.ninja
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 Cat Facts 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 cat fact

GET https://catfact.ninja/fact

curl
curl 'https://catfact.ninja/fact'
JavaScript (fetch)
const res = await fetch("https://catfact.ninja/fact");
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://catfact.ninja/fact", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "fact": "In just 7 years, one un-spayed female cat and one un-neutered male cat and their offspring can result in 420,000 kittens.",
  "length": 121
}

Parameters

ParameterTypeRequiredDescription
max_lengthintegerOptionalOnly return facts shorter than this many characters. 100
limitintegerOptionalFacts per page on the /facts endpoint. 10
pageintegerOptionalPage number for paginated results. 2

Response fields

factstring
The cat fact text.
lengthinteger
Character count of the fact.
dataarray
On /facts, the array of facts for the current page.
current_page / last_page / totalinteger
Standard pagination metadata on /facts.

What you can build with the Cat Facts API

  • Build a first fetch tutorial with an instantly visible result
  • Test pagination and infinite scroll against a real paginated API
  • Add a fun fact widget to a pet or veterinary site
  • Practise filtering with query parameters using max_length

Common errors and how to fix them

Empty data array

Requested a page beyond the last one.

Fix: Check `last_page` in the response before requesting further pages.

422

Invalid parameter value, such as a negative limit.

Fix: Keep limit and page positive integers.

Cat Facts API — frequently asked questions

Is the Cat Facts API free?

Yes, completely free with no API key or registration, and CORS is enabled so it works directly from browser JavaScript.

How do I get multiple cat facts at once?

Use the /facts endpoint with `limit` and `page` parameters, which returns a paginated array along with standard pagination metadata.

Can I limit how long each fact is?

Yes, the `max_length` parameter restricts results to facts under a given character count — handy when fitting text into a fixed-size card.

Is there a dog equivalent?

Yes, several. The Dog CEO API serves dog images by breed, and Dog API provides dog facts in a similar format.

Tools that pair with this API

Cat Facts 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.