> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trychainshift.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a site keyword analysis

> > **[BETA]** This is a beta API. The response spec may change without notice.

Retrieves the progress status of a submitted analysis task (taskID) and, if finished, the extracted keyword results.

### Errors

| HTTP | Code | Description |
| --- | --- | --- |
| 400 | `COMMON_BINDING` | Invalid taskID format (`PLATFORM_INVALID_ID` in details) |
| 401 | `COMMON_UNAUTHORIZED` | API key or access token is missing or invalid |
| 402 | `INSUFFICIENT_CREDITS` | The organization's credit balance is lower than the unit price of this request |
| 404 | `PLATFORM_SITE_KEYWORD_ANALYSIS_NOT_FOUND` | The analysis task does not exist or belongs to another organization |
| 429 | `PLATFORM_RATE_LIMIT_EXCEEDED` | Rate limit exceeded. Wait the number of seconds in the `Retry-After` header, then retry |
| 500 | — | Internal server error. Returns `message` and `requestID` without `code` |



## OpenAPI

````yaml openapi.en.json GET /v1beta/platform/siteKeywordAnalyses/{taskID}
openapi: 3.1.0
info:
  description: >-
    Platform API for external partners. Uses organization API key based
    authentication.

    ### Common request limits

    - The request body size is limited to 2MiB. Exceeding it returns 413 with
    the `COMMON_REQUEST_BODY_TOO_LARGE` code.

    - Array parameters and string fields have per-endpoint count and length
    limits. The limits are stated in each field or parameter description, and
    violating them returns 400 with the `COMMON_VALIDATION` code.

    ### Error responses

    The error response body always has the same three fields regardless of the
    status code.

    | Field | Type | Meaning |

    | --- | --- | --- |

    | `code` | string | A fixed identifier for the error type. This is the only
    value clients should branch on. The codes each endpoint returns are listed
    in the "Errors" table of that API. |

    | `message` | string | A human-readable, one-line summary of the whole
    error. There is always exactly one. |

    | `details` | array of strings | Individual reasons that do not fit in the
    single `message` line. Even a single reason is returned as an array of
    length 1, and the field is omitted when there is nothing to include. |

    - `details` is an array in every error. It is never returned as a string or
    an object, so no type-based branching is needed.

    - The wording of `details` is not a fixed contract. Use it only for display
    and debugging, and do not parse the strings to branch. Branch on `code`
    instead.

    - `details` is the only field that carries multiple reasons. There is no
    `messages` field in the response.

    - On validation failure (`COMMON_VALIDATION`), `details` contains one
    `"field: reason"` line per violated field. Example:
    `{"code":"COMMON_VALIDATION","message":"Data validation
    failed","details":["keywords: up to 100 items can be entered"]}`

    - `message` defaults to Korean and is returned in English when you send
    `Accept-Language: en`. `details` follows the same rule when it carries
    per-field reasons such as validation failures, but errors that include raw
    text for diagnostic purposes may contain wording in a language other than
    the requested one.

    - Only 500 has a different shape. It returns `message` and a `requestID` to
    reference when contacting support, without `code`.
  title: Platform API
  version: '1.0'
servers:
  - url: https://platform-api.trychainshift.ai/api
security: []
tags:
  - description: >-
      The top-level account unit that API keys belong to. Retrieve the
      organization's basic information.
    name: Organization
  - description: >-
      A target brand whose exposure in AI services is monitored. Provides brand
      registration, retrieval, update, and deletion.
    name: Brand
  - description: >-
      Keyword intelligence for analyzing brands and markets. Provides Google and
      Naver search metrics, related and autocomplete keyword lookups, and site
      URL based keyword analysis.
    name: Keyword (Beta)
  - description: >-
      A group that organizes prompts by purpose. Provides create, get, update,
      and delete operations for prompt sets.
    name: PromptSet
  - description: >-
      A sentence-level unit of a query sent to an AI service. Provides prompt
      create, get, update, and delete, plus bulk creation.
    name: Prompt
  - description: AI service models used for prompt runs. Lists the supported models.
    name: Model
  - description: The region used to run prompts. Retrieves the list of supported regions.
    name: Region
  - description: >-
      The unit of work that actually runs prompts against AI services. Provides
      prompt run requests and retrieval of progress status and lists.
    name: Run
  - description: >-
      An AI service response collected by a run. Retrieves answers including
      sources and search queries.
    name: Answer
  - description: >-
      Statistics on the sources cited in answers, at the domain and URL level.
      Retrieve the citation summary and per-domain and per-URL citation
      statistics.
    name: SourceStatistics (Beta)
  - description: >-
      Statistics on tokens (Kiwi nouns) in answer bodies. Retrieves a ranking of
      the most frequent tokens and the tokens near a specific word.
    name: AnswerStatistics (Beta)
  - description: >-
      Statistics on the search queries (fan-outs) the AI actually issued while
      generating answers. Retrieves a ranking of search queries by occurrence
      count.
    name: FanoutStatistics (Beta)
  - description: >-
      An auxiliary feature that identifies proper nouns in text. Provides proper
      noun extraction.
    name: ProperNoun (Beta)
  - description: >-
      Organization credit balance and Platform API billing information.
      Retrieves the current credit balance.
    name: Credit
