PerfectParser Docs

Authentication

Learn how to generate a PerfectParser API key and authenticate every request using the X-API-Key header.

All API requests to api.perfectparser.com must include a valid API key. PerfectParser uses a simple header-based authentication scheme — no OAuth flows, no token expiry.


Generate an API key

  1. Sign in to your PerfectParser dashboard.
  2. Click Integrations in the left sidebar.
  3. Open the API Keys tab and click Generate Key.
  4. Copy the key immediately — it is shown only once for security.

API keys are secret credentials. Never commit them to source control or expose them in client-side code. Store them as environment variables.


Using your API key

Include your key in the X-API-Key request header for every API call:

curl https://api.perfectparser.com/v1/extractions \
  -H "X-API-Key: pp_live_your_secret_key"

Header reference

HeaderRequiredDescription
X-API-Key✅ YesYour PerfectParser API key.
Idempotency-KeyOptionalOn POST /v1/extractions only — prevents duplicate jobs on retries. See Start Extraction.

Rate limits

Rate limits apply per API key across all endpoints (not per-endpoint buckets).

ScopeLimit
All endpoints (global)150 requests / minute
POST /v1/extractions20 requests / minute (tighter cap — each call charges credits)

Every response includes rate-limit headers:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the current window
X-RateLimit-RemainingRequests remaining before the limit is hit
X-RateLimit-ResetUnix timestamp (seconds) when the window resets

When you exceed the limit, the API returns 429 RATE_LIMITED. Retry with exponential back-off and respect X-RateLimit-Reset.


Key prefixes

PrefixEnvironment
pp_live_Production

Key management

  • Revoke a key — Go to Integrations → API Keys and click Revoke next to the key. Revocation is instant.
  • Multiple keys — You can create multiple keys (e.g. one per integration or environment).
  • Permissions — All keys have full access to your account. Fine-grained scopes are on our roadmap.

Error responses

StatusCodeCause
401UNAUTHORIZEDMissing X-API-Key header, key not found, or key has been revoked/expired.
429RATE_LIMITEDToo many requests. Check X-RateLimit-Reset and retry after the window resets.

Security best practices

  • Store keys in environment variables (e.g. .env files), never in source code.
  • Rotate keys periodically or immediately after a suspected leak.
  • Use separate keys for each environment (staging, production).

On this page