Docs
Rate limits and caching
The API is free and deliberately small. It runs on the same Worker as the website, so the limits are strict.
Limits
| Limit | Value | Applies to |
|---|---|---|
| Per client | about 15 requests per minute | each client address |
| Shared ceiling | about 600 requests per minute | all API users together, per Cloudflare location |
| Freshness | data changes once an hour | every endpoint |
The count is kept per Cloudflare location and is eventually consistent, so a short burst can get through before the limit applies. Stay at or below the stated rate; do not rely on the burst.
When you hit the limit
You get 429 and a Retry-After header in seconds (60). Wait that long. The check runs before any data is read, so a refused request costs the site almost nothing. Clients that keep going, or that spread requests over many addresses to avoid the limit, may be blocked.
HTTP/2 429
retry-after: 60
content-type: application/json; charset=utf-8
{ "error": "Rate limit reached. Wait a minute and slow down; see the limits in the docs.", "docs": "https://peptilyze.com/docs/api/" }Caching and ETags
Successful answers send Cache-Control: public, max-age=300 and a weak ETag that changes with each hourly snapshot. Send it back in If-None-Match and you get an empty 304 while nothing changed.
# First request: note the ETag
curl -si https://peptilyze.com/api/v1/market | grep -i '^etag'
# etag: W/"api-1794229474408-9cbeac4629e69cf20b44b8b7bcaa20db"
# Later: ask only for changes. 304 means nothing changed.
curl -si -H 'If-None-Match: W/"api-1794229474408-9cbeac4629e69cf20b44b8b7bcaa20db"' \
https://peptilyze.com/api/v1/market | head -1
# HTTP/2 304Being a good client
- Fetch
/api/v1/compoundsor/api/v1/shopsonce and cache it; they cover the whole catalog in one request. - Poll no more often than every few minutes. The numbers only change hourly (the sync runs at the top of the hour).
- Send a
User-Agentthat names your application. - Need more than this allows, for example a daily file? Say so through the form (choose “Something else”).