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
-
numberinteger, after the ? — min 1, max 5, default 1Number of facts to return (max 5, defaults to 1)
-
limitinteger, after the ? — min 1, max 5, default 1Number of facts to return (max 5, defaults to 1) - alias for 'number'
-
rawboolean, after the ?Return plain text instead of JSON
curl -s "https://dogapi.dog/api/v1/facts?number=1"
What comes back
200 successful
{
"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
|