# Security

Security is built into every layer of crawlapi — from how credentials and payments are handled to how untrusted third-party web pages are isolated during processing. While we maintain strong technical and organisational safeguards, no internet-connected system can be guaranteed completely impenetrable; security is shared, and you remain responsible for safeguarding your API keys, account credentials, and connected AI agent permissions.

## Authentication and access control

- **API keys:** Keys are generated once, shown once, and stored only as one-way cryptographic hashes. Plaintext keys cannot be recovered from our database.
- **Accounts and sessions:** Passwords (where enabled) are cryptographically hashed, and Google Sign-In requires no stored password. Sign-in and sign-up routes are rate-limited and protected against automated abuse.
- **Connected MCP clients:** Remote MCP connections use OAuth 2.1 with PKCE, audience-bound access tokens, and rotating hashed refresh tokens.
- **Immediate revocation:** Revoking an API key, signing out of all sessions, or suspending an account disables active credentials, sessions, and connected MCP tokens.
- **Audit trail:** Security-sensitive account events (sign-ins, password resets, email changes, key creation/revocation, and OAuth authorisations) are recorded in a tamper-evident audit log.

## Billing and payment security

- **No card data on our servers:** Checkout and card storage for optional auto top-up are handled entirely by Stripe. Full payment card numbers never touch crawlapi infrastructure.
- **Transactional ledger:** Credit balances, holds, purchases, and adjustments are processed inside atomic database transactions with automated integrity checks.

## Isolated page processing and network safety

- **SSRF protection:** Every submitted URL and redirect target is validated against strict scheme, port, and DNS checks that block private, loopback, and reserved network addresses.
- **Bounded execution:** Target fetches and document parsing run with strict byte, memory, and execution-time limits in isolated worker processes so malformed or hostile pages cannot affect other customers or core services.
- **Network separation:** Page-processing workers are isolated from internal database networks.

## Data protection and backups

- **Encryption in transit:** All connections to our websites, dashboard, API, and MCP endpoints require TLS.
- **Minimal logging:** Standard operational logs record only the target domain and request metadata — never full URL paths, query strings, fetched page content, API keys, or credentials.
- **Web security headers:** Our websites and dashboard enforce strict Content-Security-Policy, HSTS, and frame-blocking headers with zero third-party advertising or analytics scripts.
- **Encrypted backups:** Automated, verified database backups are maintained both locally and as encrypted off-site snapshots, with periodic automated restore checks.

## Reporting a weakness

If you discover a security vulnerability in crawlapi, please report it privately to **support@crawlapi.dev** with clear reproduction steps. Our disclosure contact is also published at [/.well-known/security.txt](/.well-known/security.txt).

- **Safe harbour:** We will not pursue legal action against good-faith security research conducted in compliance with these rules: test only against your own account and keys, do not access or modify other customers' data, do not degrade service availability or run automated denial-of-service scans, do not use social engineering or physical attacks, and give us reasonable time to remediate before public disclosure.
- **Out of scope:** Automated scanner noise without demonstrated exploitability, missing hardening headers without a security impact, rate-limit exhaustion attacks, and vulnerabilities on third-party websites fetched through the API.
- **Recognition:** We do not operate a paid bug bounty programme; with your permission, we are glad to credit valid fixes on our [changelog](https://docs.crawlapi.dev/changelog).

## Security incidents

If we become aware of a confirmed security incident affecting your personal data, we investigate promptly, take containment and remediation steps, and notify affected customers and applicable authorities as required by law.
