Try the RankNibbler SEO API

Cookies Beta

GET /api/v1/cookies

Lists the cookies a page sets and names the provider, purpose, category and retention for each — a privacy and consent audit inside your SEO API. Cookies are matched against a catalogue of 2,585 patterns, and third-party cookies (a domain outside the page's apex) and cookies missing Secure are flagged.

Beta. This endpoint is new: it is live and safe to call on every plan, but its response shape may still change while we take feedback. Nothing here is scheduled for removal — if you depend on a particular field, tell us and we will keep it stable for you.
Response headers only — this is not a browser scan. The endpoint reads the Set-Cookie headers returned by the page fetch. Cookies written later by JavaScript are not captured, so do not treat this as a full headless-browser consent scan. When the catalogue cannot be loaded, classified comes back false and provider, category and purpose are null — the cookies themselves are still listed.

Authentication

Send your API key as an X-API-Key header, or as a key query parameter. Available on every plan, including Free — plans differ only in requests per day. This call costs one request against your daily quota, which is shared across every key on the account. See Authentication.

Query parameters

NameTypeDescription
url requiredstringThe page to check.
key optionalstringYour API key, if not sent as the X-API-Key header.

Request

Response

200 · application/json
  1. {
  2. "url": "https://example.com", "host": "example.com",
  3. "count": 2, "classified": true,
  4. "thirdPartyCount": 1, "insecureCount": 2,
  5. "cookies": [
  6. { "name": "sid", "secure": false, "httpOnly": true, "sameSite": null,
  7. "domain": null, "days": null, "provider": null, "category": null,
  8. "purpose": null, "thirdParty": false },
  9. { "name": "_ga", "secure": false, "httpOnly": false, "sameSite": null,
  10. "domain": "other.com", "days": 730, "provider": "Google Analytics",
  11. "category": "analytics", "purpose": "Distinguishes users",
  12. "thirdParty": true }
  13. ]
  14. }

Response fields

FieldTypeDescription
classifiedbooleanWhether the pattern catalogue was available. false means the cookies are listed but unclassified.
thirdPartyCountintegerCookies whose domain is outside the page's apex domain.
insecureCountintegerCookies set without the Secure attribute.
cookies[].daysnumber | nullRetention in days. null means a session cookie.
cookies[].provider / category / purposestring | nullMatched from the catalogue. null when the cookie is unrecognised or the catalogue is unavailable.

Errors

StatusWhen
401Missing or invalid API key.
403The URL is a private, loopback or cloud-metadata address and was blocked by SSRF protection.
429Burst rate limit (60 req/10s per IP, 30 req/10s per key) or your daily quota. See Rate limits.
502The target URL could not be fetched.
503The cookie catalogue module is unavailable on this server. This check runs before authentication.

Errors return { "error": "…" }; see Errors.