API

AIRT Groups

You are reading the Project API docs

Base URL: api4.seranking.com

Project API uses subscription limits. Fro more information visit API credit system.

Data API and Project API keys are not interchangeable — use the correct one to avoid authentication errors.

Data apikey example:
80cfee7d-xxxx-xxxx-xxxx-fc8500816bb3
(UUID format)
Project apikey example:
253a73adxxxxxxxxxxxxxx340aa0a939
(40-char hex)

API keys are available in your account. For any questions or 401 errors, email [email protected] for support.

Organize tracked prompts into groups for cleaner reporting and bulk operations. Groups live at the site level and are shared across every LLM engine configured for that site; prompts are assigned to groups per engine. Data in the AI Result Tracker is refreshed daily.

Base URL: api4.seranking.com

Note:
  • Each site has one non-deletable default group. New prompts land in the default group unless a group_id is specified at creation.
  • Deleting a non-default group moves its prompts to the default group.
  • Group names must be non-empty and unique within a site, maximum 255 characters.
  • Aggregated per-group metrics are not yet available in the public API; tracked in a follow-up task.
  • This is a Project API feature. Use your Project API key (40-char hex), not the Data API key.

List prompt groups

GET https://api4.seranking.com/sites/{site_id}/airt/prompt-groups

Cost: 0. Managing prompt groups does not consume API credits or subscription quota.

Returns prompt groups for the site, ordered by position. Optionally filter by LLM engine and include prompt counts per group.

Request parameters

ParameterTypeRequiredDefaultDescription
site_idIntegerYesN/ASite ID. Path parameter.
tokenStringYesN/AProject API access token. Query parameter.
keys_countIntegerNo0Set to 1 to include keys_count on every group. Accepts 0 or 1. Query parameter.
site_llm_idsArray of IntegerNoN/AFilter groups to those used by these site LLM IDs. Repeat the parameter: site_llm_ids[]=1&site_llm_ids[]=2. Query parameter.

Request example

Copy
curl -X GET "https://api4.seranking.com/sites/72193/airt/prompt-groups?token=YOUR_API_TOKEN&keys_count=1"

Response parameters

ParameterTypeDescription
idIntegerGroup ID.
nameStringGroup name.
positionIntegerOrdering position within the site, starting at 0.
is_defaultInteger1 for the non-deletable default group, 0 otherwise.
creation_dateStringGroup creation date, in YYYY-MM-DD format.
keys_countIntegerNumber of prompts in the group. Returned only when keys_count=1.

Response example

Copy
[
{ "id": 1, "name": "Default", "position": 0, "is_default": 1, "creation_date": "2025-06-01", "keys_count": 42 },
{ "id": 12, "name": "Brand queries", "position": 1, "is_default": 0, "creation_date": "2026-03-05", "keys_count": 15 },
{ "id": 18, "name": "Competitors", "position": 2, "is_default": 0, "creation_date": "2026-03-21", "keys_count": 28 }
]

Error responses

CodeScenario
400Invalid query parameters.
403Access denied to the requested site.
404Site not found.

Create prompt group

POST https://api4.seranking.com/sites/{site_id}/airt/prompt-groups

Cost: 0. Managing prompt groups does not consume API credits or subscription quota.

Creates a new prompt group for a site. The new group is appended to the end of the group order. Returns 400 if a group with the same name already exists.

Request parameters

ParameterTypeRequiredDefaultDescription
site_idIntegerYesN/ASite ID. Path parameter.
tokenStringYesN/AProject API access token. Query parameter.
nameStringYesN/AGroup name. Non-empty, maximum 255 characters, unique within the site. Body parameter.

Request example

Copy
curl -X POST "https://api4.seranking.com/sites/72193/airt/prompt-groups?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Competitors"}'

Response parameters

ParameterTypeDescription
idIntegerID of the created group.

Response example

Copy
{ "id": 12 }

Error responses

CodeScenario
400Empty or missing name, name exceeds 255 characters, or name already exists on this site.
403Access denied to the requested site.
404Site not found.

Rename prompt group

PATCH https://api4.seranking.com/sites/{site_id}/airt/prompt-groups/{group_id}

Cost: 0. Managing prompt groups does not consume API credits or subscription quota.

Updates the name of a prompt group.

Request parameters

ParameterTypeRequiredDefaultDescription
site_idIntegerYesN/ASite ID. Path parameter.
group_idIntegerYesN/AGroup ID. Path parameter.
tokenStringYesN/AProject API access token. Query parameter.
nameStringYesN/ANew group name. Non-empty, maximum 255 characters. Body parameter.

Request example

Copy
curl -X PATCH "https://api4.seranking.com/sites/72193/airt/prompt-groups/12?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Branded queries"}'

Response parameters

ParameterTypeDescription
idIntegerID of the renamed group.

Response example

Copy
{ "id": 12 }

Error responses

CodeScenario
400Empty or missing name, name exceeds 255 characters, or name already exists on this site.
403Access denied to the requested site.
404Site or group not found.

Delete prompt group

DELETE https://api4.seranking.com/sites/{site_id}/airt/prompt-groups/{group_id}

Cost: 0. Managing prompt groups does not consume API credits or subscription quota.

