Menu

Map

Map parameters

Every field of a Map request, the three sources, and everything that comes back.

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

Text
POST https://api.millionshort.com/v1/map

Lists the URLs of a site in one answer. The call is synchronous.

Request

FieldTypeDefaultNotes
urlstringRequired. A page of the site: http or https, default ports, a host name (not an address), no credentials in the URL. Up to 2,048 characters. It is in scope whatever the patterns say: it is listed when the links source read it (as the address it ended on, when it redirects) or another source names it
searchstring, up to 200 charactersKeep only the URLs that match these words. See Search inside the site
limitinteger, 1 to 5,000500The most URLs returned. Credits are held for this many
include_subdomainsbooleanfalseAlso list URLs on other hosts of the same site. By default only the host you named, with or without www.
includearray of up to 20 patternsKeep only URLs whose path matches one of these. See Patterns
excludearray of up to 20 patternsLeave out URLs whose path matches one of these. Wins over include
sourcesarray of sitemap, index, linksall threeWhere to look. See Sources

Any other field is a 400 INVALID_PARAM. A caller cannot send cookies or headers to the site, and there is no option to ignore robots.txt.

Example

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",
    "search": "webhooks",
    "limit": 50,
    "include": ["^/docs/"],
    "sources": ["sitemap", "index", "links"]
  }'

Sources

SourceWhere the URLs come fromWhat it adds to a URLRequests to the site
linksThe page at url, and every link on ittitle: the page's own title, or the text of the linkOne fetch of the page, as Extract live makes it
sitemapThe Sitemap: lines of the site's robots.txt, and /sitemap.xml. Index files are followed and gzipped files are readlast_modified, when the sitemap gives onerobots.txt and up to 12 sitemap files
indexThe pages of the site that our own index holds: up to 50, the ones that match search when you send ittitle, topic and page_typeNo page. When index is the only source, the site's robots.txt is read, and nothing else

Patterns

include and exclude are regular expressions matched against the path of a URL, and only the path: not the host and not the query string. They are not anchored.

PatternMatches
/docs/Any path that contains /docs/
^/docs/Paths that start with /docs/
\.pdf$Paths that end in .pdf
^/blog/2026/The 2026 posts of a blog

Each pattern is up to 200 characters. One that is not a valid regular expression is a 400 INVALID_PARAM that names it. The page at url is in scope whatever the patterns say.

Search inside the site

With search, the answer keeps only matching URLs, best first:

  1. The pages our index finds for your words in the text of the page, in the order our index ranks them. This is a real search of the page text, restricted to the site.
  2. Then the URLs from the sitemap and the links whose address or title contains every word. A word in the path counts for more than one in the title.

Everything else is left out. summary.found counts what matched.

Response

JSON
{
  "data": {
    "url": "https://example.org/docs",
    "urls": [
      { "url": "https://example.org/docs/webhooks/signing", "title": "Signing webhooks", "from": "index", "topic": "programming", "page_type": "documentation" },
      { "url": "https://example.org/docs/webhooks", "title": "Webhooks", "last_modified": "2026-11-02", "from": "links" },
      { "url": "https://example.org/docs/webhooks/retries", "last_modified": "2026-09-30", "from": "sitemap" }
    ],
    "summary": {
      "found": 3,
      "returned": 3,
      "truncated": false,
      "by_source": { "links": 1, "sitemap": 1, "index": 1 }
    }
  },
  "usage": { "credits": 1, "cost_usd": 0.001, "breakdown": { "map": 1 } },
  "warnings": [],
  "request_id": "req_..."
}
FieldTypeNotes
data.urlstringThe page you named, as we read it
data.urls[].urlstringWithout its fragment. http and https, and a path with and without its last slash, are one URL
data.urls[].fromsitemap, index or linksThe first source that named the URL
data.urls[].titlestringWhen known: the page's title or the text of a link
data.urls[].last_modifiedstringWhen the sitemap gives a date, as the site wrote it
data.urls[].topic, page_typestringFor URLs our index holds: the same labels Extract returns
data.summary.foundintegerURLs in scope, after search and before limit
data.summary.returnedintegerURLs in this answer
data.summary.truncatedbooleantrue when the site has more than was returned
data.summary.by_sourceobjectHow many URLs each source named first

A field that is not known is left out of the entry.

Warnings

A source that could not be read does not fail the call. The answer carries a source_unavailable warning with the source and a reason, and the URLs of that source are missing. The whole call answers within about 25 seconds: when a slow site uses that time up, the sources left are skipped with reason: TIMEOUT. The call fails only when no source answered. See Errors.

Credits

1 credit for every 10 URLs returned, or part of 10, and never less than 1. A call that fails, or that finds no URL, costs nothing. Pricing and limits has examples.

This page as Markdown ยท llms.txt