You can verify competitor pricing claims by searching for their pricing page via the Scavio API, extracting the pricing snippets from search results, and comparing them against your internal records to flag stale or incorrect claims.
Prerequisites
- Python 3.9+
- Scavio API key
- requests
Walkthrough
Step 1: Search for a competitor's pricing page
Use site: operator to target only the competitor's own domain.
import requests
API_KEY = "your-scavio-api-key"
def get_pricing_snippets(competitor_domain: str) -> list:
query = f"site:{competitor_domain} pricing"
r = requests.post(
"https://api.scavio.dev/api/v1/search",
json={"query": query, "num_results": 5},
headers={"x-api-key": API_KEY},
timeout=15
)
r.raise_for_status()
results = r.json().get("organic_results", [])
return [{
"title": res.get("title"),
"snippet": res.get("snippet", ""),
"url": res.get("link")
} for res in results]Step 2: Extract price mentions from snippets
Use regex to pull out dollar amounts from the SERP snippets.
import re
def extract_prices(snippets: list) -> list:
price_pattern = re.compile(r"\$\d+(?:\.\d+)?(?:/mo|/month|/year|/user)?")
all_prices = []
for s in snippets:
found = price_pattern.findall(s.get("snippet", ""))
if found:
all_prices.append({
"url": s["url"],
"prices_found": found,
"snippet": s["snippet"][:200]
})
return all_pricesStep 3: Compare with internal pricing data
Cross-reference extracted prices against your stored competitor prices.
from datetime import date
INTERNAL_PRICES = {
"competitor.com": {"starter": "$29/mo", "pro": "$99/mo"},
"othercompetitor.com": {"starter": "$49/mo", "pro": "$149/mo"}
}
def verify_prices(domain: str) -> dict:
snippets = get_pricing_snippets(domain)
extracted = extract_prices(snippets)
internal = INTERNAL_PRICES.get(domain, {})
internal_values = list(internal.values())
mismatches = []
for row in extracted:
for price in row["prices_found"]:
if internal_values and price not in internal_values:
mismatches.append({"serp_price": price, "internal": internal_values, "url": row["url"]})
return {
"domain": domain,
"checked_date": str(date.today()),
"serp_prices": extracted,
"mismatches": mismatches,
"status": "stale" if mismatches else "ok"
}
result = verify_prices("competitor.com")
print(result["status"], result["mismatches"])Python Example
import requests
import re
from datetime import date
API_KEY = "your-scavio-api-key"
COMPETITORS = {
"tavily.com": {"free": "$0", "standard": "$30/mo", "advanced": "$100/mo"},
"exa.ai": {"free": "$0", "base": "$7/1k"}
}
def get_snippets(domain):
r = requests.post(
"https://api.scavio.dev/api/v1/search",
json={"query": f"site:{domain} pricing", "num_results": 5},
headers={"x-api-key": API_KEY}, timeout=15
)
r.raise_for_status()
return r.json().get("organic_results", [])
def extract_prices(results):
pat = re.compile(r"\$[\d,]+(?:\.\d+)?(?:/(?:mo|month|year|user|1k))?")
prices = set()
for res in results:
prices.update(pat.findall(res.get("snippet", "")))
return list(prices)
def verify_all():
report = []
for domain, known in COMPETITORS.items():
results = get_snippets(domain)
found = extract_prices(results)
known_vals = list(known.values())
new_prices = [p for p in found if p not in known_vals]
report.append({"domain": domain, "known": known_vals, "serp": found,
"new_prices_detected": new_prices,
"status": "check needed" if new_prices else "ok",
"date": str(date.today())})
return report
if __name__ == "__main__":
for item in verify_all():
print(f"\n{item['domain']}: {item['status']}")
print(f" Known: {item['known']}")
print(f" SERP: {item['serp']}")
if item["new_prices_detected"]:
print(f" ALERT: New prices found: {item['new_prices_detected']}")JavaScript Example
const API_KEY = 'your-scavio-api-key';
async function getPricingSnippets(domain) {
const res = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'x-api-key': API_KEY },
body: JSON.stringify({ query: `site:${domain} pricing`, num_results: 5 })
});
const data = await res.json();
return data.organic_results ?? [];
}
function extractPrices(results) {
const pat = /\$[\d,]+(?:\.\d+)?(?:\/(?:mo|month|year|1k))?/g;
const prices = new Set();
for (const r of results) (r.snippet ?? '').match(pat)?.forEach(p => prices.add(p));
return [...prices];
}
const snippets = await getPricingSnippets('tavily.com');
const prices = extractPrices(snippets);
console.log('Prices found on SERP:', prices);Expected Output
tavily.com: check needed
Known: ['$0', '$30/mo', '$100/mo']
SERP: ['$0', '$30/mo', '$50/mo', '$100/mo']
ALERT: New prices found: ['$50/mo']
exa.ai: ok
Known: ['$0', '$7/1k']
SERP: ['$0', '$7/1k']