Originally posted on the Scrapio blog — sharing here too.
Understanding a competitor's content strategy means knowing what pages they have, what topics they cover, and how they structure their information. Manual browsing doesn't scale. Scrapio's Crawl endpoint spiders an entire domain automatically and returns everything as structured data.
What you'll need
- A Scrapio API key (any plan — Crawl isn't gated to a specific tier)
- Python
Start a crawl
Pass seeds (an array of starting URLs), max_pages (up to 50), max_depth, and an optional extract object to pull structured data from each page.
import httpx
import json
API_KEY = "sk-..."
BASE = "https://api.scrapio.dev"
resp = httpx.post(
f"{BASE}/v1/crawl",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"seeds": ["https://competitor.com"],
"max_pages": 50,
"max_depth": 4,
"same_domain_only": True,
"output": ["json"],
"extract": {
"mode": "schema",
"schema": {
"title": "string",
"description": "string",
"word_count": "integer",
"publish_date": "string",
},
},
},
timeout=300,
)
resp.raise_for_status()
result = resp.json()
The crawl runs synchronously and returns when complete.
Inspect the results
pages = result["result"]["pages"]
summary = result["result"]["summary"]
print(f"Pages fetched: {summary['pages_fetched']}")
print(f"Pages succeeded: {summary['pages_succeeded']}")
print(f"Pages failed: {summary['pages_failed']}")
Each page in pages looks like:
{
"url": "https://competitor.com/blog/web-scraping-guide",
"depth": 1,
"status": "completed",
"outputs": {
"json": {
"title": "The Complete Guide to Web Scraping",
"description": "Everything you need to know about extracting data from websites.",
"word_count": 3842,
"publish_date": "2026-03-15"
}
}
}
Export to JSON
with open("competitor_content.json", "w") as f:
json.dump(pages, f, indent=2)
print(f"Exported {len(pages)} pages")
Analyze with pandas
import pandas as pd
rows = [
{
"url": p["url"],
"depth": p["depth"],
"status": p["status"],
**p.get("outputs", {}).get("json", {}),
}
for p in pages
if p["status"] == "completed"
]
df = pd.DataFrame(rows)
print("Average word count:", df["word_count"].mean())
print("\nTop 10 longest pages:")
print(df.nlargest(10, "word_count")[["url", "word_count"]])
What to look for
- Content gaps — topics they cover that you don't
- Word count distribution — how long are their top-performing pieces?
-
Update frequency — filter by
publish_dateto see how often they publish - URL structure — how is their site organized? What categories do they prioritize?
Next steps
- Try the Full Site Crawl to JSON template for the complete recipe
- See Site Map Discovery to map a domain's URL structure without downloading full content
- Read the Crawl API docs
Top comments (0)