> ## 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 Agent: Inputs, Cost & CLI Example

> Complex web tasks using AI agent with natural language instructions. Includes inputs, outputs, costs, and Deepline CLI examples for GTM automation.

## 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_agent:{"prompt":"{{prompt}}"}' --json
```

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

## Input Schema

| Name                            | Type                              | Required | Default | Description                                                                                            |
| ------------------------------- | --------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------ |
| `payload.prompt`                | `string`                          | Yes      |         | Natural language instruction for the AI agent (max 10000 chars)                                        |
| `payload.urls`                  | `array`                           | No       |         | Starting URLs for the agent                                                                            |
| `payload.schema`                | `record`                          | No       |         | JSON schema for structured output                                                                      |
| `payload.maxCredits`            | `integer`                         | No       |         | Max credits to spend (default 2500)                                                                    |
| `payload.model`                 | `"spark-1-mini" \| "spark-1-pro"` | No       |         | Agent model (default "spark-1-mini")                                                                   |
| `payload.strictConstrainToURLs` | `boolean`                         | No       |         | Only visit provided URLs                                                                               |
| `payload.timeoutMs`             | `integer`                         | No       |         | Poll timeout in ms (default 30000; larger values are clamped to the Deepline async sync-wait ceiling). |

### Allowed values

| Field           | Allowed values                |
| --------------- | ----------------------------- |
| `payload.model` | `spark-1-mini`, `spark-1-pro` |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Run an AI web agent with natural language instructions (async with polling).",
    "properties": {
      "prompt": {
        "type": "string",
        "description": "Natural language instruction for the AI agent (max 10000 chars)"
      },
      "urls": {
        "type": "array",
        "description": "Starting URLs for the agent",
        "items": {
          "type": "string"
        }
      },
      "schema": {
        "type": "object",
        "description": "JSON schema for structured output",
        "additionalProperties": {}
      },
      "maxCredits": {
        "type": "integer",
        "description": "Max credits to spend (default 2500)"
      },
      "model": {
        "type": "string",
        "description": "Agent model (default \"spark-1-mini\")",
        "enum": [
          "spark-1-mini",
          "spark-1-pro"
        ]
      },
      "strictConstrainToURLs": {
        "type": "boolean",
        "description": "Only visit provided URLs"
      },
      "timeoutMs": {
        "type": "integer",
        "description": "Poll timeout in ms (default 30000; larger values are clamped to the Deepline async sync-wait ceiling)."
      }
    },
    "required": [
      "prompt"
    ],
    "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": "AI agent job result.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "status": {
            "type": "string"
          },
          "data": {},
          "model": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "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_agent --payload '{
  "prompt": "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}
  ```
</details>

## Cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0` per pricing unit.
* Billing mode: `post_deduct`.
