본문으로 건너뛰기
cccskills
무료GitHub에 공개

crawlberg-serving-the-api

Use when the user wants a long-running HTTP service for scrape/crawl/map instead of one-shot CLI calls or the MCP server — for example wiring crawlberg into other apps over REST. Covers `crawlberg serve`, the Firecrawl-v1-compatible endpoints, `--host`/`--port`, and when to prefer it.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xberg-io/crawlberg스타 192(GitHub 192 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(2)

  • SKILL.md5.1 KB
  • index.md575 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

<!-- AI-RULEZ :: GENERATED FILE — DO NOT EDIT Content-Hash: blake3:1985fa0ec5929f7949a6ffe17c9473bfef3221180eabd504f8ca01e3821d8618 Source-Hash: blake3:4b18f96f8bf0da5fa02f0e2c5c6ad57db3a523b7eb72186f504977e42807760d Schema-Version: v1 -->

Serving the API

crawlberg serve starts a long-running REST API server exposing the crawl engine over HTTP. The endpoints are Firecrawl v1-compatible, so existing Firecrawl clients and SDKs can point at a local crawlberg instance.

This subcommand requires the binary to be built with the optional api feature (non-default). The Homebrew tap is built with all features, so serve is available there; a from-source build needs cargo install crawlberg-cli --features api (or --features all) to include it.

Quick recipe

crawlberg serve --host 127.0.0.1 --port 3000

It logs Starting REST API server on <host>:<port> to stderr and blocks until terminated. Hit GET /health to confirm it is up.

Flags

FlagDefaultPurpose
--host0.0.0.0Address to bind to.
--port3000Port to listen on.

serve does not take the per-request crawl flags — it boots with the default CrawlConfig and accepts per-request options in each HTTP request body.

Endpoints

Firecrawl v1 surface:

Method + pathPurpose
POST /v1/scrapeScrape a single URL (synchronous).
POST /v1/crawlStart an asynchronous crawl job → returns a job id.
GET /v1/crawl/{id}Poll crawl job status and collect results.
DELETE /v1/crawl/{id}Cancel a running crawl job.
POST /v1/mapDiscover URLs on a site (synchronous).
POST /v1/batch/scrapeStart an asynchronous batch-scrape job → job id.
GET /v1/batch/scrape/{id}Poll batch-scrape job status and results.
POST /v1/downloadDownload a document from a URL.

Operational:

Method + pathPurpose
GET /healthHealth check ({ status, version }).
GET /versionVersion information.
GET /openapi.jsonOpenAPI schema for the whole surface.

Request bodies use camelCase fields. Scrape/crawl/map mirror the CLI: url, formats, onlyMainContent, includeTags/excludeTags, timeout for scrape; url, maxDepth, maxPages, includePaths/excludePaths for crawl; url, limit, search for map. Responses wrap data as { success, data | error }; async jobs return { success, id } and are polled for { status, total, completed, data, error }.

Examples

Scrape via HTTP

curl -s http://127.0.0.1:3000/v1/scrape \
  -H 'content-type: application/json' \
  -d '{"url":"https://example.com","formats":["markdown"]}' | jq '.data'

Start a crawl job and poll it

id=$(curl -s http://127.0.0.1:3000/v1/crawl \
  -H 'content-type: application/json' \
  -d '{"url":"https://example.com","maxDepth":2,"maxPages":100}' | jq -r '.id')

curl -s "http://127.0.0.1:3000/v1/crawl/$id" | jq '{status,completed,total}'

Map URLs

curl -s http://127.0.0.1:3000/v1/map \
  -H 'content-type: application/json' \
  -d '{"url":"https://example.com","limit":500,"search":"docs"}' | jq '.data'

Operational notes

  • The server accepts CORS from any origin and ships no built-in authentication — do not expose it on a public interface. Bind to 127.0.0.1 for local use, or put it behind a reverse proxy / gateway that enforces auth and rate limiting before exposing it more widely.
  • Request bodies are capped at 10 MB and each request times out after 5 minutes.
  • Crawl and batch-scrape are asynchronous: the POST returns a job id immediately and you poll the {id} endpoint until status is completed, failed, or cancelled.

When to run serve vs. CLI vs. MCP

  • CLI (scrape/crawl/map/interact) — one-shot jobs, shell pipelines, scripting. No long-running process.
  • MCP (crawlberg mcp) — driving the crawler from an AI agent harness (Claude Code, Codex, Cursor, Gemini, opencode). Auto-registered by this plugin; prefer it inside an agent.
  • serve (crawlberg serve) — a persistent HTTP service for other applications or non-agent clients that speak REST, or when you want Firecrawl-v1 compatibility. Choose it when many callers need the crawler over the network rather than one agent or one shell.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

api

무료

Use crawlberg api reference documentation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xberg-io/crawlberg1922026년 10월 26일 업데이트

cli

무료

Use crawlberg cli reference documentation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xberg-io/crawlberg1922026년 10월 26일 업데이트

crawlberg

무료

Crawl, scrape, and convert websites to Markdown using the local crawlberg CLI and its MCP server. Use when the user wants to fetch a page, follow links across a domain, enumerate URLs, or drive a real browser. Covers installation, the subcommands (scrape, crawl, map, interact, batch-scrape, batch-crawl, download, citations, version, mcp, serve), output formats (JSON + Markdown), browser fallback, and when to prefer the MCP server over shelling out.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xberg-io/crawlberg1922026년 10월 26일 업데이트

Use when extracting a page needs scripted interaction first — click, type, press a key, scroll, wait, screenshot, or run JS before capturing the DOM. Covers `crawlberg interact URL --actions` with the real action schema, result shape, limits, and external-CDP options.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xberg-io/crawlberg1922026년 10월 26일 업데이트

Use when the user wants to follow links across a domain and capture every reachable page as Markdown. Covers `crawlberg crawl` with depth, page caps, concurrency, rate limiting, domain scoping, robots, and output selection.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xberg-io/crawlberg1922026년 10월 26일 업데이트

Use when a static fetch returns nothing useful and the page needs a real browser. Covers `--browser-mode auto|always|never`, external CDP via `--browser-endpoint`, symptoms of JS-only pages and WAF blocks, and the performance cost.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xberg-io/crawlberg1922026년 10월 26일 업데이트

xberg-io의 스킬 모두 보기

이 스킬의 문제 신고