externalDocs:
  description: ''
  url: ''
paths:
  /v1beta/platform/siteKeywordAnalyses/{taskID}:
    get:
      tags:
        - Keyword (Beta)
      summary: Get site keyword analysis status
      description: >-
        > **[BETA]** This is a beta API. The response spec may change without
        notice.


        Retrieves the progress status of a submitted analysis task (taskID) and,
        if finished, the extracted keyword results.


        ### Errors


        | HTTP | Code | Description |

        | --- | --- | --- |

        | 400 | `COMMON_BINDING` | Invalid taskID format (`PLATFORM_INVALID_ID`
        in details) |

        | 401 | `COMMON_UNAUTHORIZED` | API key or access token is missing or
        invalid |

        | 402 | `INSUFFICIENT_CREDITS` | The organization's credit balance is
        lower than the unit price of this request |

        | 404 | `PLATFORM_SITE_KEYWORD_ANALYSIS_NOT_FOUND` | The analysis task
        does not exist or belongs to another organization |

        | 429 | `PLATFORM_RATE_LIMIT_EXCEEDED` | Rate limit exceeded. Wait the
        number of seconds in the `Retry-After` header, then retry |

        | 500 | — | Internal server error. Returns `message` and `requestID`
        without `code` |
      operationId: getPlatformSiteKeywordAnalysisStatus
      parameters:
        - description: >-
            ID of the analysis task to retrieve: enter the id from the analysis
            submit response as is
          example: Ck1hRr4mQ2yVX8pTd0LsJw
          in: path
          name: taskID
          required: true
          schema:
            type: string
        - description: >-
            If true, includes url in each keyword's sources items (default
            false). sourceURLCount is always included
          example: true
          in: query
          name: includeSourceURLs
          schema:
            type: boolean
        - description: >-
            If true, includes contexts (a list of source quotes where the
            keyword appears) in each keyword's sources entries (default false).
            Can be set independently of includeSourceURLs, and contexts may be
            empty for pages where no quote was identified
          example: true
          in: query
          name: includeContext
          schema:
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/domain.GetSiteKeywordAnalysisStatusResponse
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.BindingError'
          description: Invalid taskID format
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.UnauthorizedError'
          description: API key or access token is missing or invalid
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.InsufficientCreditsError'
          description: >-
            The organization's credit balance is lower than the unit price of
            this request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.SiteKeywordAnalysisNotFoundError'
          description: Analysis task does not exist or belongs to another organization
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.RateLimitExceededError'
          description: >-
            Rate limit exceeded. Wait the number of seconds in the Retry-After
            header, then retry
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.InternalServerError'
          description: >-
            Internal server error. Include the requestID in your report so it
            can be traced
      security:
        - OrgAPIKeyAuth: []
