Playground Sign in Start free
Use case · Website to RAG knowledge base

Crawl an entire website into Markdown for RAG and support chatbots.

To turn a website into a RAG knowledge base or a support chatbot, crawl it as one job: the Crawl API reads every page under your include patterns and returns its main content as Markdown, with its URL, title and a sha256. A free quote gives the most a crawl can cost before it starts, and max_credits is a hard cap. At 10 credits a Markdown page, our own 20-page docs crawl cost 200 credits and gave 363 chunks.

Free: the site sizer and the quote · 5,000 free credits · no card
Request
POST /crawl
{
  "urls": ["https://ujeebu.com/docs"],
  "scope": {"include": ["/docs/**"], "max_pages": 20},
  "use_sitemap": true,
  "format": "markdown",
  "markdown": {"filter": "fit"},
  "max_credits": 200,
  "webhook": {"url": "https://kb.example.com/hooks/crawl"}
}

→ 202 Accepted
{"job_id": "c_8c70cd66…", "status": "pending"}
Page records
GET /crawl/{id}/pages?content=true
{
  "pages": [
    {
      "seq": 8,
      "url": "https://ujeebu.com/docs/apis/scrape/raw",
      "state": "done",
      "http_status": 200,
      "title": "Scrape Raw",
      "depth": 0,
      "credits": 10,
      "links_total": 102,
      "sha256": "7f98d26867fb425e…",
      "markdown": "# Scrape Raw\n\nGet the raw HTML source code as received from the server without JavaScript execution. …"
    },
    …
  ],
  "next_after": 8,
  "has_more": true
}
A crawl bill you can trust

Know what the crawl costs before it starts.

A free quote gives the most a crawl can cost before it starts, and max_credits is a hard cap. Failed, blocked and robots-skipped pages are not billed, and every page has an honest state.

A free quote first

POST /crawl/quote takes the job body and starts nothing. For the 45 posts of our blog it answered 10 credits a page and a ceiling of 450 credits.

Quote
{
  "estimate": true,
  "credits_per_page": 10,
  "max_pages": 45,
  "credits_ceiling": 450,
  "sitemap": {"in_scope_urls": 45}
}

A cap that holds

max_credits counts each page once, so a cap equal to the quote's ceiling reads every page. Our 50-credit sample of the same blog stopped at its cap; the pages it never started cost nothing.

Job status
{
  "stop_reason": "max_credits",
  "credits_used": 50,
  "max_credits": 50,
  "errors": {"stopped": 40}
}

An honest state for every page

done, blocked, not_found, timeout, robots, duplicate or stopped, with the reason. A site that refuses everything reads as blocked, never as an empty site.

Page record
{
  "url": "https://books.toscrape.com/catalogue/the-page-that-moved_999/index.html",
  "state": "failed",
  "http_status": 404,
  "error_class": "not_found",
  "error": "Invalid status code from URL: 404"
}

Output of our runs on ujeebu.com and books.toscrape.com (November 17, 2026), trimmed; credit figures follow the price list.

The challenge

Why a whole site is harder to feed than one page.

One URL to Markdown is a solved problem. A whole site, kept fresh and clean, is where the work is.

Finding every page

Docs grow every week. A hand-kept URL list goes stale, and a naive link follower wanders into tag pages, print views and other hosts.

Boilerplate in every chunk

Menus, cookie banners and footers repeat on every page. Embedded as they are, they crowd out the answer and cost tokens on every query.

Knowing when it is done

A crawl takes minutes, not one request. Polling from a cron job is fragile: you want to be told, and to know the call really came from Ujeebu.

Re-embedding everything

Most pages do not change between two runs. Re-embedding all of them every week costs embedding calls and churns your index for nothing.

Where it fits

Three sources, one crawl request each.

Product docs

Docs and API references for a support chatbot.

