Endpoints
Map
Give it a site and get the addresses of its pages, in one answer.
Copy as MarkdownOpen in ChatGPT (opens in a new tab)Open in Claude (opens in a new tab)
POST https://api.millionshort.com/v1/mapMap answers one question about a site: which pages does it have? Give it the address of a page of the site and it returns the URLs it found, without fetching their content. The call is synchronous: one request, one answer.
Crawl goes one step further. It returns the pages themselves as clean text, as a job that runs in the background.
What it is for
- Finding the right page before reading it. The pricing page, the changelog, the docs for one function.
searchputs the URLs that match your words first. - Handing an agent the outline of a site. A list of URLs with titles is small enough to read whole.
- Choosing what to read. Send the URLs you want to Extract, or let a crawl fetch a section.
Where the URLs come from
Map looks in three places and merges what it finds. Each URL says which one named it first, in from.
| Source | What it is | What reaches the site |
|---|---|---|
sitemap | The site's own sitemaps: the ones its robots.txt names, and /sitemap.xml | robots.txt and a few sitemap files |
links | The page you named, and the links on it | One fetch of that page |
index | The pages of the site that our own index holds, each with its title and labels | No page. Asked alone, its robots.txt |
The index source is what a list of links cannot give you: URLs come back with a title, a topic and a page_type, and no page of the site is requested for them.
How we treat the site
Map fetches the way Extract does. Requests carry our declared identity, MillionShortBot. robots.txt is honoured, and there is no option to ignore it. A sitemap file that robots.txt closes to our bot is not read, and a site whose robots.txt closes it to us is not mapped at all, not even from our index: when you ask for the index alone, we still read the site's robots.txt first. A caller cannot send cookies or headers to a site.
In this section
Map or a search inside a site
A search with include_domains finds the pages of a site that our index holds and that match a query:
curl https://api.millionshort.com/v1/search \
-H "Authorization: Bearer $MILLIONSHORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "query": "pricing", "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": "pricing",
"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": "pricing",
"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": "pricing",
"include_domains": [
"example.org"
],
"num_results": 20
}
}
}It is not a list of every page the site has, which is what Map is for.
With the other endpoints
Crawl uses the same sources to find pages and returns their text. Extract reads URLs you already have. Search finds pages across every site.