components:
  schemas:
    domain.GetSiteKeywordAnalysisStatusResponse:
      properties:
        error:
          description: >-
            Do not attach an example: a failure reason would appear mixed into
            the status=COMPLETED example.
          type: string
        id:
          description: >-
            ID of the retrieved analysis task. Same value as the id in the
            submission response and the taskID in the request path
          example: Ck1hRr4mQ2yVX8pTd0LsJw
          type: string
        keywords:
          description: Populated only when COMPLETED
          items:
            $ref: '#/components/schemas/domain.SiteKeywordDTO'
          type: array
          uniqueItems: false
        maxPages:
          description: Maximum number of pages to analyze, as requested at submission
          example: 30
          type: integer
        processedPages:
          description: Number of pages attempted (succeeded plus failed) so far
          example: 8
          type: integer
        status:
          description: >-
            Progress status of the analysis job. PENDING: accepted but not
            started yet, IN_PROGRESS: crawling and analyzing pages (check
            progress with totalPages and processedPages),

            COMPLETED: analysis finished and keywords is populated, FAILED:
            analysis failed and there is no result (reason in error).

            Transitions in the order PENDING → IN_PROGRESS → COMPLETED or
            FAILED, and does not change after a terminal state (COMPLETED or
            FAILED). If it fails before starting, it may go directly from
            PENDING to FAILED
          enum:
            - PENDING
            - IN_PROGRESS
            - COMPLETED
            - FAILED
          example: COMPLETED
          type: string
        totalPages:
          description: Number of pages to process (finalized after entering IN_PROGRESS)
          example: 8
          type: integer
      type: object
    domain.BindingError:
      properties:
        code:
          description: Error code
          example: COMMON_BINDING
          type: string
        details:
          description: >-
            Reasons the resolution failed (an array of length 1 even when there
            is a single reason)
          example:
            - 'PLATFORM_INVALID_ID: Invalid ID format.'
          items:
            type: string
          type: array
          uniqueItems: false
        message:
          description: >-
            Error message (Korean by default, English when Accept-Language: en
            is specified)
          example: Unable to process the request data
          type: string
      type: object
    domain.UnauthorizedError:
      properties:
        code:
          description: Error code
          example: COMMON_UNAUTHORIZED
          type: string
        message:
          description: >-
            Error message (Korean by default, English when Accept-Language: en
            is specified)
          example: Unauthenticated user
          type: string
      type: object
    domain.InsufficientCreditsError:
      properties:
        code:
          description: Error code
          example: INSUFFICIENT_CREDITS
          type: string
        message:
          description: >-
            Error message (Korean by default, English when Accept-Language: en
            is specified)
          example: Insufficient credits.
          type: string
      type: object
    domain.SiteKeywordAnalysisNotFoundError:
      properties:
        code:
          description: Error code
          example: PLATFORM_SITE_KEYWORD_ANALYSIS_NOT_FOUND
          type: string
        message:
          description: >-
            Error message (Korean by default, English when Accept-Language: en
            is specified)
          example: Site keyword analysis task not found
          type: string
      type: object
    domain.RateLimitExceededError:
      properties:
        code:
          description: Error code
          example: PLATFORM_RATE_LIMIT_EXCEEDED
          type: string
        message:
          description: >-
            Error message (Korean by default, English when Accept-Language: en
            is specified)
          example: Too many requests. Please try again later.
          type: string
      type: object
    domain.InternalServerError:
      properties:
        message:
          description: Error message (not localized)
          example: Internal Server Error
          type: string
        requestID:
          description: >-
            Request identifier to reference in support inquiries (same value as
            the X-Request-Id response header)
          example: bkZqnHQepkgTOocTvyHWSlHcGzRqQbZk
          type: string
      type: object
    domain.SiteKeywordDTO:
      properties:
        keyword:
          description: Extracted keywords
          example: AEO
          type: string
        sourceURLCount:
          description: Number of pages where this keyword was found (always included)
          example: 1
          type: integer
        sources:
          description: >-
            url/context for each discovered page (in discovery order). Included
            only when at least one of includeSourceURLs/includeContext is true
          items:
            $ref: '#/components/schemas/domain.SiteKeywordSourceDTO'
          type: array
          uniqueItems: false
      type: object
    domain.SiteKeywordSourceDTO:
      properties:
        contexts:
          description: >-
            List of quotes of the source sentences and phrases where the keyword
            appears on this page. If the same keyword is

            mentioned in multiple sentences, all of them are included. May be
            empty (or omitted) for pages where no quote was identified.
          example:
            - AEO metrics that measure AI search visibility
          items:
            type: string
          type: array
          uniqueItems: false
        url:
          description: URL of the page where the keyword was found
          example: https://trychainshift.ai/
          type: string
      type: object
  securitySchemes:
    OrgAPIKeyAuth:
      description: '"Enter your organization API key. Example: ''cs_live_xxxx''"'
      in: header
      name: API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.