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": "President Lyndon Johnson\'s beagles were named Him and Her."
}
}
We allow up to 100 requests per hour per IP address. If you need higher limits, please contact us.
"President Lyndon Johnson's beagles were named Him and Her."
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.