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

# Bulk keyword actions

> Preview, track, untrack, or delete many tracked keywords at once.

Every bulk action takes a `selection` and works through it in batches:

* `selection` is either `{ mode: "ids", ids: [trackedKeywordId, ...] }` or `{ mode: "all", filters: { search?, country? }, excludedIds: [...] }` (every keyword matching the filters, minus the excluded ids).
* Call `POST /v3/rank-tracking/keywords/bulk-preview` with the `selection` and an `action` (`track`, `untrack` or `delete`) first. It changes nothing and returns `eligibility`: `{ selected, eligible, skipped, byReason }`, e.g. keywords skipped because they are already tracked or being refreshed.

| Action | Endpoint | Rows per call | Notes |
| - | - | - | - |
| Track | `POST /v3/rank-tracking/keywords/bulk-track` | 50 | Resumes tracking for saved, untracked keywords. Uses the keyword-tracking allowance; `402` at the limit. |
| Untrack | `POST /v3/rank-tracking/keywords/bulk-untrack` | 50 | Soft untrack: history is kept and the allowance is refunded. |
| Delete | `POST /v3/rank-tracking/keywords/bulk-delete` | 50 | Permanent. Removes rank history; topic membership is kept. |

Each call processes one batch of eligible keywords and returns `{ success, succeeded, failed, nextCursor, eligibility, results }`. While `nextCursor` is not `null`, call again with the same `selection` and `afterId` set to `nextCursor`. `results` has one entry per keyword with `id`, `keyword`, `success` and `error` when it failed.

A call returns `409` if a selected keyword started refreshing mid-batch.

To add new keywords by text, use [Add Tracked Keyword](https://snowseo.com/docs/api-reference/endpoints/add-tracked-keyword.md). To change one keyword, including its active state, use `PATCH /v3/rank-tracking/keywords/{id}`.


## OpenAPI

````yaml POST /v3/rank-tracking/keywords/bulk-preview
openapi: 3.0.0
info:
  title: SnowSEO API
  description: API documentation for SnowSEO
  version: 1.0.0
servers:
  - url: https://api.snowseo.com
    description: Production server
security:
  - bearerAuth: []
  - apiKey: []
externalDocs:
  url: https://snowseo.com/docs
  description: Find more info here
paths:
  /v3/rank-tracking/keywords/bulk-preview:
    post:
      tags:
        - Rank Tracking
      summary: Count which selected keywords a bulk action applies to
      description: >-
        Read-only. For a selection of tracked keywords (explicit ids, or all
        matching a search or country minus exclusions), reports how many the
        given bulk action would change and why the rest would be skipped. Call
        it before a bulk action and confirm the counts with the user.
      operationId: keywordsBulkPreview
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - selection
                - action
              properties:
                teamId:
                  type: string
                selection:
                  oneOf:
                    - type: object
                      required:
                        - mode
                        - ids
                      additionalProperties: false
                      properties:
                        mode:
                          type: string
                          enum:
                            - ids
                        ids:
                          type: array
                          items:
                            type: string
                    - type: object
                      required:
                        - mode
                        - filters
                        - excludedIds
                      additionalProperties: false
                      properties:
                        mode:
                          type: string
                          enum:
                            - all
                        filters:
                          type: object
                          properties:
                            search:
                              type: string
                            country:
                              type: string
                        excludedIds:
                          type: array
                          items:
                            type: string
                action:
                  type: string
                  enum:
                    - track
                    - untrack
                    - delete
                  description: The bulk action to count eligible rows for.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  eligibility:
                    type: object
                    required:
                      - selected
                      - eligible
                      - skipped
                      - byReason
                    properties:
                      selected:
                        type: number
                      eligible:
                        type: number
                      skipped:
                        type: number
                      byReason:
                        type: object
                        additionalProperties:
                          type: number
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  reference:
                    type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your SnowSEO API key (sk_...).
    apiKey:
      type: apiKey
      name: x-api-key
      in: header

````

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