Skip to main content
Prompts are the AI search queries Topify.ai tracks daily across all AI providers. Each prompt generates responses that are analyzed for brand visibility, sentiment, citations, and competitor mentions.

List prompts

GET /projects/{project_id}/prompts
Returns all prompts in a project, ordered by creation date.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID
curl "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/prompts" \
  -H "X-API-Key: tk_live_..."

Response

{
  "success": true,
  "data": {
    "project_id": "a1b2c3d4-...",
    "total": 25,
    "prompts": [
      {
        "id": "e5f6a7b8-...",
        "project_id": "a1b2c3d4-...",
        "content": "What is the best project management tool?",
        "prompt_type": "active",
        "topic_id": "t1u2v3w4-...",
        "country": "US",
        "visibility": 85.0,
        "sentiment": 72,
        "position": 2.3,
        "volume": 150,
        "cvr": 45.0,
        "intent": "commercial",
        "trend": "up",
        "created_at": "2026-01-15T10:30:00+00:00"
      }
    ]
  }
}

Prompt fields

FieldTypeNullableDescription
idstring (UUID)NoPrompt ID
project_idstring (UUID)NoParent project ID
contentstringNoThe AI search query text
prompt_typestringNoactive, suggested, pending, inactive, or url_recommended
topic_idstring (UUID)YesTopic this prompt belongs to
countrystringYesTarget country for localized responses
visibilityfloatYesBrand visibility percentage (0—100)
sentimentintegerYesBrand sentiment score
positionfloatYesAverage brand position in responses
volumeintegerYesNumber of responses collected
cvrfloatYesContent visibility rate
intentstringYesQuery intent: informational, commercial, navigational, transactional
trendstringYesTrend direction: up, down, or stable
created_atstring (ISO 8601)NoCreation timestamp

Get prompt

GET /projects/{project_id}/prompts/{prompt_id}
Returns a single prompt. Same fields as list.

Path parameters

ParamTypeDescription
project_idstring (UUID)The project ID
prompt_idstring (UUID)The prompt ID
curl "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/prompts/{prompt_id}" \
  -H "X-API-Key: tk_live_..."

Prompt analytics

GET /projects/{project_id}/prompts/{prompt_id}/analytics
Returns time-series visibility, position, and sentiment data grouped by date and AI provider.

Query parameters

ParamTypeDefaultDescription
duration_daysinteger7Days to look back
date_fromstringStart date (YYYY-MM-DD)
date_tostringEnd date (YYYY-MM-DD)
providersstringComma-separated provider filter
curl "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/prompts/{prompt_id}/analytics?duration_days=7" \
  -H "X-API-Key: tk_live_..."

Response

{
  "success": true,
  "data": {
    "prompt_id": "e5f6a7b8-...",
    "prompt_content": "What is the best project management tool?",
    "volume": 42,
    "sentiment": 72,
    "visibility_chart": {
      "2026-03-01": [
        { "provider": "chatgpt", "value": 85.0 },
        { "provider": "perplexity", "value": 90.0 }
      ],
      "2026-03-02": [
        { "provider": "chatgpt", "value": 80.0 }
      ]
    },
    "position_chart": {
      "2026-03-01": [
        { "provider": "chatgpt", "value": 2.0 }
      ]
    },
    "sentiment_chart": {
      "2026-03-01": [
        { "provider": "chatgpt", "value": 75.0 }
      ]
    }
  }
}

Response fields

FieldTypeNullableDescription
prompt_idstring (UUID)NoPrompt ID
prompt_contentstringNoThe AI search query text
volumeintegerYesTotal responses collected
sentimentintegerYesOverall brand sentiment across the period
visibility_chartobjectNoDate-keyed map of ProviderMetric[] (visibility %)
position_chartobjectNoDate-keyed map of ProviderMetric[] (avg position)
sentiment_chartobjectNoDate-keyed map of ProviderMetric[] (avg sentiment)
ProviderMetric:
FieldTypeDescription
providerstringAI provider name (e.g., chatgpt)
valuefloatMetric value for that provider on that date

AI responses (chats)

GET /projects/{project_id}/prompts/{prompt_id}/chats
Returns raw AI responses with brand mentions, sentiment, position, and citation references.

Query parameters

Same as analytics.
curl "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/prompts/{prompt_id}/chats?duration_days=7" \
  -H "X-API-Key: tk_live_..."

Response

{
  "success": true,
  "data": {
    "items": [
      {
        "id": "c1d2e3f4-...",
        "date": "2026-03-01T12:00:00+00:00",
        "mentioned": true,
        "position": 2,
        "all_mentions": [
          {
            "name": "Acme Corp",
            "icon_url": "https://logo.clearbit.com/acme.com",
            "icon_urls": ["https://logo.clearbit.com/acme.com", "https://www.google.com/s2/favicons?domain=acme.com&sz=64"]
          }
        ],
        "chat_preview": "When it comes to project management tools...",
        "platform": "chatgpt",
        "model": "gpt-4o",
        "full_content": "When it comes to project management tools, Acme Corp stands out for...",
        "prompt_content": "What is the best project management tool?",
        "references": [
          {
            "title": "Best PM Tools 2026",
            "link": "https://techcrunch.com/best-pm-tools",
            "snippet": "Acme Corp ranked #1...",
            "reference_index": 1
          }
        ],
        "brands_mentioned": {
          "Acme Corp": { "position": 1, "count": 3 },
          "Competitor A": { "position": 2, "count": 1 }
        },
        "sentiment": 80,
        "sentiment_by_brands": {
          "Acme Corp": 80,
          "Competitor A": 60
        }
      }
    ]
  }
}

