---
title: "Search website key pages"
method: POST
path: "/api/website-key-pages/search"
tags: ["website_key_pages"]
---

# Search website key pages

`POST /api/website-key-pages/search`

## Request

- Base URL: `https://beta.getsales.io/signals/v1`
- URL: `https://beta.getsales.io/signals/v1/api/website-key-pages/search`
- Auth: HTTP bearer and API key in header `Team-SID`

The pages a site's visits are judged by (pricing, demo, signup, contact by default, or the team's own): one row per key page with its slug (key), label and path glob (pattern). site_sid.eq is the usual scope, key.eq finds one by slug, q searches key, label and pattern. The slugs are what search_website_sessions filter.key_page and the signal visited_key_page name. Who visited one is search_website_sessions, not this.

Contract:
- MCP tool `search_website_key_pages`, registry package `mcp.signals/website_key_pages`, mount `signals.website`.
- Operation `search`, response envelope `search`.
- Flags: read only.

## Request body

- SearchWebsiteKeyPagesRequest: Request body of `search_website_key_pages`.
  - `filter` object: Field filters, ANDed: {field: {eq | ne | in | nin | gte | lte | gt | lt | is_null}}; q inside it is free text. Omit for every row.
    - `q` string: Free text over key, label and pattern (a LIKE).
    - `sid` object: Key page sid(s), sg_kp_ prefix: also the point lookup (there is no get tool).
      - `eq` string: Website key page sid (sg_kp_...).
      - `in` string[]
    - `site_sid` object: The usual scope: one site's pages.
      - `eq` string: Website site sid (sg_si_...), the page's site.
      - `in` string[]
    - `key` object: The slug(s): key.eq pricing finds the page a session's key_pages name.
      - `eq` string
      - `in` string[]
    - `is_conversion` object: The conversion pages only.
      - `eq` boolean
    - `created_at` object: ISO 8601 range; combine bounds in one object.
      - `gte` string
      - `lte` string
      - `gt` string
      - `lt` string
    - `deleted_at` object: Default scope is { is_null: true } (live rows); stating it at all lifts the soft-delete scope.
      - `gte` string
      - `lte` string
      - `is_null` boolean
  - `sort` object: One column and its direction; omit for the default order.
    - `field` 'created_at' | 'key', required: The column to order by.
    - `direction` 'asc' | 'desc': asc or desc; default desc.
  - `page_size` integer: 0..500, default 50; 0 = counts only, 1 = the first row.
  - `cursor` string, nullable: pagination.next_cursor of the previous page.

## Response `200`

`search` success envelope.

- SearchWebsiteKeyPagesResponse
  - `success` true, required
  - `operation` 'search', required
  - `items` object[], required
    - `item` object, required
      - `sid` string, required: Website key page sid (sg_kp_...).
      - `team_sid` string, required: Owning team (ts_tm_..., external: gs.service.id).
      - `site_sid` string, required: The site the page belongs to (sg_si_...).
      - `key` string, required: The stable lowercase slug (pricing) facts and signals carry; immutable.
      - `label` string, required: What the page is called in the feed.
      - `pattern` string, required: The path glob as stored: a leading slash, lowercased, no query or fragment, * for any run of characters (/pricing*).
      - `is_conversion` boolean, required: Counted as a conversion in the feed and the Overview card.
      - `created_by` object, required: Actor that named the page (the site create, or this entity's create).
        - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
        - `actor_sid` string, nullable, required
        - `team_sid` string, required
        - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
        - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
        - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
        - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
        - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
        - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
      - `created_at` string, required: ISO 8601 UTC.
      - `updated_at` string, required: ISO 8601 UTC.
      - `deleted_at` string, nullable, required: ISO 8601 UTC; null = live. Also set by the site's cleanup job.
    - `included` object, required
  - `pagination` object, required
    - `next_cursor` string, nullable, required
    - `has_more` boolean, required
    - `total_count` integer, nullable, required
  - `applied_filters` object, required
  - `includes` string[], required
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
  - `counts` object

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-signals.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-signals/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-signals/revisions/310ca5d2219d?raw)
