Skip to content

API for developers

Read the PetCremation data as JSON. The API is free, needs no key and reads only. Base URL: https://petcremation.fyi/api/v1.

The OpenAPI 3.1 description is at /api/v1/openapi.json. Any website may call the API from a browser.

Endpoints

Each endpoint in this table takes GET. Any other method gives 405. A parameter that is not listed gives 400.

Endpoints of the PetCremation API, with their parameters
EndpointReturnsParameters
GET /api/v1/listingsSearch and list listings
q (query, optional, string)
Search text, with at least one letter or digit. Matches name, categories, attributes, description and place. Typos fall back to close matches.
country (query, optional, string)
ISO 3166-1 alpha-2 country code, any case. A country the directory does not cover, as listed in /places, gives 400.
region (query, optional, string)
Region slug, from /places.
city (query, optional, string)
City slug, from /places.
category (query, optional, string)
Category slug, from /categories. A parent slug also matches its children.
sort (query, optional, one of: relevance, name, recent)
relevance needs q and is the default with it. name is the default without q. recent is newest first.
limit (query, optional, integer, 1 to 50, default 20)
Items per page.
cursor (query, optional, string)
page.nextCursor from the previous response. Opaque. Send the same filters and limit.
GET /api/v1/listings/{slug}Read one listing
slug (path, required, string)
The listing slug.
GET /api/v1/placesList countries, regions and cities with countsNone
GET /api/v1/categoriesList the category tree with countsNone
GET /api/v1/sourcesList the data sources with license and refreshNone
GET /api/v1/statsCounts and the last updateNone

Examples

Find pet crematories

curl "https://petcremation.fyi/api/v1/listings?category=pet-crematories&country=GB&limit=5"

Read the next page

curl "https://petcremation.fyi/api/v1/listings?limit=5&cursor=<page.nextCursor from the last response>"

Read one pet crematory

slug=$(curl -s "https://petcremation.fyi/api/v1/listings?limit=1" | jq -r '.data[0].slug')
curl "https://petcremation.fyi/api/v1/listings/$slug"

List the places and categories you can filter by

curl "https://petcremation.fyi/api/v1/places"
curl "https://petcremation.fyi/api/v1/categories"

MCP server

An AI agent can use the same data through MCP at https://petcremation.fyi/mcp. It takes POST only: a GET in a browser gives 405. The server uses Streamable HTTP, keeps no session and needs no key. It reads only. It has the same rate limit, the same public fields and the same credit line as the API. The server card describes it.

search_listings
: Search published pet crematories by text, place and category.
get_listing
: Get one published pet crematory by its slug.
list_places
: List countries, regions and cities that have pet crematories.
list_categories
: List categories with their pet crematory counts.
get_stats
: Get the number of published pet crematories, places and categories, and when the data last changed.
list_sources
: List where the pet crematory data comes from, with the license and refresh of each source.

Add it to Claude Code

claude mcp add --transport http petcremation https://petcremation.fyi/mcp

Add it to a client that reads an mcpServers file, such as Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "petcremation": {
      "url": "https://petcremation.fyi/mcp"
    }
  }
}

List the tools with curl

curl -X POST "https://petcremation.fyi/mcp" -H "content-type: application/json" -H "accept: application/json, text/event-stream" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Responses

A successful response has data and meta. A list response also has page, with these fields:

limit
: items on each page.
total
: items that match.
nextCursor
: send it back as cursor, with the same filters and limit. It is null on the last page.
capped
: true when more items match than the cursor can reach.
fuzzy
: true when the items are close matches for q.

An error has error (a sentence), code and sometimes details. Branch on code: invalid_parameter, invalid_cursor, not_found, method_not_allowed, rate_limited, internal_error.

Rate limits and caching

Each client may send 300 requests in 60 seconds. Every GET response has RateLimit-Limit and RateLimit-Policy. Over the limit you get 429 with Retry-After: wait that many seconds. The limit is counted at each Cloudflare location.

A successful response sends Cache-Control: public, max-age=60, s-maxage=300, stale-while-revalidate=600 and an ETag. Send the ETag back as If-None-Match to get 304 with no body.

Credit and licenses

Show this credit line next to the data you display:

Data from PetCremation (https://petcremation.fyi). Each record keeps the license of its source, listed in meta.sources. A listing is a record, not an endorsement.

Every response lists its sources in meta.sources. Keep a source's license when you reuse its records.

  • APHA approved animal by-product plants (Great Britain): license Open Government Licence v3.0. Contains public sector information licensed under the Open Government Licence v3.0. See data/reports/sources.md., refreshed monthly
  • OpenStreetMap (pet crematoria): license Open Database License (ODbL) 1.0, (c) OpenStreetMap contributors. See data/reports/sources.md for share-alike notes., refreshed manual
  • Provider websites: license Facts from the business's own public website. Flagged for owner review. The place, postcode and licence record on these rows still come from the APHA register (OGL v3.0) or OpenStreetMap (ODbL, (c) OpenStreetMap contributors)., refreshed manual

Published by . How we check each pet crematory.

The pet cremation newsletter

A short email now and again: a new listing, a rule that affects pet owners, and one source note. No noise.

We only use your email to send this newsletter. Privacy policy.

API for developers | PetCremation