Menu

Guides

Long-tail research

A method for finding what the first page of any search engine does not show you.

Copy as MarkdownOpen in ChatGPT (opens in a new tab)Open in Claude (opens in a new tab)

The first page of results for most questions is the same few sites. Research that stops there repeats what everyone already read. This guide is a method for going past it on purpose, with working code.

The idea

Run the same query at several depths and compare what comes back:

PassRequestWhat it shows
The headonly_top_sites: 1000What the well-known sites say. Your baseline
The middleremove_top_sites: 1000Specialist publishers and trade sites
The tailremove_top_sites: 100000Small sites, clubs, personal pages, first-hand accounts
The small websources: ["smallweb"]Independent writers, as a source of its own
The conversationsources: ["discussions"]What people who did it say to each other

Each pass is one search and costs 1 credit. Five passes cost 5 credits.

Run the passes

Example
Python
import os

from millionshort import MillionShort

client = MillionShort(api_key=os.environ["MILLIONSHORT_API_KEY"])

QUERY = "restoring a cast iron skillet"
PASSES = {
    "head": {"only_top_sites": 1000},
    "middle": {"remove_top_sites": 1000},
    "tail": {"remove_top_sites": 100000},
    "small web": {"sources": ["smallweb"]},
    "conversation": {"sources": ["discussions"]},
}

seen, spent = set(), 0.0
for name, options in PASSES.items():
    r = client.search(QUERY, num_results=10, exclude_risky=True, **options)
    spent += r.usage.credits
    print(f"\n== {name}")
    for hit in r.results:
        if hit["url"] in seen:
            continue
        seen.add(hit["url"])
        print(f'{hit["popularity"]["bucket"]:>9}  {hit["site"]}  {hit["title"][:70]}')
print(f"\n{len(seen)} distinct pages for {spent} credits")

Read the tail critically

The long tail holds the best pages on the web and some of the worst. Less popular does not mean more true. Before you rely on a page:

Follow a good find

When one page is clearly written by someone who knows the subject:

  1. Search that site alone: include_domains: ["example.org"] with a broader query shows what else they wrote.
  2. Search around it: put the sites you have already read in exclude_domains and run the query again, so each pass brings something new.
  3. Move it up: boost_domains keeps a trusted site at the top of later searches on the same subject.
Example
Shell
curl https://api.millionshort.com/v1/search \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "cast iron seasoning",
    "include_domains": ["example.org"],
    "num_results": 20
  }'

Primary sources

For some questions the tail is not a blog but a record. Ask the source that holds it:

Each has its own page under the sources, with the fields its results carry.

Limits to keep in mind

Next

This page as Markdown ยท llms.txt