Learn how to integrate random dog facts into your applications using our simple API
Our Fact API is simple to integrate into your applications. Just make a GET request to the endpoint.
$url = 'https://api.sykes.pet/fact'; $response = file_get_contents($url); $data = json_decode($response); $fact = $data->fact; echo $fact;
fetch('https://api.sykes.pet/fact')
.then(response => response.json())
.then(data => {
console.log(data.fact);
// Display the fact in your application
});
The API returns a JSON object with the following structure:
{
"status": "success",
"data": {
"fact": "Random dog fact text here"
}
}
{
"status": "success",
"data": {
"fact": "The phrase \"raining cats and dogs\" originated in 17th century England when it is believed that many cats and dogs drowned during heavy periods of rain."
}
}
We allow up to 100 requests per hour per IP address. If you need higher limits, please contact us.
"The phrase "raining cats and dogs" originated in 17th century England when it is believed that many cats and dogs drowned during heavy periods of rain."
We source our dog facts from the reliable Dog API, which provides a comprehensive collection of interesting and verified facts about dogs.
The API is updated regularly with new facts to keep your applications fresh and engaging.