Start from the docs home, include /docs/** and exclude what the chatbot should not answer from, like release archives. The fit filter keeps the main content of each page, so the chunks hold answers, not menus.

What you set
  • include and exclude patterns: * for one path segment, ** for any depth
  • max_depth, and max_pages up to 2,000 a job
  • use_sitemap to start from the sitemap as well
Help center

A help center that renders in the browser.

Many help centers build the article in JavaScript. Turn on page.js for the whole job and wait for the article body with page.wait_for. A Markdown page costs the same with or without JavaScript.

What you set
  • page.js and page.wait_for, once per job
  • robots.txt and Crawl-delay honoured
  • refused pages labelled blocked, never empty
Blog and guides

A content library for a research assistant.

List the posts for free with a sitemap listing first, so you know the size before you read a page. Then crawl with the bm25 filter and a query to keep only the passages about your topic.

What you set
  • mode "sitemap": in-scope URLs, 0 credits
  • markdown.filter "bm25" with markdown.query
  • our own blog: 45 URLs listed for 0 credits
How it works

Crawl, verify, load: three calls.

Put them in a scheduled job. The examples crawl our own docs; swap in your site and get a free quote for it first.

  1. 1

    Start the crawl with a webhook

    POST /crawl answers at once with a job_id and the crawl runs in the background, breadth first, with robots.txt honoured. An Idempotency-Key makes a retried call return the same job. When the job ends, Ujeebu sends one signed POST to your webhook.

    Start
    curl -X POST https://api.ujeebu.com/crawl \
      -H "ApiKey: $UJEEBU_KEY" -H "Content-Type: application/json" \
      -H "Idempotency-Key: docs-week-47" \
      -d @docs-crawl.json        # the request shown above
    
    → 202 {"job_id": "c_8c70cd66…", "status": "pending"}
    Webhook body
    {
      "event": "crawl.job.completed",
      "job_id": "c_8c70cd66…",
      "status": "completed",
      "stop_reason": "max_pages",
      "counts": {"discovered": 20, "done": 20, "failed": 0},
      "errors": {},
      "credits_used": 200,
      "archive": {
        "url": "https://…",
        "checksum_sha256": "…",
        "file_count": 21,
        "expires_at": "…"
      }
    }
  2. 2

    Verify the signature

    X-Ujeebu-Signature is an HMAC-SHA256 of "<timestamp>.<raw body>", keyed with your own API key. Recompute it over the raw bytes before parsing the JSON, compare in constant time, and refuse an old timestamp.

    Python
    import hashlib, hmac, time
    
    def verify(raw_body: bytes, headers, api_key: str) -> bool:
        ts = headers["X-Ujeebu-Timestamp"]
        if abs(time.time() - int(ts)) > 300:      # refuse old calls
            return False
        mac = hmac.new(api_key.encode(), ts.encode() + b"." + raw_body,
                       hashlib.sha256).hexdigest()
        return hmac.compare_digest("sha256=" + mac,
                                   headers["X-Ujeebu-Signature"])
  3. 3

    Load only what changed

    Read the pages 50 at a time with the cursor. Each record carries the sha256 of its Markdown: when it matches the one you stored last time, keep the old vectors. Pages that now come back as not_found leave the index. "store" stands for your vector store.

    Python
    import os, requests
    
    BASE = "https://api.ujeebu.com/crawl"
    H = {"ApiKey": os.environ["UJEEBU_KEY"]}
    
    def read_pages(job_id):
        after = 0
        while True:
            r = requests.get(f"{BASE}/{job_id}/pages", headers=H, params={
                "after": after, "limit": 50, "content": "true"}).json()
            yield from r["pages"]
            if not r["has_more"]:
                return
            after = r["next_after"]
    
    for p in read_pages(job_id):
        if p.get("error_class") == "not_found":
            store.delete(p["url"])                  # gone from the site
        elif p["state"] == "done" and store.sha256(p["url"]) != p["sha256"]:
            chunks = split_by_heading(p["markdown"])  # new or changed
            store.replace(p["url"], embed(chunks), p["sha256"])
RAG hygiene

What to keep out of the index, and how.

Retrieval quality is decided before the first embedding. Most of the noise can stay out of the crawl itself.

Keep outWhy it hurts answersHow
Menus, footers, cookie bannersThey repeat on every page and crowd out the answer.markdown.filter "fit", the default, keeps the main content of each page.
Changelogs and release notesOld versions answer today's questions with outdated facts.scope.exclude: ["/changelog/**", "/releases/**"]
TranslationsThe same answer in five languages fills the top results.scope.exclude: ["/fr/**", "/de/**", "/ja/**"], or include only /en/**.
Duplicate pagesTwo copies of a passage push other answers out of the results.Index each sha256 once: pages with the same content have the same checksum.
Print views, tag and search pagesThin or repeated text with no answer of its own.scope.exclude: ["/**/print", "/tags/**", "/search"]
Oversized pagesOne huge page turns into hundreds of weak chunks.Split by heading. A page over 2 MB comes as a content_url; one over 10 MB fails with error_class error, and its read is billed.
What it costs

A 300-page docs site, refreshed every week.

Prices come from the price list: 10 credits per Markdown page, with or without JavaScript rendering. Our own 20-page docs crawl cost 200 credits and gave 363 chunks.

Quote and sitemap listing
POST /crawl/quote, nothing is read
free
First crawl
300 pages × 10 credits
3,000
Weekly refreshes
4 runs × 300 pages × 10 credits
12,000
First month
About $2.45 at the Starter rate (Starter: $49 a month for 300,000 credits)
15,000 credits
  • Failed, blocked and robots-skipped pages are not billed. A page is read and billed once per run, like a direct call; max_credits counts each page once, so a cap equal to the quote's ceiling reads every page.
  • Version 1 reads every page on each refresh. The sha256 comparison saves your embedding calls and index churn, not crawl credits.
  • Premium and residential proxies cost more than the default proxy.
What you get

Everything a knowledge-base pipeline needs from a crawl.

Main content as Markdown

The fit filter keeps the main content of each page (the default), raw keeps the whole page, and bm25 with a query keeps the passages that match it. The title is the page's first heading.

Scope you control

Up to 20 start URLs, the hosts to stay on, include and exclude path patterns, a maximum depth and up to 2,000 pages a job.

A hard credit cap

POST /crawl/quote prices the job before it starts, and max_credits stops it before a page that would go past your cap.

Signed webhook

One POST when the job ends, signed with HMAC-SHA256 and your own API key, with a timestamp and a delivery id.

A sha256 per page

Each record carries the checksum of its content. Compare it with the last run to find the new and changed pages.

Honest page states

Every page says what happened: done, blocked, not_found, timeout, robots or duplicate. Failed, blocked and robots-skipped pages are not billed.

FAQ

Questions people ask about crawling a site for RAG.

What is the best way to crawl an entire website into Markdown for RAG?
Crawl it as one job that returns each page as main-content Markdown. With the Ujeebu Crawl API you send the start URL and include patterns, ask for a free quote, and read every page as Markdown with its URL, title and a sha256, at 10 credits a page. A free quote gives the most a crawl can cost before it starts, and max_credits is a hard cap.
How do I crawl a documentation site to build a support chatbot?
Start a crawl on the docs home with include ["/docs/**"] and format "markdown", and exclude changelogs and translations. When the signed webhook arrives, read the pages 50 at a time, split each one by heading, embed the chunks and store each page URL with its chunks so the chatbot can cite it.
How do I keep a RAG knowledge base in sync when the website changes?
Run the same crawl on a schedule and compare each page's sha256 with the one you stored: re-embed only the new or changed pages, and remove the pages that now come back as not_found. Version 1 reads and bills every page on each run, so the comparison saves embedding work, not crawl credits.
How much does it cost to crawl a website for RAG?
10 credits per Markdown page on the price list, with or without JavaScript rendering; premium and residential proxies cost more. The quote and the sitemap listing are free, and failed, blocked and robots-skipped pages are not billed. A free quote gives the most a crawl can cost before it starts, and max_credits is a hard cap.
Can it crawl documentation that renders with JavaScript?
Yes. Set page.js to true for the job, and page.wait_for to a CSS selector if the content arrives late. A Markdown page costs the same with or without JavaScript.
How big a site can one crawl job read?
One job reads up to 2,000 pages (max_pages, 100 by default) from up to 20 start URLs, 20 links deep at most, for at most 6 hours, and an account runs 2 jobs at a time. Split a bigger site by section with include patterns. Page contents and the archive are kept 72 hours after the job completes.
Size your site before you crawl it.
The free sizer lists a site's URLs and quotes the crawl. No card.
Size a site free

Give your assistant the whole site.

Size the site for free, cap the credits, and get a signed webhook when the Markdown is ready. Start with 5,000 free credits, no card.

Free site sizing · no credit card