# Hugging Face API: Search Hugging Face Spaces

> Finds public Hugging Face Spaces demos for a task, with descriptions, likes, running status and update dates.

Unofficial. Not affiliated with or endorsed by Hugging Face.

- Page: https://fous.com/methods/huggingface.co/search-spaces
- Method: `huggingface.co/search_spaces`, version 1
- Website: huggingface.co
- Returns: app name, author, description, likes, running status, last updated, link, hardware, framework
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `sort` | string | no |  | Order results by relevance, most_liked, or trending. For example, most_liked. One of "relevance", "most_liked", "trending". Default "relevance". |
| `query` | string | yes | `"remove image background"` | What the app should do, for example, remove image background. |
| `max_results` | integer | no |  | Maximum number of Spaces to return, for example, 20. Default 20. |

## Output

From a run on Oct 23, 2026. Its input:

```json
{
  "query": "remove image background"
}
```

Its output:

```json
{
  "spaces": []
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"huggingface.co/search_spaces","input":{"query":"remove image background"}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- Find public Spaces that can remove the background from a photo, sorted by most liked
- Show me trending Hugging Face demos for text-to-speech with their running status
- I need a Space that transcribes audio to text; list the top 10 by relevance with hardware info
- Look up Hugging Face Spaces for image upscaling and include last updated dates
- Which Spaces on huggingface.co generate captions for videos? Give me up to 15 results with frameworks

## Input schema

```json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "sort": {
      "enum": [
        "relevance",
        "most_liked",
        "trending"
      ],
      "type": "string",
      "default": "relevance",
      "description": "Order results by relevance, most_liked, or trending. For example, most_liked."
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "What the app should do, for example, remove image background."
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum number of Spaces to return, for example, 20.",
      "x-fous-developer": true
    }
  },
  "additionalProperties": false
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "spaces"
  ],
  "properties": {
    "spaces": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "app_name",
          "author",
          "short_description",
          "likes",
          "running_now",
          "last_updated",
          "app_link",
          "space_repository_id",
          "hardware",
          "app_framework"
        ],
        "properties": {
          "likes": {
            "type": "integer",
            "description": "Number of likes."
          },
          "author": {
            "type": "string",
            "description": "Name of the publisher."
          },
          "app_link": {
            "type": "string",
            "format": "uri",
            "description": "Link to the app page."
          },
          "app_name": {
            "type": "string",
            "description": "Name of the demo app."
          },
          "hardware": {
            "type": [
              "string",
              "null"
            ],
            "description": "Current hardware when running, otherwise requested hardware, if available.",
            "x-fous-developer": true
          },
          "running_now": {
            "type": "boolean",
            "description": "Whether the app is currently running."
          },
          "last_updated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Date the Space was last updated, if available."
          },
          "app_framework": {
            "type": [
              "string",
              "null"
            ],
            "description": "Framework for the Space, if available.",
            "x-fous-developer": true
          },
          "short_description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short description of the app, if available."
          },
          "space_repository_id": {
            "type": "string",
            "description": "Space repository ID in author/name form.",
            "x-fous-developer": true
          }
        },
        "additionalProperties": false
      },
      "description": "Matching public demo apps."
    }
  },
  "additionalProperties": false
}
```

## See more

- [Hugging Face API: Search models](https://fous.com/methods/huggingface.co/search-models.md): Finds public Hugging Face models by search words, with an optional task and sort order. License is null when the model does not publish one.
- [Hugging Face API: Search datasets](https://fous.com/methods/huggingface.co/search-datasets.md): Finds public Hugging Face datasets by name or topic, ordered by downloads, likes, trending score or last update.
- [Hugging Face API: List trending models](https://fous.com/methods/huggingface.co/list-trending-models.md): Lists Hugging Face models in trending order this week, optionally filtered to one task. Downloads cover the last 30 days.
- [Hugging Face API: Get model details](https://fous.com/methods/huggingface.co/get-model.md): Looks up one Hugging Face model by name, repository ID or link and returns its public details, model card summary and file sizes. For a name, the first matching model is returned.
- [Bluesky API: Search posts](https://fous.com/methods/bsky.app/search-posts.md): Searches public Bluesky posts for words, optionally ordered by latest or top and filtered by date, author or language. Search indexing may lag behind new posts.
- [Apple API: Search apps](https://fous.com/methods/apps.apple.com/search-apps.md): Finds iPhone and iPad apps by keyword in a chosen country's App Store, with ratings, prices, categories and App Store links.
- [Kaggle API: Search datasets](https://fous.com/methods/kaggle.com/search-datasets.md): Finds public Kaggle datasets on a topic, with size, file formats, usability, popularity and license. Lists at most 100 results in Kaggle's order; files are not downloaded.
- [Google API: Search Google Play apps](https://fous.com/methods/play.google.com/search-apps.md): Finds Android apps on Google Play by keywords, in Play search order, with each listing's developer, star rating, price and currency for the chosen country, download range and link. Results are limited to apps shown on the public search page.
- [All Hugging Face methods](https://fous.com/methods/huggingface.co.md)
