Convert natural language to filters
Uses an LLM to convert a natural-language query (e.g. “posts from twitter influencers about pricing this week”) into a structured filter object usable with /api/v2/mentions.
Authorizations
Clerk API key. Create one in Settings → API Keys. Pass as Authorization: Bearer <key>. Keys carry a scope — read, write (implies read) or admin (implies write) — chosen when the key is minted. Each operation's security requirement (and its x-required-scope extension) names the minimum scope it needs; request the least-privileged key that covers the operations you call.
Body
Convert a natural-language query into an Octolens filter object.
Which filter contract to return (default mentions). mentions returns the flat filter map accepted by POST /api/v2/mentions filters. feed returns the SimpleFilters/AdvancedFilters shape accepted verbatim by the feed endpoints (POST /api/v2/feeds / PATCH /api/v2/feeds/{id}) — the two contracts are not interchangeable.
mentions, feed Response
200 response
Filter object generated from a natural-language query. Client applies filters to the feed and shows explanation to the user.
Generated filter object, in the contract selected by target: the flat mentions filter map (default) or a feed SimpleFilters/AdvancedFilters shape (target: "feed"). null when the query is ambiguous or matches everything. Use isAdvanced to determine whether it's the simple or advanced shape.
- Option 1
- Option 2
- Option 3
- Option 4
