# searchWebSources

**Identifier:** `crustdata_searchWebSources`

**Provider:** [Crustdata](https://kirha.com/providers/crustdata.md)

Run a live search on one source type: news articles, general web pages, academic papers or social media mentions, optionally restricted to a site, a country and a date range. Use it for fresh press coverage or papers on a topic, by source type.

## Run it with the CLI

```bash
kirha tools run crustdata_searchWebSources \
  --input '{
    "query": "<query>"
  }'
```

`--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": "crustdata_searchWebSources",
  "input": {
    "query": "<query>"
  }
}'
```

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": {
    "countryCode": {
      "description": "ISO alpha-2 country of the results, e.g., FR",
      "pattern": "^[A-Za-z]{2}$",
      "type": "string"
    },
    "from": {
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "type": "string"
    },
    "limit": {
      "default": 10,
      "maximum": 20,
      "minimum": 1,
      "type": "integer"
    },
    "query": {
      "maxLength": 500,
      "minLength": 2,
      "type": "string"
    },
    "site": {
      "description": "Restrict to a domain, news and web only, e.g., lesechos.fr",
      "minLength": 3,
      "type": "string"
    },
    "source": {
      "default": "news",
      "enum": [
        "news",
        "web",
        "scholar",
        "social"
      ],
      "type": "string"
    },
    "to": {
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "type": "string"
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "results": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "snippet": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "source": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "source",
    "results"
  ],
  "type": "object"
}
```

-----

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