Skip to content
  • Auto
  • Light
  • Dark
Get Started

Get Aggregated Prompts

Get metrics for prompts with frequency data by topic ID
get_aggregated_prompts(ClientGetAggregatedPromptsParams**kwargs) -> answer_textstrimportant_termslistinvocationsintlatest_run_datadatetimemention_frequencyGetAggregatedPromptsResponseItemMentionFrequencynegative_sentimentslistpositive_sentimentslistpromptstrprompt_analysis_idstrprompt_idstrprompts_countintrankingfloatseo_metricsGetAggregatedPromptsResponseItemSeoMetricsshare_of_voicefloatsourceslistGetAggregatedPromptsResponse
post/api/beta/prompts

Returns metrics for all prompts with frequency over time topic ID

Parameters
website_topic_idstr
from_dateint
formatint64
llm_providerstr
tag_idslist
List[str]
to_dateint
formatint64
Returns
GetAggregatedPromptsResponsetype
Hide ParametersShow Parameters
answer_textstr
optional
important_termslist
optional
Optional[List[str]]
invocationsint
optional
formatint32
latest_run_datadatetime
optional
formatdate-time
mention_frequencyaveragefloatdata_formatliteraldateslistdays_spanintdeltafloatdisplay_namestrfrom_datedatetimelanguageliterallocaleliteralmedianfloatmetric_namestrserieslistto_datedatetimevaluefloatGetAggregatedPromptsResponseItemMentionFrequency
optional
Hide ParametersShow Parameters
averagefloat
optional
formatdouble
data_formatliteral
optional
Optional[Literal["NUMBER", "PERCENTAGE", "CURRENCY", 2 more]]
Hide ParametersShow Parameters
"NUMBER"
"PERCENTAGE"
"CURRENCY"
"TEXT"
"SCORE"
dateslist
optional
Optional[List[datetime]]
days_spanint
optional
formatint32
deltafloat
optional
formatdouble
display_namestr
optional
from_datedatetime
optional
formatdate-time
languageliteral
optional
Optional[Literal["ENGLISH", "SPANISH", "PORTUGUESE", 9 more]]
Hide ParametersShow Parameters
"ENGLISH"
"SPANISH"
"PORTUGUESE"
"HEBREW"
"GERMAN"
"ITALIAN"
"FRENCH"
"MANDARIN"
"HINDI"
"ARABIC"
"JAPANESE"
"RUSSIAN"
localeliteral
optional
Optional[Literal["GLOBAL", "ISRAEL", "EU", 97 more]]
Hide ParametersShow Parameters
"GLOBAL"
"ISRAEL"
"EU"
"UK"
"US"
"IL"
"AL"
"AZ"
"KG"
"BA"
"UZ"
"BI"
"XK"
"SM"
"DE"
"AT"
"CH"
"IE"
"IM"
"FR"
"ES"
"NL"
"IT"
"PT"
"BE"
"AD"
"MT"
"MC"
"MA"
"LU"
"TN"
"DZ"
"GI"
"LI"
"SE"
"DK"
"FI"
"NO"
"AX"
"IS"
"GG"
"JE"
"GL"
"VA"
"FX"
"FO"
"AF"
"AM"
"AU"
"BH"
"BD"
"BT"
"BN"
"KH"
"CN"
"CY"
"GE"
"HK"
"IN"
"ID"
"IR"
"IQ"
"JP"
"JO"
"KZ"
"KW"
"LA"
"LB"
"MY"
"MV"
"MN"
"MM"
"NP"
"OM"
"PK"
"PH"
"QA"
"SA"
"SG"
"KR"
"LK"
"SY"
"TW"
"TH"
"TR"
"AE"
"VN"
"YE"
"AR"
"BO"
"BR"
"CL"
"CO"
"EC"
"GY"
"PY"
"PE"
"SR"
"UY"
"VE"
medianfloat
optional
formatdouble
metric_namestr
optional
Hide ParametersShow Parameters
formatdate-time
valuefloat
formatdouble
to_datedatetime
optional
formatdate-time
valuefloat
optional
formatdouble
negative_sentimentslist
optional
Optional[List[Dict[str, str]]]
positive_sentimentslist
optional
Optional[List[Dict[str, str]]]
promptstr
optional
prompt_analysis_idstr
optional
prompt_idstr
optional
prompts_countint
optional
formatint32
rankingfloat
optional
formatdouble
seo_metricscpcfloatsearch_volumeintGetAggregatedPromptsResponseItemSeoMetrics
optional
Hide ParametersShow Parameters
cpcfloat
optional
formatdouble
search_volumeint
optional
formatint32
share_of_voicefloat
optional
formatdouble
sourceslist
optional
Optional[List[str]]
from anvil import Anvil

client = Anvil(
    api_key="My API Key",
)
response = client.get_aggregated_prompts(
    website_topic_id="websiteTopicId",
    from_date=0,
    llm_provider="llmProvider",
    tag_ids=["string"],
    to_date=0,
)
print(response)
200 Example
[
  {
    "answerText": "answerText",
    "importantTerms": [
      "string"
    ],
    "invocations": 0,
    "latestRunData": "2019-12-27T18:11:19.117Z",
    "mentionFrequency": {
      "average": 0,
      "dataFormat": "NUMBER",
      "dates": [
        "2019-12-27T18:11:19.117Z"
      ],
      "daysSpan": 0,
      "delta": 0,
      "displayName": "displayName",
      "fromDate": "2019-12-27T18:11:19.117Z",
      "language": "ENGLISH",
      "locale": "GLOBAL",
      "median": 0,
      "metricName": "metricName",
      "series": [
        {
          "date": "2019-12-27T18:11:19.117Z",
          "value": 0
        }
      ],
      "toDate": "2019-12-27T18:11:19.117Z",
      "value": 0
    },
    "negativeSentiments": [
      {
        "foo": "string"
      }
    ],
    "positiveSentiments": [
      {
        "foo": "string"
      }
    ],
    "prompt": "prompt",
    "promptAnalysisId": "promptAnalysisId",
    "promptId": "promptId",
    "promptsCount": 0,
    "ranking": 0,
    "seoMetrics": {
      "cpc": 0,
      "searchVolume": 0
    },
    "shareOfVoice": 0,
    "sources": [
      "string"
    ]
  }
]