Overview
This workflow runs a curated set of category prompts against ChatGPT, Perplexity, and Claude every morning. It parses each response, checks whether your brand is mentioned, records the rank position relative to competitors, and charts the 30-day trend. Alerts fire when your brand drops out of the top answer.
Trigger
Cron schedule (daily at 6 AM UTC)
Schedule
Runs daily at 6 AM UTC
Workflow Steps
Load prompt list
Read category prompts like best search api for agents and list of serp api alternatives from a config file.
Query each answer engine
Use the Scavio ask endpoint to route prompts to ChatGPT, Perplexity, and Claude.
Parse brand mentions
Scan each response for your brand name and competitor names; record presence and rank order.
Store snapshot
Write a row per prompt per engine per day into a SQLite or Postgres table.
Alert on drop
If your brand falls out of a response it was in yesterday, send a Slack alert.
Python Implementation
import requests, os, datetime
API_KEY = os.environ["SCAVIO_API_KEY"]
PROMPTS = ["best search api for ai agents", "serp api alternatives 2026"]
BRANDS = ["Scavio", "SerpAPI", "Tavily"]
def ask(engine, prompt):
r = requests.post("https://api.scavio.dev/api/v1/ask",
headers={"x-api-key": API_KEY},
json={"engine": engine, "prompt": prompt})
return r.json().get("answer", "")
for prompt in PROMPTS:
for engine in ["chatgpt", "perplexity", "claude"]:
text = ask(engine, prompt)
ranks = [(b, text.lower().find(b.lower())) for b in BRANDS if b.lower() in text.lower()]
ranks.sort(key=lambda x: x[1])
print(datetime.date.today(), engine, prompt, ranks)JavaScript Implementation
const API_KEY = process.env.SCAVIO_API_KEY;
async function ask(engine, prompt) {
const r = await fetch("https://api.scavio.dev/api/v1/ask", {
method: "POST",
headers: { "x-api-key": API_KEY, "content-type": "application/json" },
body: JSON.stringify({ engine, prompt }),
});
return (await r.json()).answer ?? "";
}
for (const engine of ["chatgpt", "perplexity", "claude"]) {
const answer = await ask(engine, "best serp api 2026");
console.log(engine, answer.slice(0, 200));
}Platforms Used
Web search with knowledge graph, PAA, and AI overviews