🐶 Dog API by kinduff

The Dog API provides dog data as a service!

API V1 - Docs

The Dog Facts API allows users to access a collection of dog facts that have been submitted by members of the public. The API is simple to use and provides a variety of options for retrieving dog facts. With the V1 version of the API, users can access dog facts in a variety of formats, including plain text and HTML.

Base URL
https://dogapi.dog/api/v1
Auth
None. No key, no sign up — just send the request.
Returns
JSON.
OpenAPI
/api-docs/v1/swagger.json
License
MIT
Questions
dev@dogapi.dog

Quick start

Ask for something and read what comes back. This works in a terminal, in the browser console, or from any language that can make an HTTP request.

Terminal
curl -s "https://dogapi.dog/api/v1/facts?number=1"
JavaScript
const response = await fetch(
  "https://dogapi.dog/api/v1/facts"
);
const body = await response.json();

console.log(body);

The answer looks like this:

Response
{
  "facts": [
    "Two Labradors, Lucky and Flo, were the first dogs known for sniffing out pirated DVDs."
  ],
  "success": true
}

Endpoints

Every endpoint below can be run straight from this page — fill in the fields and press Send request. The examples show what comes back.

Facts

GET /facts

list facts

Returns random dog facts in the classic (deprecated) format.

number and limit are aliases for the same thing and are clamped to 1..5: anything missing, zero, negative or non-numeric returns a single fact, and anything above 5 returns 5.

With raw=true the response is the plain text of one fact rather than JSON, and it is a 404 when no facts exist at all.

Every response is different, so these are sent with Cache-Control: no-store and must not be cached. New integrations should use V2.

Parameters

  • number integer, after the ? — min 1, max 5, default 1

    Number of facts to return (max 5, defaults to 1)

  • limit integer, after the ? — min 1, max 5, default 1

    Number of facts to return (max 5, defaults to 1) - alias for 'number'

  • raw boolean, after the ?

    Return plain text instead of JSON

Request
curl -s "https://dogapi.dog/api/v1/facts?number=1"
Try it
Runs against this site.

What comes back

200 successful
Example
{
  "facts": [
    "Two Labradors, Lucky and Flo, were the first dogs known for sniffing out pirated DVDs."
  ],
  "success": true
}
Every field, explained
Field Type Description
facts array of string The requested facts, one string each
success boolean e.g. true