# crawl

**Identifier:** `firecrawl_crawl`

**Provider:** [Firecrawl](https://kirha.com/providers/firecrawl.md)

Crawls a website and returns all pages as markdown (first 20K characters of each page; markdownLength gives the full length so you know when a page was cut). Can crawl and extract from PDFs and other document formats automatically. This is a long-running task, use with caution.

## Run it with the CLI

```bash
kirha tools run firecrawl_crawl \
  --input '{
    "url": "<url>"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "firecrawl_crawl",
  "input": {
    "url": "<url>"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "excludePaths": {
      "description": "List of URL patterns to exclude from crawling (e.g., 'blog/*').",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "limit": {
      "default": 5,
      "description": "Maximum number of pages to crawl.",
      "maximum": 5,
      "minimum": 1,
      "type": "number"
    },
    "url": {
      "description": "URL to crawl.",
      "type": "string"
    },
    "withStructuredOutput": {
      "description": "Enable structured extraction mode with defined output schema",
      "properties": {
        "outputDescription": {
          "description": "Description of the output keys to guide extraction. Provide a short bullet list explaining the meaning of each key.",
          "type": "string"
        },
        "outputKeys": {
          "description": "List of keys to extract from each crawled page",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "outputKeys",
        "outputDescription"
      ],
      "type": "object"
    }
  },
  "required": [
    "url"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "error": {
      "type": "string"
    },
    "pages": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "markdown": {
            "type": "string"
          },
          "markdownLength": {
            "type": "number"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "success": {
      "type": "boolean"
    },
    "url": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "url",
    "success"
  ],
  "type": "object"
}
```

-----

[All Firecrawl tools](https://kirha.com/providers/firecrawl.md) · [< Back to tools list](https://kirha.com/tools.md)