ChatItem fields

FieldTypeNullableDescription
idstring (UUID)NoLLM output ID
datestring (ISO 8601)NoWhen the response was generated
mentionedbooleanNoWhether your brand was mentioned
positionintegerYesYour brand’s rank position in this response
all_mentionsBrandMention[]NoAll brands mentioned in the response
chat_previewstringNoFirst sentence of the response (max 150 chars)
platformstringNoAI provider (chatgpt, perplexity, google_ai_overview)
modelstringNoSpecific model used (e.g., gpt-4o)
full_contentstringNoComplete AI response text
prompt_contentstringNoThe prompt that generated this response
referencesReferenceItem[]NoCitations/sources in the response
brands_mentionedobjectYesRaw brand extraction data (brand name to position/count mapping)
sentimentintegerYesYour brand’s sentiment score in this response
sentiment_by_brandsobjectYesSentiment scores keyed by brand name
BrandMention:
FieldTypeDescription
namestringBrand name as it appeared in the response
icon_urlstringPrimary logo URL
icon_urlsstring[]Multiple logo URL sources
ReferenceItem:
FieldTypeDescription
titlestringCitation title
linkstringCitation URL
snippetstringCitation snippet text
reference_indexintegerPosition of the citation in the response

Domains

GET /projects/{project_id}/prompts/{prompt_id}/domains
Returns domain-level citation breakdown, sorted by citation count descending.

Query parameters

Same as analytics.
curl "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/prompts/{prompt_id}/domains?duration_days=7" \
  -H "X-API-Key: tk_live_..."

Response

{
  "success": true,
  "data": {
    "items": [
      {
        "domain": "techcrunch.com",
        "domain_type": 1,
        "citation_count": 15,
        "avg_citations": 2.5,
        "used_percentage": 75.0,
        "mentioned": true,
        "brands_appeared": [
          {
            "name": "Acme Corp",
            "icon_url": "https://logo.clearbit.com/acme.com",
            "icon_urls": ["https://logo.clearbit.com/acme.com"]
          }
        ],
        "favicon_url": "https://www.google.com/s2/favicons?domain=techcrunch.com&sz=64",
        "favicon_urls": [
          "https://logo.clearbit.com/techcrunch.com",
          "https://www.google.com/s2/favicons?domain=techcrunch.com&sz=64"
        ]
      }
    ]
  }
}

DomainItem fields

FieldTypeNullableDescription
domainstringNoDomain name
domain_typeintegerNoSource category ID
citation_countintegerNoTotal citation count across all responses
avg_citationsfloatNoAverage citations per response that cited this domain
used_percentagefloatNoHow frequently this domain appears (percentage)
mentionedbooleanNoWhether your brand appeared alongside this domain
brands_appearedBrandInfo[]NoBrands that appeared in responses citing this domain
favicon_urlstringYesPrimary favicon URL
favicon_urlsstring[]NoMultiple favicon URL sources
BrandInfo:
FieldTypeDescription
namestringBrand name
icon_urlstringPrimary logo URL
icon_urlsstring[]Multiple logo URL sources

URLs

GET /projects/{project_id}/prompts/{prompt_id}/urls
Returns URL-level citation data, sorted by mention count descending.

Query parameters

Same as analytics.
curl "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/prompts/{prompt_id}/urls?duration_days=7" \
  -H "X-API-Key: tk_live_..."

Response

{
  "success": true,
  "data": {
    "items": [
      {
        "url": "https://techcrunch.com/best-pm-tools-2026",
        "title": "Best PM Tools 2026",
        "domain": "techcrunch.com",
        "url_type": null,
        "url_type_name": "unknown",
        "mentioned_count": 8,
        "brands_appear": [
          {
            "name": "Acme Corp",
            "icon_url": "https://logo.clearbit.com/acme.com",
            "icon_urls": ["https://logo.clearbit.com/acme.com"]
          }
        ],
        "first_seen": "2026-02-15T00:00:00+00:00",
        "last_seen": "2026-03-01T00:00:00+00:00"
      }
    ]
  }
}

UrlItem fields

FieldTypeNullableDescription
urlstringNoFull URL
titlestringNoPage title
domainstringNoDomain extracted from URL
url_typeintegerYesURL type ID
url_type_namestringNoURL type label (e.g., unknown)
mentioned_countintegerNoNumber of times this URL was cited
brands_appearBrandInfo[]NoBrands appearing in responses that cited this URL
first_seenstring (ISO 8601)NoEarliest citation date
last_seenstring (ISO 8601)NoMost recent citation date