Prompts are the questions Qwairy monitors across AI platforms. Each prompt is categorized by funnel stage (TOFU/MOFU/BOFU), tagged for organization, and linked to a topic. Track which prompts generate mentions and source citations for your brand.
See Entities for the complete Prompt object structure, and Topic / Tag for classification objects.
List Prompts
Bearer token. Example: Bearer qw-api-xxx
GET /api/v1/brands/{brandId}/prompts
Path Parameters
The unique identifier of the brand
Query Parameters
Number of days to include (based on last generated date). If not specified, returns all data.
Start date (ISO 8601 format)
End date (ISO 8601 format)
Filter by topic ID (keywordId). Supports comma-separated multi-select (e.g., id1,id2).
Filter by tag ID. Supports comma-separated multi-select (e.g., id1,id2).
Filter by prompt type: TOFU, MOFU, BOFU
Maximum number of prompts to return (max: 100)
sort
string
default: "lastGeneratedAt"
Field to sort by: lastGeneratedAt, answersCount, text, createdAt
Set to details to enrich each prompt with aggregated competitors, sources, brand mentions, and source stability metrics. When omitted, the response includes only the base fields listed below.
Response
Indicates if the request was successful
Total number of prompts matching filters
Number of prompts in this response
Prompt type (TOFU/MOFU/BOFU)
Number of generated answers
Last generation timestamp (ISO 8601)
Show Additional fields when include=details
List of competitors mentioned across all answers for this prompt.
Each object contains name (string), mentions (number), and relationship (SELF, DIRECT, INDIRECT).
Number of unique competitors mentioned
Total competitor mentions across all answers
Whether your brand was mentioned in any answer
Number of times your brand was mentioned
List of source domains cited across all answers for this prompt.
Each object contains domain (string), citations (number), and isSelf (boolean).
Number of unique source domains cited
Total source citations across all answers
Percentage of sources present in all answers (0-100). Indicates how consistently sources are cited across different AI responses.
Prompt creation timestamp (ISO 8601)
Example Request
curl -X GET "https://www.qwairy.co/api/v1/brands/cm1234567890abcdef/prompts?type=TOFU&limit=10" \
-H "Authorization: Bearer qw-api-your-token-here"
Example Response
{
"success" : true ,
"pagination" : {
"total" : 156 ,
"count" : 1 ,
"limit" : 10 ,
"offset" : 0
},
"prompts" : [
{
"id" : "q1" ,
"text" : "What are the best products in this category?" ,
"topic" : "Product Reviews" ,
"type" : "TOFU" ,
"tags" : [ "reviews" , "comparison" ],
"answersCount" : 2 ,
"mentionRate" : 50.0 ,
"sourceRate" : 25.0 ,
"lastGeneratedAt" : "2024-12-19T10:00:00.000Z"
}
]
}
Example with include=details
curl -X GET "https://www.qwairy.co/api/v1/brands/cm1234567890abcdef/prompts?include=details&limit=10" \
-H "Authorization: Bearer qw-api-your-token-here"
{
"success" : true ,
"pagination" : {
"total" : 156 ,
"count" : 1 ,
"limit" : 10 ,
"offset" : 0
},
"prompts" : [
{
"id" : "q1" ,
"text" : "What are the best products in this category?" ,
"topic" : "Product Reviews" ,
"type" : "TOFU" ,
"tags" : [ "reviews" , "comparison" ],
"answersCount" : 2 ,
"mentionRate" : 50.0 ,
"sourceRate" : 25.0 ,
"lastGeneratedAt" : "2024-12-19T10:00:00.000Z" ,
"competitors" : [
{ "name" : "My Brand" , "mentions" : 3 , "relationship" : "SELF" },
{ "name" : "Competitor A" , "mentions" : 8 , "relationship" : "DIRECT" },
{ "name" : "Competitor B" , "mentions" : 5 , "relationship" : "DIRECT" }
],
"competitorsCount" : 3 ,
"competitorMentionsTotal" : 16 ,
"brandMentioned" : true ,
"brandMentionCount" : 3 ,
"sources" : [
{ "domain" : "mybrand.com" , "citations" : 2 , "isSelf" : true },
{ "domain" : "expert-reviews.com" , "citations" : 4 , "isSelf" : false },
{ "domain" : "industry-news.com" , "citations" : 3 , "isSelf" : false }
],
"sourcesCount" : 3 ,
"sourceCitationsTotal" : 9 ,
"sourceStability" : 33.33 ,
"createdAt" : "2024-12-01T10:00:00.000Z"
}
]
}
Get Prompt Details
GET /api/v1/brands/{brandId}/prompts/{promptId}
Path Parameters
The unique identifier of the brand
The unique identifier of the prompt
Query Parameters
Set to details to enrich the prompt with aggregated competitors, sources, brand mentions, and source stability metrics. When omitted, returns the base fields only.
Response
Returns detailed prompt information with aggregated metrics.
Example Response
{
"success" : true ,
"prompt" : {
"id" : "q1" ,
"text" : "What are the best products in this category?" ,
"topic" : {
"id" : "topic1" ,
"name" : "Product Reviews"
},
"type" : "TOFU" ,
"tags" : [
{ "id" : "tag1" , "name" : "reviews" },
{ "id" : "tag2" , "name" : "comparison" }
],
"answersCount" : 2 ,
"mentionRate" : 50.0 ,
"sourceRate" : 25.0 ,
"avgSentiment" : 78.5 ,
"createdAt" : "2024-12-01T10:00:00.000Z" ,
"lastGeneratedAt" : "2024-12-19T10:00:00.000Z"
}
}
Example with include=details
{
"success" : true ,
"prompt" : {
"id" : "q1" ,
"text" : "What are the best products in this category?" ,
"topic" : {
"id" : "topic1" ,
"name" : "Product Reviews"
},
"type" : "TOFU" ,
"tags" : [
{ "id" : "tag1" , "name" : "reviews" },
{ "id" : "tag2" , "name" : "comparison" }
],
"answersCount" : 2 ,
"mentionRate" : 50.0 ,
"sourceRate" : 25.0 ,
"avgSentiment" : 78.5 ,
"createdAt" : "2024-12-01T10:00:00.000Z" ,
"lastGeneratedAt" : "2024-12-19T10:00:00.000Z" ,
"competitors" : [
{ "name" : "My Brand" , "mentions" : 3 , "relationship" : "SELF" },
{ "name" : "Competitor A" , "mentions" : 8 , "relationship" : "DIRECT" }
],
"competitorsCount" : 2 ,
"competitorMentionsTotal" : 11 ,
"brandMentioned" : true ,
"brandMentionCount" : 3 ,
"sources" : [
{ "domain" : "mybrand.com" , "citations" : 2 , "isSelf" : true },
{ "domain" : "expert-reviews.com" , "citations" : 4 , "isSelf" : false }
],
"sourcesCount" : 2 ,
"sourceCitationsTotal" : 6 ,
"sourceStability" : 50.0
}
}
Get Prompt Answers
Retrieve all AI-generated responses for a specific prompt.
GET /api/v1/brands/{brandId}/prompts/{promptId}/answers
Path Parameters
The unique identifier of the brand
The unique identifier of the prompt
Query Parameters
Filter by AI provider. Supports comma-separated multi-select (e.g., chatgpt,claude).
Example Request
curl -X GET "https://www.qwairy.co/api/v1/brands/cm1234567890abcdef/prompts/q1/answers" \
-H "Authorization: Bearer qw-api-your-token-here"
Example Response
{
"success" : true ,
"prompt" : {
"id" : "q1" ,
"text" : "What are the best products in this category?"
},
"total" : 2 ,
"answers" : [
{
"id" : "ans1" ,
"provider" : "ChatGPT" ,
"model" : "GPT-4o" ,
"text" : "Based on recent reviews and comparisons..." ,
"hasSelfMention" : true ,
"selfMentionPosition" : 3 ,
"hasSelfSource" : false ,
"competitorsMentioned" : [ "My Brand" , "Competitor A" , "Competitor B" ],
"sourcesCited" : [ "industry-news.com" , "expert-reviews.com" ],
"sentiment" : 82 ,
"createdAt" : "2024-12-19T10:00:00.000Z"
},
{
"id" : "ans2" ,
"provider" : "Perplexity" ,
"model" : "Sonar Large" ,
"text" : "According to expert reviews and user feedback..." ,
"hasSelfMention" : true ,
"selfMentionPosition" : 2 ,
"hasSelfSource" : true ,
"competitorsMentioned" : [ "My Brand" , "Competitor C" , "Competitor D" ],
"sourcesCited" : [ "mybrand.com" , "consumer-reports.com" ],
"sentiment" : 78 ,
"createdAt" : "2024-12-19T10:05:00.000Z"
}
]
}
Get Prompt Evolution
Track how a prompt’s metrics change over time.
GET /api/v1/brands/{brandId}/prompts/{promptId}/evolution
Path Parameters
The unique identifier of the brand
The unique identifier of the prompt
Query Parameters
Number of days to include. If not specified, returns all data.
Start date (ISO 8601 format)
End date (ISO 8601 format)
Filter by AI provider. Supports comma-separated multi-select (e.g., chatgpt,claude).
Filter by tag ID. Supports comma-separated multi-select (e.g., id1,id2).
Example Request
curl -X GET "https://www.qwairy.co/api/v1/brands/cm1234567890abcdef/prompts/q1/evolution?period=7" \
-H "Authorization: Bearer qw-api-your-token-here"
Example Response
{
"success" : true ,
"prompt" : {
"id" : "q1" ,
"text" : "What are the best products in this category?"
},
"evolution" : [
{
"date" : "2024-12-01" ,
"answers" : 5 ,
"mentionRate" : 80.0 ,
"sourceRate" : 60.0 ,
"avgSentiment" : 78.5
},
{
"date" : "2024-12-02" ,
"answers" : 8 ,
"mentionRate" : 75.0 ,
"sourceRate" : 62.5 ,
"avgSentiment" : 80.1
}
]
}
Error Responses
Status Code Description 400 INVALID_PARAMETERInvalid query parameter 401 INVALID_TOKENAuthentication failed 404 BRAND_NOT_FOUNDBrand doesn’t exist or not accessible 404 PROMPT_NOT_FOUNDPrompt doesn’t exist