Dog Fact API Documentation

Learn how to integrate random dog facts into your applications using our simple API

🐕 💡 📚

How to Use

Our Fact API is simple to integrate into your applications. Just make a GET request to the endpoint.

Endpoint URL

https://api.sykes.pet/fact

PHP Example

$url = 'https://api.sykes.pet/fact';
$response = file_get_contents($url);
$data = json_decode($response);
$fact = $data->fact;
echo $fact;

JavaScript Example

fetch('https://api.sykes.pet/fact')
  .then(response => response.json())
  .then(data => {
    console.log(data.fact);
    // Display the fact in your application
  });

API Response

Response Structure

The API returns a JSON object with the following structure:

{
  "status": "success",
  "data": {
    "fact": "Random dog fact text here"
  }
}

Sample Response

{
  "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."
  }
}

Rate Limits

We allow up to 100 requests per hour per IP address. If you need higher limits, please contact us.

Live Demo

Current Random 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."

Powered by Dog API

Try It Yourself

GET https://api.sykes.pet/fact

About Our Fact API

Data Source

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.

Integration Tips

  • Use in chatbots for fun dog-related interactions
  • Display on your website as a "fact of the day" feature
  • Incorporate into mobile apps for educational content
  • Create trivia games with dog facts