Preview custom extraction selector

POST/v1/api/sites/{site_id}/custom-extractions/selector-preview
Scope
alerts:write
Token
OAuth access token only
Role
Editor, owner or admin
MCP tool
preview_custom_extraction_selector · preview: MCP write tools are in preview
What scopes, tokens and roles mean →
Request
curl -X POST "https://api.crawle.io/v1/api/sites/11111111-1111-1111-1111-111111111111/custom-extractions/selector-preview" \
  -H "Authorization: Bearer $CRAWLE_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"css_selector":"example"}'
const response = await fetch("https://api.crawle.io/v1/api/sites/11111111-1111-1111-1111-111111111111/custom-extractions/selector-preview", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CRAWLE_ACCESS_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "css_selector": "example"
  }),
});
const data = await response.json();
import os

import requests

response = requests.request(
    "POST",
    "https://api.crawle.io/v1/api/sites/11111111-1111-1111-1111-111111111111/custom-extractions/selector-preview",
    headers={
        "Authorization": f"Bearer {os.environ['CRAWLE_ACCESS_TOKEN']}",
    },
    json={
      "css_selector": "example"
    },
)
data = response.json()
$CRAWLE_ACCESS_TOKEN
is an OAuth access token from your integration's sign-in.

Response 200: a JSON object. Its fields are not described in the API contract yet, so no example is shown.

Parameters

site_idpath · string (uuid)required

Request body

css_selectorstringrequired
1–2000 characters
urlstring or null
up to 2048 characters

Response 200

Returns a JSON object. Its fields are not described in the API contract yet.

Errors

  • 401

    When
    Missing, invalid, or expired token.
  • 403

    When
    The token has none of the accepted scopes (alerts:write).
  • 403

    When
    Called with an API key. This endpoint needs an OAuth access token.
  • 403

    When
    The person's workspace role is below editor.
  • 422

    When
    The request did not match the schema. detail lists each problem.
  • 429

    When
    Rate limited. Wait for Retry-After seconds.

All errors and what to do →

Generated from the API contract at 7e7039b0b, synced October 30, 2026.