Crawl a site
crawl_siteCrawl a website from a starting URL, follow its internal links, and get concise summaries of every page while respecting robots.txt and optional limits.
Instructions
Crawl a site from url, following its links, and summarise every page.
url: an http(s) address where the crawl starts; only links on its site are followed. max_pages: the most pages taken, 1 to 25. max_depth: the most links from url, 0 to 3; 0 reads url alone. respect_tdm: give a page whose site reserves its text and data mining rights (TDMRep) as a tdm_reserved error, never its summary. include: text an address must contain for its link to be followed (any one of them); plain text, not a pattern. exclude: text that stops a link being followed when its address contains it.
Returns {"ok", "url", "pages", "stopped"}. Pages come breadth first, each {"ok", "url", "depth", "found_on", "landed", "fetch", "canonical", "summary", "sources", "types", "links"} -- the summary and the types declared, not the records; call extract_declared on a page for those -- or, when it has nothing, {"ok": false, "error"} with the page's reason. stopped is "done", "max_pages" (links were left unfollowed) or "time_budget" (a minute passed). One request at a time, a second apart or the site's Crawl-delay, robots.txt obeyed; a page asked again after a request that may succeed later says so in "retries". ok is false only when no page could be read, and error then says why. Past 75,000 bytes the heaviest summary answers of any page go first, named in that page's summary_left_out, then the last pages, counted in pages_left_out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | an http(s) address where the crawl starts; only links on its site are followed. | |
| exclude | No | text that stops a link being followed when its address contains it. | |
| include | No | text an address must contain for its link to be followed (any one of them); plain text, not a pattern. | |
| max_depth | No | the most links from url, 0 to 3; 0 reads url alone. | |
| max_pages | No | the most pages taken, 1 to 25. | |
| respect_tdm | No | give a page whose site reserves its text and data mining rights (TDMRep) as a tdm_reserved error, never its summary. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| url | No | ||
| error | No | ||
| pages | No | ||
| stopped | No | ||
| pages_left_out | No |