Listicle Gap Finder is a small Python script for link building outreach that finds best-of pages with GET /web and reads them with GET /web/extract. Give it your brand, 3 to 5 other brands in your category and 5 to 8 buyer searches. It reads the pages that rank for those searches and flags the "gap" pages: best-of lists that name 2 or more of the other brands but not yours.
The problem
"Best X tools" and "X alternatives" pages send buyers straight to the brands they list, and AI answers read them too. Finding the ones that leave you out means searching, opening every page and counting names by hand.
What the app does
- Takes your brand, other brand names and buyer searches.
- Collects ranking pages from two search sources and removes duplicates.
- Reads each page and counts which brands it names, as whole words.
- Flags pages that name 2 or more other brands but not you.
- Writes a Markdown outreach list and a CSV with one row per page.
How it works
- Search.
GET /webfor ranked results andPOST /desearch/ai/search/links/webfor a second list of links per search. - Sort for reading. On-topic and roundup-style titles first.
- Read the top pages with
GET /web/extractas text. - Count brands and flag the gaps.
- Write the outreach list, CSV and a cost line.
The code
The folder has one script, listicle_gap.py, and an example queries.txt.
Endpoints
GET /webPOST /desearch/ai/search/links/webGET /web/extract
API details
Three routes, called by the three methods in the code above:
| Route | Parameters in this script |
|---|---|
GET /web | query, start (0 to 100) |
POST /desearch/ai/search/links/web | prompt, tools: ["web"], count (--links-count, default 10; the API takes 10 to 200) |
GET /web/extract | url, format=text, js=false |
Trimmed responses, with the field types from openapi.json:
The first is GET /web, up to 20 results per request. The second is the links route. GET /web/extract with format=text returns plain text, not JSON.
Edge cases from the API reference: a page Extract cannot serve answers with an error_code (page_not_found or no_content) and is not charged; the script retries such a page once. The links route is marked deprecated in favor of POST /search, and it keeps working.
Background reading: SERP checker API: build a keyword rank checker in Python.
Example output
One full run with the defaults, measured on 2026-10-08, read up to 40 pages and cost $0.047, about 2 minutes 25 seconds. The outreach list shows each gap page with its title, URL, which other brands it names and which searches found it.
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: --max-pages (pages to read, default 40), --links-count (links per search, default 10), --redact (hide words before sharing a sample), --from-raw FILE (offline, no cost).
What it costs
A full run measured on 2026-10-08 cost $0.047, summed from the X-Desearch-Cost-Usd headers. See pricing.
Ideas to extend it
- Re-run monthly; lists get updated.
- Sort gap pages by domain strength from your SEO tool.
- Pair it with the AI visibility tracker to pitch pages AI answers cite.
