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:
| Pass | Request | What it shows |
|---|---|---|
| The head | only_top_sites: 1000 | What the well-known sites say. Your baseline |
| The middle | remove_top_sites: 1000 | Specialist publishers and trade sites |
| The tail | remove_top_sites: 100000 | Small sites, clubs, personal pages, first-hand accounts |
| The small web | sources: ["smallweb"] | Independent writers, as a source of its own |
| The conversation | sources: ["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
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")import { MillionShort } from 'millionshort';
const client = new MillionShort({ apiKey: process.env.MILLIONSHORT_API_KEY });
const QUERY = 'restoring a cast iron skillet';
const PASSES = {
head: { onlyTopSites: 1000 },
middle: { removeTopSites: 1000 },
tail: { removeTopSites: 100000 },
'small web': { sources: ['smallweb'] },
conversation: { sources: ['discussions'] },
};
const seen = new Set<string>();
let spent = 0;
for (const [name, options] of Object.entries(PASSES)) {
const r = await client.search(QUERY, { numResults: 10, excludeRisky: true, ...options });
spent += r.usage?.credits ?? 0;
console.log(`\n== ${name}`);
for (const hit of r.results) {
if (seen.has(hit.url)) continue;
seen.add(hit.url);
console.log(hit.popularity.bucket.padStart(9), hit.site, hit.title.slice(0, 70));
}
}
console.log(`\n${seen.size} 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:
- Look at
risk. Skip anything that carries a label unless you have a reason.exclude_risky: true, as in the code above, does it in the request. - Ask why it ranked. Add
"explain": trueand readwhyandsignals: a page with the query in its title, a reasonable length inwordsand somelink_authorityis a different thing from a thin page that matched two words. - Narrow by kind of page.
page_types: ["articles", "blogs", "tutorials", "forums"]keeps writing and drops shop pages and directories, andexclude_page_typesnames the kinds to drop instead. Both act onwebandnewsresults.GET /v1/sourceslists the slugs. - Find a second source. A claim found once in the tail is a lead. Search for the claim itself, and see who else says it.
- Check the site.
POST /v1/domainreturns popularity and risk for up to 25 sites in one call.
Follow a good find
When one page is clearly written by someone who knows the subject:
- Search that site alone:
include_domains: ["example.org"]with a broader query shows what else they wrote. - Search around it: put the sites you have already read in
exclude_domainsand run the query again, so each pass brings something new. - Move it up:
boost_domainskeeps a trusted site at the top of later searches on the same subject.
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
}'import os
import requests
r = requests.post(
"https://api.millionshort.com/v1/search",
headers={"Authorization": "Bearer " + os.environ["MILLIONSHORT_API_KEY"]},
json={
"query": "cast iron seasoning",
"include_domains": [
"example.org"
],
"num_results": 20
},
timeout=30,
)
r.raise_for_status()
for hit in r.json()["data"]["results"]:
print(hit["position"], hit["title"], hit["url"])const res = await fetch('https://api.millionshort.com/v1/search', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MILLIONSHORT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"query": "cast iron seasoning",
"include_domains": [
"example.org"
],
"num_results": 20
}),
});
if (!res.ok) throw new Error(`POST /v1/search failed: ${res.status}`);
const { data } = (await res.json()) as {
data: { results: { position: number; title: string; url: string }[] };
};
for (const hit of data.results) console.log(hit.position, hit.title, hit.url);The same call as a tool of the MCP server:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search",
"arguments": {
"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:
- What a company itself said:
finance. - What the statute or the opinion says:
law. - Who was awarded the contract:
contracts. - The paper, not the article about the paper:
academicormedical.
Each has its own page under the sources, with the fields its results carry.
Limits to keep in mind
- The
websource is refreshed periodically and its results carry no date. For anything recent, addnewsorsocial. See Freshness. - Popularity belongs to the site, not the page: a personal page hosted on a large platform carries the platform's rank and is removed with it. The
smallwebpass is there to catch those. - A snippet is up to 2,000 characters of a page, not the page.
include_content: trueadds the page text we hold towebandnewsresults, as it was when we captured it. Read the page itself before you quote it.
Next
- Remove the top sites and Lenses, in full.
- Use cases: primary-source research and research agents.
- Glossary: What is long-tail search?