Skip to Content
APIEndpointsList fanout queries

List fanouts

The follow-up queries engines generate from your prompts.

GET /brands/{brand_id}/fanouts

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands

Query parameters

ParameterTypeRequiredDescription
limitintegeroptionalRows per page, 1 to 100. Defaults to 20.
cursorstringoptionalOpaque cursor from the previous response. Treat it as a token, never construct one.
start_dateYYYY-MM-DDoptionalInclusive lower bound, YYYY-MM-DD in UTC. Narrows the population before metrics are computed.
end_dateYYYY-MM-DDoptionalInclusive upper bound, YYYY-MM-DD in UTC. Narrows the population before metrics are computed.
prompt_iduuidoptionalOnly fanouts from this prompt.
expansion_typestringoptionalFilter by how the query was expanded.

Request

curl https://api.askylabs.com/v1/brands/BRAND_ID/fanouts \ -H "Authorization: Bearer $ASKY_API_KEY"

Response

{ "data": [ { "query_text": "rule-based publishing workflows vs AI-driven publishing systems", "occurrences": 60, "prompt_count": 1, "source_providers": [ "openai" ], "mentions_own_brand": false }, { "query_text": "martech automation architecture AI CMS integration tools", "occurrences": 44, "prompt_count": 1, "source_providers": [ "openai" ], "mentions_own_brand": false } ], "pagination": { "limit": 2, "has_more": true, "next_cursor": "eyJ2IjoxLCJvIjoyLCJsIjoyfQ" }, "meta": { "period": { "start_date": null, "end_date": null, "all_time": true }, "expansion_type": "fan_out", "returned": 100, "total_distinct": 4071, "truncated": true }, "request_id": "req_3b5f8d040a3b4516ad4d" }

Response fields

FieldTypeDescription
data[].query_textstringThe sub-query the engine wrote for itself.
data[].occurrencesintegerHow many times this query text appeared, across all contributing prompts.
data[].prompt_countintegerHow many distinct tracked prompts produced this same query text.
data[].source_providersstring[]Which engines produced it.
data[].mentions_own_brandbooleanThe engine wrote your brand into its own fan-out query.
meta.expansion_typestringWhich expansion type this page is filtered to (see expansion_type above).

A query with prompt_count greater than one came from more than one of your tracked prompts, so there is no single prompt it belongs to.

Last updated on