# searchDatasets

**Identifier:** `huggingface_searchDatasets`

**Provider:** [Hugging Face](https://kirha.com/providers/huggingface.md)

Search and filter datasets on the Hugging Face Hub by keyword, task category, language, or author. Use getDataset with returned IDs for full details.

## Run it with the CLI

```bash
kirha tools run huggingface_searchDatasets \
  --input '{}'
```

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

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": {
    "author": {
      "description": "e.g., huggingface, allenai, bigcode",
      "type": "string"
    },
    "direction": {
      "default": "-1",
      "description": "1 (ascending) only works with sort createdAt",
      "enum": [
        "1",
        "-1"
      ],
      "type": "string"
    },
    "filter": {
      "description": "Comma-separated tags: question-answering, en, 10K<n<100K",
      "type": "string"
    },
    "limit": {
      "default": 10,
      "maximum": 50,
      "minimum": 1,
      "type": "number"
    },
    "search": {
      "type": "string"
    },
    "sort": {
      "default": "downloads",
      "enum": [
        "downloads",
        "likes",
        "lastModified",
        "trendingScore",
        "createdAt"
      ],
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "datasets": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "author": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "downloads": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "languages": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "license": {
            "type": "string"
          },
          "likes": {
            "type": "number"
          },
          "sizeCategory": {
            "type": "string"
          },
          "taskCategories": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "downloads",
          "likes",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "ids": {
      "description": "Dataset repo IDs for use with getDataset",
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "datasets",
    "ids"
  ],
  "type": "object"
}
```

## Related tools

Other Hugging Face tools that this tool refers to, or that refer to it.

- [`getDataset`](https://kirha.com/providers/huggingface/getDataset.md)

-----

[All Hugging Face tools](https://kirha.com/providers/huggingface.md) · [< Back to tools list](https://kirha.com/tools.md)