Scope and rules
What the crawler reads, what it skips, and how it stays polite
Hosts
scope.allowed_hosts defaults to the hosts of the start URLs, and www. counts as the same host. Set scope.include_subdomains: true to widen each allowed host to its subdomains (for example example.com then also covers docs.example.com).
Include and exclude patterns
Patterns are matched against the whole path of a URL, and they are case-sensitive.
*matches inside one path segment and**across segments:/blog/*matches/blog/hello, and/blog/**matches every page under/blog/as well as/blogitself.- A pattern without
?ignores the query string. A pattern with?is matched against the path and the query, for example/search?page=*. - An excluded page is out, whatever the include patterns say.
- When include patterns are given, a page must match one of them.
- Start URLs are always read, whatever the patterns say (robots.txt still applies).
- Obvious non-page files (images, archives, media, PDF) are never scheduled.
"scope": {
"include": ["/catalogue/category/books/mystery_3/**", "/catalogue/*/index.html"],
"exclude": ["/catalogue/*/print"],
"max_depth": 2,
"max_pages": 40
}
Depth and page limits
scope.max_depth counts the links between a page and the nearest start URL: 0 reads the start URLs only, the default is 3 and the maximum 20. The crawl goes breadth-first, so the pages closest to the start URLs are read first.
scope.max_pages (default 100) counts the pages scheduled, including pages that fail, at most 2000. When it is reached the job stops with stop_reason: "max_pages".
Sitemap mode
mode: "sitemap" lists the in-scope addresses of the site's sitemaps (sitemap indexes included) and reads no page: no page calls, no credits. The records come back with state: "listed".
# List the in-scope addresses of a site's sitemaps: no page calls, no credits
curl -X POST https://api.ujeebu.com/crawl \
-H "ApiKey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://www.example.com/"], "mode": "sitemap", "scope": {"include": ["/products/"], "max_pages": 1000}}'In crawl mode, use_sitemap: true adds the sitemap's in-scope addresses to the start URLs, which helps on sites whose pages are poorly linked.
robots.txt and politeness
- robots.txt is read for the
UjeebuBottoken, then for the generic rules. A disallowed page is recorded witherror_class: "robots", never fetched and never billed. - A
Crawl-delayis respected, up to 30 seconds per host. - Each job keeps a small number of pages in flight (
concurrency, 2 by default), within your account's own concurrency limit; at most5. - The crawler never asks for a CAPTCHA to be solved: a bot check is recorded as
blocked.
Spin up an API key in 60 seconds
Free trial: 5,000 credits for 21 days, no card, every endpoint on this page (proxy country needs a paid plan or a top-up pack).