# structuredWebSearch

**Identifier:** `firecrawl_structuredWebSearch`

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

Performs a web search and extracts structured data from results based on specified output keys. Uses scrapeOptions with JSON extraction. Useful for tool chaining with deterministic output.

## Run it with the CLI

```bash
kirha tools run firecrawl_structuredWebSearch \
  --input '{
    "query": "<query>",
    "outputKeys": [
      [
        false
      ]
    ]
  }'
```

`--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_structuredWebSearch",
  "input": {
    "query": "<query>",
    "outputKeys": [
      [
        false
      ]
    ]
  }
}'
```

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": {
    "numResults": {
      "default": 1,
      "description": "Number of search results to scrape.",
      "maximum": 10,
      "minimum": 1,
      "type": "number"
    },
    "outputKeys": {
      "description": "List of keys to extract from search results.",
      "items": {
        "description": "A tuple of [key, description]. Key is the output key name, description is a brief explains what to extract.",
        "items": false,
        "maxItems": 2,
        "minItems": 2,
        "prefixItems": [
          {
            "type": "string"
          },
          {
            "type": "string"
          }
        ],
        "type": "array"
      },
      "minItems": 1,
      "type": "array"
    },
    "query": {
      "type": "string"
    }
  },
  "required": [
    "query",
    "outputKeys"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "data": {
      "items": {
        "additionalProperties": {},
        "description": "Structured result with keys matching the requested outputKeys.",
        "propertyNames": {
          "type": "string"
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "data"
  ],
  "type": "object"
}
```

-----

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