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": "In 1957, Laika became the first living being in space via an earth satellite and JFK’s terrier, Charlie, fathered 4 puppies with Laika’s daughter."
}
}
We allow up to 100 requests per hour per IP address. If you need higher limits, please contact us.
"In 1957, Laika became the first living being in space via an earth satellite and JFK’s terrier, Charlie, fathered 4 puppies with Laika’s daughter."
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.