API is supplied for educational purposes only.
It isn't intended for general public use and may change or be removed without notice.
Information
This API supplies random cat facts and images. These items are only accessible randomly.
All requests to this API must use the following base URL:
https://teapi.netlify.app/api/cats/{endpoint}
Endpoint: Pictures
To get a random cat image, use the following endpoint:
GET /pictures/random
Example
GET https://teapi.netlify.app/api/cats/pictures/random
{
"id": 103570,
"file": "https://teapi.netlify.app/images/cat-in-paper-bag-600x400.jpg",
"width": 600,
"height": 400,
"size": 62477
}
Response
Name | Description | Type |
id | The id for this resource. | number |
file | The full url to the image file. | string |
width | The image width in pixels. | number |
height | The image height in pixels. | number |
size | The image file size in bytes. | number |
Endpoint: Facts
To get a random fact about cats, use the following endpoint:
GET /facts/random
Example
GET https://teapi.netlify.app/api/cats/facts/random
{
"id": "58e008d00aac31001185ed0f",
"user": "58e007480aac31001185ecef",
"text": "Your cat recognizes your voice but acts too cool to care (probably because they are).",
"updatedAt": "2020-08-23T20:20:01.611Z",
"createdAt": "2018-02-28T21:20:02.986Z"
}
Response
Name | Description | Type |
id | The id for this resource. | string |
user | The id of the user who submitted this resource. | string |
text | The fact text. | string |
updatedAt | The time at which this resource was last edited or updated. | timestamp |
createdAt | The time at which this resource was originally submitted. | timestamp |