> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Firecrawl Scrape: Inputs, Cost & CLI Example

> Scraping a single URL and extracting content as markdown, HTML, or structured data. Includes inputs, outputs, costs, and Deepline CLI examples.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=firecrawl_scrape:{"url":"{{url}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                          | Type                              | Required | Default | Description                                       |
| ----------------------------- | --------------------------------- | -------- | ------- | ------------------------------------------------- |
| `payload.url`                 | `string`                          | Yes      |         | URL to scrape                                     |
| `payload.zeroDataRetention`   | `boolean`                         | No       |         | Do not store any data (default false)             |
| `payload.formats`             | `array`                           | No       |         | Output formats (default \[\{"type":"markdown"}])  |
| `payload.onlyMainContent`     | `boolean`                         | No       |         | Only return main content, filtering navs/footers  |
| `payload.includeTags`         | `array`                           | No       |         | Only include these HTML tags                      |
| `payload.excludeTags`         | `array`                           | No       |         | Exclude these HTML tags                           |
| `payload.headers`             | `record`                          | No       |         | Custom HTTP headers                               |
| `payload.waitFor`             | `number`                          | No       |         | Wait ms after page load before scraping           |
| `payload.mobile`              | `boolean`                         | No       |         | Use mobile user agent                             |
| `payload.timeout`             | `number`                          | No       |         | Request timeout in ms (default 30000, max 300000) |
| `payload.maxAge`              | `integer`                         | No       |         | Max cache age in ms (default 172800000)           |
| `payload.storeInCache`        | `boolean`                         | No       |         | Store result in cache (default true)              |
| `payload.parsers`             | `array`                           | No       |         | Document parsers (e.g. PDF)                       |
| `payload.actions`             | `array`                           | No       |         | Browser actions to execute before scraping        |
| `payload.location`            | `object`                          | No       |         | Geographic location settings                      |
| `payload.proxy`               | `"basic" \| "enhanced" \| "auto"` | No       |         | Proxy mode                                        |
| `payload.blockAds`            | `boolean`                         | No       |         | Block ads during scraping                         |
| `payload.removeBase64Images`  | `boolean`                         | No       |         | Strip base64 images from output                   |
| `payload.skipTlsVerification` | `boolean`                         | No       |         | Skip TLS certificate verification                 |

### Allowed values

| Field           | Allowed values              |
| --------------- | --------------------------- |
| `payload.proxy` | `basic`, `enhanced`, `auto` |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Scrape a single URL and return content in specified formats.",
    "properties": {
      "url": {
        "type": "string",
        "description": "URL to scrape"
      },
      "zeroDataRetention": {
        "type": "boolean",
        "description": "Do not store any data (default false)"
      },
      "formats": {
        "type": "array",
        "description": "Output formats (default [{\"type\":\"markdown\"}])",
        "items": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "markdown",
                "summary",
                "html",
                "rawHtml",
                "links",
                "images",
                "screenshot",
                "json",
                "changeTracking",
                "branding"
              ]
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "markdown"
                }
              },
              "required": [
                "type"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "summary"
                }
              },
              "required": [
                "type"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "html"
                }
              },
              "required": [
                "type"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "rawHtml"
                }
              },
              "required": [
                "type"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "links"
                }
              },
              "required": [
                "type"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "images"
                }
              },
              "required": [
                "type"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "screenshot"
                },
                "fullPage": {
                  "type": "boolean",
                  "description": "Capture full page screenshot"
                },
                "quality": {
                  "type": "integer",
                  "description": "Screenshot quality 0-100"
                },
                "viewport": {
                  "type": "object",
                  "description": "Custom viewport size",
                  "properties": {
                    "width": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": [
                "type"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "json"
                },
                "schema": {
                  "type": "object",
                  "description": "JSON schema for structured output",
                  "additionalProperties": {}
                },
                "prompt": {
                  "type": "string",
                  "description": "Natural language extraction instructions"
                }
              },
              "required": [
                "type"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "changeTracking"
                },
                "modes": {
                  "type": "array",
                  "description": "Change tracking modes",
                  "items": {
                    "type": "string",
                    "enum": [
                      "git-diff",
                      "json"
                    ]
                  }
                },
                "schema": {
                  "type": "object",
                  "description": "Schema for tracked changes",
                  "additionalProperties": {}
                },
                "prompt": {
                  "type": "string",
                  "description": "Instructions for change tracking"
                },
                "tag": {
                  "type": "string",
                  "description": "Tag for this change tracking snapshot"
                }
              },
              "required": [
                "type"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "branding"
                }
              },
              "required": [
                "type"
              ],
              "additionalProperties": false
            }
          ]
        }
      },
      "onlyMainContent": {
        "type": "boolean",
        "description": "Only return main content, filtering navs/footers"
      },
      "includeTags": {
        "type": "array",
        "description": "Only include these HTML tags",
        "items": {
          "type": "string"
        }
      },
      "excludeTags": {
        "type": "array",
        "description": "Exclude these HTML tags",
        "items": {
          "type": "string"
        }
      },
      "headers": {
        "type": "object",
        "description": "Custom HTTP headers",
        "additionalProperties": {
          "type": "string"
        }
      },
      "waitFor": {
        "type": "number",
        "description": "Wait ms after page load before scraping"
      },
      "mobile": {
        "type": "boolean",
        "description": "Use mobile user agent"
      },
      "timeout": {
        "type": "number",
        "description": "Request timeout in ms (default 30000, max 300000)"
      },
      "maxAge": {
        "type": "integer",
        "description": "Max cache age in ms (default 172800000)"
      },
      "storeInCache": {
        "type": "boolean",
        "description": "Store result in cache (default true)"
      },
      "parsers": {
        "type": "array",
        "description": "Document parsers (e.g. PDF)",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "description": "Parser type",
              "const": "pdf"
            },
            "mode": {
              "type": "string",
              "description": "PDF parsing mode",
              "enum": [
                "fast",
                "auto",
                "ocr"
              ]
            },
            "maxPages": {
              "type": "integer",
              "description": "Max pages to parse (1-10000)"
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        }
      },
      "actions": {
        "type": "array",
        "description": "Browser actions to execute before scraping",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "description": "Browser action type",
              "enum": [
                "wait",
                "click",
                "write",
                "press",
                "screenshot",
                "scroll",
                "pdf",
                "scrape",
                "executeJavascript"
              ]
            },
            "selector": {
              "type": "string",
              "description": "CSS selector for the element"
            },
            "milliseconds": {
              "type": "number",
              "description": "Wait time in milliseconds"
            },
            "text": {
              "type": "string",
              "description": "Text to write"
            },
            "key": {
              "type": "string",
              "description": "Key to press"
            },
            "direction": {
              "type": "string",
              "description": "Scroll direction",
              "enum": [
                "up",
                "down"
              ]
            },
            "amount": {
              "type": "number",
              "description": "Scroll amount in pixels"
            },
            "script": {
              "type": "string",
              "description": "JavaScript to execute"
            },
            "fullPage": {
              "type": "boolean",
              "description": "Full-page screenshot"
            },
            "format": {
              "type": "string",
              "description": "PDF page format",
              "enum": [
                "A0",
                "A1",
                "A2",
                "A3",
                "A4",
                "A5",
                "A6",
                "Letter",
                "Legal",
                "Tabloid",
                "Ledger"
              ]
            },
            "landscape": {
              "type": "boolean",
              "description": "PDF landscape orientation"
            },
            "scale": {
              "type": "number",
              "description": "PDF scale factor (0.1-2)"
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        }
      },
      "location": {
        "type": "object",
        "description": "Geographic location settings",
        "properties": {
          "country": {
            "type": "string",
            "description": "Country code (e.g. \"US\")"
          },
          "languages": {
            "type": "array",
            "description": "Language codes",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "proxy": {
        "type": "string",
        "description": "Proxy mode",
        "enum": [
          "basic",
          "enhanced",
          "auto"
        ]
      },
      "blockAds": {
        "type": "boolean",
        "description": "Block ads during scraping"
      },
      "removeBase64Images": {
        "type": "boolean",
        "description": "Strip base64 images from output"
      },
      "skipTlsVerification": {
        "type": "boolean",
        "description": "Skip TLS certificate verification"
      }
    },
    "required": [
      "url"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `result.meta` | `record` | No       |         | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Single page scrape result.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "markdown": {
            "type": "string"
          },
          "html": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute firecrawl_scrape --payload '{
  "url": "string"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Provider API Context

<details>
  <summary>Show provider reference (optional)</summary>

  ```md theme={null}
  ## Browser Actions

  You can perform browser interactions before scraping by using the `actions` parameter. This allows you to:

  * Wait for elements to load
  * Click buttons or links
  * Fill form fields
  * Press keys
  * Scroll pages
  * Take screenshots
  * Execute custom JavaScript
  * Generate PDFs

  Supported actions include `wait`, `click`, `write`, `press`, `scroll`, `screenshot`, `scrape`, `executeJavascript`, and `pdf`. For detailed documentation with examples, see the [Advanced Scraping Guide](https://docs.firecrawl.dev/advanced-scraping-guide#actions-actions).
  ```
</details>

## Cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0.02` per pricing unit.
* Billing mode: `post_deduct`.
