Petfinder API
Search adoptable pets from shelters and rescues across North America.
What it does
Petfinder’s API lists real adoptable pets from ~11,000 animal shelters and rescue groups across the US and Canada: search by species, breed, age, size, gender, location and distance, with photos, descriptions, status and the shelter’s contact details.
Base URL
Authentication
OAuth 2.0 client credentials. Register for a free key + secret, then POST to /v2/oauth2/token with grant_type=client_credentials to get a bearer token (valid ~1 hour). Send it as Authorization: Bearer YOUR_TOKEN.
Code examples
TOKEN=$(curl -s -d "grant_type=client_credentials&client_id=$PF_ID&client_secret=$PF_SECRET" \ https://api.petfinder.com/v2/oauth2/token | jq -r .access_token) curl -s "https://api.petfinder.com/v2/animals?type=dog&location=90210&distance=25&limit=5" \ -H "Authorization: Bearer $TOKEN"
import requests
tok = requests.post("https://api.petfinder.com/v2/oauth2/token", data={
"grant_type": "client_credentials", "client_id": PF_ID,
"client_secret": PF_SECRET}, timeout=10).json()["access_token"]
r = requests.get("https://api.petfinder.com/v2/animals",
params={"type": "cat", "age": "baby", "location": "Austin, TX"},
headers={"Authorization": f"Bearer {tok}"}, timeout=10)
for a in r.json()["animals"]:
print(a["name"], a["breeds"]["primary"], a["contact"]["address"]["city"])Rate limits & quotas
Free tier: 1,000 requests/day and 50 requests/second. Tokens expire hourly — cache and refresh. Lists paginate with page/limit (max 100) and a pagination object. Over the limit: HTTP 429.
Key response fields
| animals[].name / species / breeds.primary / age / gender / size | Pet basics |
| animals[].status | adoptable, adopted, found |
| animals[].photos[] / primary_photo_cropped | Image URLs at several sizes |
| animals[].contact.email / phone / address | How to reach the shelter |
| animals[].organization_id | Link to the rescue via /v2/organizations/{id} |
Common errors
| 401 / "access token expired" | Token older than ~1 hour — request a new one. |
| 403 ACCESS_DENIED | Wrong client credentials, or endpoint not permitted. |
| 400 invalid parameters | e.g. bad location, or limit over 100 — details in invalid-params. |
| 429 | Daily or per-second limit exceeded. |
When to use it (and alternatives)
The API for adoption sites, ‘pets near you’ widgets and rescue-support tools — it is real, current shelter data. For pet photos and breed facts only (not adoptions), use The Dog API / The Cat API.
FAQ
How long does the access token last?
About 3600 seconds (1 hour). Cache it, track the expiry, and re-request a few minutes early rather than on every call.
Can I search by breed?
Yes — breed= (get valid names from /v2/types/{type}/breeds). Combine with type, age, size, gender, good_with_kids and location filters.
Is the data US-only?
US and Canada. location accepts a city/state, postal code or lat,lon, with distance in miles (max 500).
New to APIs?
Short guides for working with this API — and any other.