Menu

Map

Map guides

The jobs Map is built for, each as the requests that do it.

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

Find the docs of a site, then read them

Map chooses the pages. Extract reads them.

  1. List the documentation section:
Example
Shell
curl https://api.millionshort.com/v1/map \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.org/docs", "include": ["^/docs/"], "limit": 200 }'
  1. Choose the URLs worth reading, by address and by title, and by page_type where our index knows the page. Send up to 20 of them to Extract, or more as a batch:
Example
Shell
curl https://api.millionshort.com/v1/extract \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": ["https://example.org/docs/start", "https://example.org/docs/webhooks"],
    "mode": "live"
  }'

When you want every page of the section and do not need to choose, a crawl with the same include does both steps as one job.

Search inside a site

An agent that needs one page of a site, such as the pricing page or the changelog, should not read the whole list. Send the words:

Example
Shell
curl https://api.millionshort.com/v1/map \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.org/", "search": "refund policy", "limit": 10 }'

The first URLs are the pages our index finds for those words in the text of the page. A page can match without the words in its address. After them come the URLs whose address or title has every word. A small limit keeps the call at 1 credit.

A line for your agent's instructions: "To find one page of a known site, call map with the site's address as url, what you are looking for as search, and a limit of 10."

Which sources to ask for

All three are asked by default, and that is right for most calls. Choose when you know more:

You wantAsk forWhy
The fullest listall threeEach source knows pages the others do not
No page of the site requested["index"]Our index answers. The site is asked for its robots.txt only, so that a site closed to our bot stays closed. You get up to 50 URLs, with titles and labels
Only what the site itself publishes["sitemap"]The site's own list, with its dates
What a visitor of one page can reach["links"]The page and its links, nothing else

What truncated means

summary.truncated is true in two cases:

For a very large site, map one section at a time: give the section's address as url and its path as include. When limit cut the list, search and include do more for you than a larger limit. When the sitemaps were not read to the end, they do not help: patterns are applied to what was read, and the files are read from the start each time. The links and index sources still answer for the section you named.

Subdomains

By default Map lists the host you named, with or without www.. With include_subdomains: true it also lists other hosts of the same site, such as docs.example.org when you asked about example.org. It never lists another site.

Staying polite

Map makes few requests to a site, and they follow the rules every fetch of ours follows: our declared identity, robots.txt, and the pace a site should be asked at. A site whose robots.txt closes it to our bot answers 403 ROBOTS_DISALLOWED. There is nothing to work around, and no option to try. Errors has the rest.

This page as Markdown ยท llms.txt