YouTube Angle Finder is a small Python script for creators and marketers looking for YouTube video ideas. Give it a niche or a product question and it finds YouTube videos on that topic, then writes a short brief: angles already covered, with links, and gaps that look thin.
The problem
Before making a video, creators want to know what already exists so they do not repeat it. Searching YouTube and noting each video's angle by hand is slow, and it is easy to miss the gaps that nobody has covered well.
What the app does
- Takes a niche or question in plain words.
- Finds YouTube video links on the topic.
- Gets each video's real title and channel from public YouTube oEmbed.
- Writes a brief of covered angles, with links, and thin gaps.
- Shows what the run cost.
How it works
- Try the YouTube source.
POST /desearch/ai/searchwithtools: ["youtube"]. If that source is not available for the request, the script switches to the web path below. - Find videos.
POST /desearch/ai/searchwithtools: ["web"], links only, and the promptsite:youtube.com <your question>. - Titles. Public YouTube oEmbed (no key) for each video's title and channel.
- Brief. A second
POST /desearch/ai/searchwith a summary and a system message listing the verified titles, so the brief is grounded in those videos.
The code
def post(self, url: str, payload: dict, label: str) -> dict:
log(f"POST {url} ({label}) tools={payload.get('tools')} result_type={payload.get('result_type')} "
f"date_filter={payload.get('date_filter')}")
t0 = time.perf_counter()
r = requests.post(url, json=payload, timeout=180,
headers={"Authorization": self.key, "Content-Type": "application/json"})
latency = time.perf_counter() - t0
try:
body = r.json()
except ValueError:
body = {"_non_json_body": r.text[:20000]}
rec = {"when": now_local(), "label": label,
"request": {"method": "POST", "url": url,
"headers": {"Authorization": "<redacted>", "Content-Type": "application/json"},
"body": payload},
"status": r.status_code, "latency_s": round(latency, 2),
"content_type": r.headers.get("Content-Type"),
"cost_headers": {h: r.headers.get(h) for h in COST_HEADERS},
"response": body}
self.calls.append(rec)
log(f"HTTP {r.status_code} in {rec['latency_s']} s, content-type {rec['content_type']}, "
f"cost ${rec['cost_headers']['X-Desearch-Cost-Usd']}")
if self.raw_dir:
Path(self.raw_dir).mkdir(parents=True, exist_ok=True)
n = len(self.calls)
Path(self.raw_dir, f"{self.tag}-{n}-{label}.json").write_text(json.dumps(rec, indent=2, ensure_ascii=False))
return recThe snippet shows the web path the script uses for links. The folder has one script, angles.py, and a sample brief in sample-output.md.
Endpoints
POST /desearch/ai/search
Example output
From runs on 2026-10-04 for "AI coding agents for solo founders": the brief lists the angles existing videos already take, each with links, and a short list of gaps that look thin. Each call cost $0.004.
Run it yourself
The public examples folder linked above includes the script and a README. Install its requirements, set DESEARCH_API_KEY from console.desearch.ai, and use the run command in that README.
Useful flags: --links-only (video list only, one call), --count (results per source), --out-dir (where reports go), --replay PREFIX (re-render a saved run).
What it costs
Every successful POST /desearch/ai/search call cost $0.004 on 2026-10-04, so a brief on the web path (2 calls) is $0.008. See pricing.
Ideas to extend it
The brief keeps links beside the covered angles, so creators can open the videos while planning a topic. Public YouTube oEmbed supplies the real title and channel for each video. Change the niche or product question to use the same workflow for another brief.
- Run it for 10 niche questions and pick the biggest gap.
- Add view counts from the YouTube Data API.
- Turn each gap into a draft outline.
