Skip to main content
An access policy is a list of domains your requests can or can’t access. Requests to blocked websites are refused, and content from them is never returned or charged.
Access policies are enabled per organization. Contact us to turn them on. Until then, the access policy endpoints and requests that list policies return 403 ACCESS_POLICIES_NOT_ENABLED.

Create a policy

Send this body to POST /v1/access-policies. See the Quickstart for authentication.
Use allowed_domains to allow only those domains, or blocked_domains to block them. Send one, not both. Each domain includes its subdomains, and *.gov covers every .gov site. The response includes the policy id, such as pol_3f9c2a7e5b8d4c1f9a6e0b2d7c4f8a1e.

Apply policies to a request

Add policy IDs to policies. This scrape only runs if every listed policy allows the URL:
On endpoints that take query parameters, send a comma-separated list, such as policies=pol_3f9c2a7e5b8d4c1f9a6e0b2d7c4f8a1e,pol_81ab4d6e2f9c0a7b5e3d1c8f6a4b2e9d. List several policies to combine them. For example, one policy that allows github.com and another that blocks gist.github.com together allow GitHub without gists. Batches apply policies to every page, and monitors apply them to every run.

Apply a policy automatically

Use applies_to to choose where a policy applies without listing it: Requests can add more policies but can’t skip API key or organization policies.

Limit an API key

Give an agent or integration a key that can only reach the websites you choose:
A key’s ID appears as key_id in your request logs.

Apply to your whole account

What gets checked

Redirects and embedded frames are checked too. Company and people data aren’t affected.

Handle a blocked request

denied_by lists every policy that blocked the URL, including API key and organization policies.

Manage policies

Creating, updating, and deleting policies requires the access_policies:write permission; listing and retrieving them requires access_policies:read. Any key can use them in policies. Don’t grant access_policies:write to a key you limit with a policy, since it could change its own limits. Changes apply right away, including to running batches and monitors. A request that lists a deleted or unknown policy fails with 400.
Allowlists are the strictest option. A blocklist only covers the domains you list, so the same content on another website can still be reached.