---
title: "Keywords Create From Search"
method: POST
path: "/intent/keywords/create-from-search"
tags: ["Intent"]
---

# Keywords Create From Search

`POST /intent/keywords/create-from-search`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/intent/keywords/create-from-search`
- Auth: HTTP bearer

Bulk-create compete-tracking keywords from free-text queries.

The array/free-text sibling of ``create-from-domain``. For EACH keyword
(max 10, processed sequentially) it runs:

  1. ``pages/search``            - text/semantic search of the intent index
  2. ``contacts_for_urls``       - resolve people who visited those pages
  3. ``save_keyword_from_search``- persist the keyword + URLs + contacts

Each keyword is isolated: a failure on one yields ``status="error"`` for
that item and never fails the whole batch. Empty / whitespace-only entries
and in-request duplicates (case-insensitive, trimmed) are ``status="skipped"``
before any search/resolve work.

NOTE - not idempotent across requests: re-posting the same keyword text in a
LATER request replaces the prior saved row and returns a NEW ``keyword_id``
(the underlying save is replace-on-save for an exact keyword+filters match).

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- KeywordsCreateFromSearchRequest
  - `keywords` string[], required: 1-10 free-text keyword queries. Each is searched against the intent page index, contacts/companies are resolved, and a compete-tracking keyword row is saved. Duplicates within the request (case-insensitive, trimmed) are skipped, not re-saved.
  - `search_filters` object, nullable: Optional intent-search filters applied to EVERY keyword in the batch (audience, page_type, commercial_score_min, etc.). Stored verbatim on each saved keyword row so the daily resolver replays them.
  - `semantic_ratio` number: 0 = text search (default, cheapest), 1 = semantic, between = hybrid.
  - `page_limit` integer: Max pages to seed per keyword. Deliberately smaller than create-from-domain's 200 default since this runs once per keyword.
  - `contact_limit` integer: Max contacts to pre-resolve per keyword.

## Response `200`

Successful Response

- ApiResponseKeywordsCreateFromSearchResponse
  - `data` KeywordsCreateFromSearchResponse, required
    - `results` KeywordCreateFromSearchItem[]
      - `keyword` string, required
      - `keyword_id` string, nullable
      - `status` string, required: 'created' | 'skipped' | 'error'
      - `pages_seeded` integer
      - `contacts_seeded` integer
      - `companies_seeded` integer
      - `error` string, nullable
    - `created_count` integer
    - `skipped_count` integer
    - `error_count` integer
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