Deletes a prompt group. All prompts currently in the group are moved to the default group. The default group itself cannot be deleted.

Request parameters

ParameterTypeRequiredDefaultDescription
site_idIntegerYesN/ASite ID. Path parameter.
group_idIntegerYesN/AGroup ID. Path parameter.
tokenStringYesN/AProject API access token. Query parameter.

Request example

Copy
curl -X DELETE "https://api4.seranking.com/sites/72193/airt/prompt-groups/12?token=YOUR_API_TOKEN"

Response

Returns 204 No Content on success.

Error responses

CodeScenario
400Invalid request.
403Access denied, or attempt to delete the default group.
404Site or group not found.

Change group order

POST https://api4.seranking.com/sites/{site_id}/airt/prompt-groups/{group_id}/order

Cost: 0. Managing prompt groups does not consume API credits or subscription quota.

Moves a group to a new position in the site’s group order. Provide exactly one of before_id or after_id to anchor the new position.

Request parameters

ParameterTypeRequiredDefaultDescription
site_idIntegerYesN/ASite ID. Path parameter.
group_idIntegerYesN/AID of the group to move. Path parameter.
tokenStringYesN/AProject API access token. Query parameter.
before_idIntegerConditionalN/APlace the group immediately before this neighbour group ID. Required if after_id is omitted. Body parameter.
after_idIntegerConditionalN/APlace the group immediately after this neighbour group ID. Required if before_id is omitted. Body parameter.

Request example

Move group 12 to right after group 18:

Copy
curl -X POST "https://api4.seranking.com/sites/72193/airt/prompt-groups/12/order?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"after_id": 18}'

Response

Returns 204 No Content on success.

Error responses

CodeScenario
400Both before_id and after_id are provided, or neither.
403Access denied to the requested site.
404Site, source group, or anchor group not found.

Delete all prompts in group

DELETE https://api4.seranking.com/sites/{site_id}/airt/prompt-groups/{group_id}/keywords

Cost: 0. Managing prompt groups does not consume API credits or subscription quota.

Removes every prompt currently assigned to the group. The group itself is not deleted.

Warning:

Request parameters

ParameterTypeRequiredDefaultDescription
site_idIntegerYesN/ASite ID. Path parameter.
group_idIntegerYesN/AGroup ID. Path parameter.
tokenStringYesN/AProject API access token. Query parameter.

Request example

Copy
curl -X DELETE "https://api4.seranking.com/sites/72193/airt/prompt-groups/12/keywords?token=YOUR_API_TOKEN"

Response

Returns 204 No Content on success.

Error responses

CodeScenario
400Invalid request.
403Access denied to the requested site.
404Site or group not found.

Move prompts to group

POST https://api4.seranking.com/sites/{site_id}/airt/prompt-groups/{group_id}/moveKeywords

Cost: 0. Managing prompt groups does not consume API credits or subscription quota.

Moves a specific set of prompts into the target group. Prompts can come from any group on the same site.

Request parameters

ParameterTypeRequiredDefaultDescription
site_idIntegerYesN/ASite ID. Path parameter.
group_idIntegerYesN/ATarget group ID. Path parameter.
tokenStringYesN/AProject API access token. Query parameter.
k2site_llm_idsArray of IntegerYesN/APrompt-to-LLM link IDs to move, same IDs returned as k2site_llm_id by GET /prompts. Non-empty. Body parameter.

Request example

Copy
curl -X POST "https://api4.seranking.com/sites/72193/airt/prompt-groups/12/moveKeywords?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"k2site_llm_ids": [101, 102, 103]}'

Response

Returns 204 No Content on success.

Error responses

CodeScenario
400Empty or missing k2site_llm_ids.
403Access denied to the requested site.
404Site, target group, or one or more prompts not found.

Move all prompts from one group to another

POST https://api4.seranking.com/sites/{site_id}/airt/prompt-groups/moveGroupKeywords

Cost: 0. Managing prompt groups does not consume API credits or subscription quota.

Moves every prompt from one group to another in a single call. Use this to merge a group into another group, then optionally delete the now-empty source group.

Request parameters

ParameterTypeRequiredDefaultDescription
site_idIntegerYesN/ASite ID. Path parameter.
tokenStringYesN/AProject API access token. Query parameter.
from_group_idIntegerYesN/ASource group ID. Body parameter.
to_group_idIntegerYesN/ATarget group ID. Body parameter.

Request example

Copy
curl -X POST "https://api4.seranking.com/sites/72193/airt/prompt-groups/moveGroupKeywords?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"from_group_id": 18, "to_group_id": 12}'

Response

Returns 204 No Content on success.

Error responses

CodeScenario
400Missing from_group_id or to_group_id, or both are equal.
403Access denied to the requested site.
404Site, source group, or target group not found.

Learn how SE Ranking’s API can boost your SEO!

Hi! Meet our product experts!

One of them will walk you through the API and show you how to get the most out of it.

  • Enjoy a tailored demo on integrating rich, structured SEO data into your stack.
  • Pin down every tech detail live—auth, endpoints, rate limits, data formats.
  • Compare usage tiers and pricing so you can unlock maximum data value.

Request a free demo to see our tools and integrations in action

By clicking this button, you agree to SE Ranking’s
Terms of Services and Privacy Policy.