# Hugging Face model search API

Search Hugging Face Model via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as limit, output, q, and retrieve structured data including model identifier, primary task pipeline tag, library, declared license identifiers, and hub trending score to shortlist edge or local models, and find hosted inference candidates.

Documentation: https://openany.si/market/apis/hugging-face/hugging-face-model-search-api/?offering=14a82141-6894-469c-b042-15a4a81d015b
API ID: 14a82141-6894-469c-b042-15a4a81d015b
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/huggingface/v1/models
Page update time: 2026-12-03T02:43:38.197Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:43:36.988Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Hugging Face model search API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "q": {
          "type": "string",
          "description": "Words in the model id, e.g. `llama`, `whisper`."
        },
        "author": {
          "type": "string",
          "description": "Only models of this user or organization, e.g. `meta-llama`."
        },
        "task": {
          "type": "string",
          "description": "Pipeline tag, e.g. `text-generation`, `text-to-image`, `automatic-speech-recognition`, `feature-extraction`. Also accepted as `pipeline_tag`."
        },
        "library": {
          "type": "string",
          "description": "Library, e.g. `transformers`, `diffusers`, `gguf`, `mlx`, `sentence-transformers`."
        },
        "language": {
          "type": "string",
          "description": "Language codes, comma-separated, e.g. `en,fr`."
        },
        "license": {
          "type": "string",
          "description": "License ids, comma-separated, e.g. `apache-2.0`, `mit`."
        },
        "dataset": {
          "type": "string",
          "description": "Trained on this dataset id, e.g. `HuggingFaceFW/fineweb`."
        },
        "base_model": {
          "type": "string",
          "description": "Derived from this model id (fine-tunes, quantizations, adapters)."
        },
        "min_params": {
          "type": "string",
          "description": "Only models with at least this many parameters, e.g. `1B`, `500M`, `7.5B`."
        },
        "max_params": {
          "type": "string",
          "description": "Only models with at most this many parameters, e.g. `3B`, `70B`."
        },
        "tags": {
          "type": "string",
          "description": "Any other Hub tags, comma-separated, e.g. `gguf,conversational`."
        },
        "inference": {
          "type": "string",
          "description": "inference",
          "enum": [
            "warm"
          ]
        },
        "provider": {
          "type": "string",
          "description": "Only models served by this inference provider, e.g. `together`, `groq`."
        },
        "gated": {
          "type": "string",
          "description": "`true` or `false`: only gated or only open models.",
          "enum": [
            "true",
            "false"
          ]
        },
        "sort": {
          "type": "string",
          "description": "Order: `trending` (default), `downloads`, `likes`, `created` or `modified` (newest first).",
          "enum": [
            "trending",
            "downloads",
            "likes",
            "created",
            "modified"
          ]
        },
        "limit": {
          "type": "integer",
          "description": "Results per page (default 20, max 100)."
        },
        "cursor": {
          "type": "string",
          "description": "`next_cursor` from the previous page; null on the last page."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "Native CSV/NDJSON record selector; it has no effect on this JSON-only product."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "cached": {
      "type": "boolean"
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "items": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "arxiv": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "author": {
                "type": "string"
              },
              "base_models": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "created_at": {
                "type": "string"
              },
              "datasets": {
                "type": "array",
                "items": {}
              },
              "downloads_last_month": {
                "type": "integer"
              },
              "gated": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "inference": {
                "type": "null"
              },
              "languages": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "last_modified": {
                "type": "string"
              },
              "library": {
                "type": "string"
              },
              "licenses": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "likes": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "pipeline_tag": {
                "type": "string"
              },
              "private": {
                "type": "boolean"
              },
              "regions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "sha": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "trending_score": {
                "type": "integer"
              },
              "url": {
                "type": "string"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "next_cursor": {
      "type": "string"
    },
    "query": {
      "type": "string"
    },
    "sort": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/huggingface/v1/models?limit=20&output=json&q=llama&sort=downloads&task=text-generation' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "cached": false,
  "count": 20,
  "credits_used": 1,
  "items": [
    {
      "arxiv": [
        "2204.05149"
      ],
      "author": "meta-llama",
      "base_models": [
        "meta-llama/Llama-3.1-8B"
      ],
      "created_at": "2024-07-18T08:56:00.000Z",
      "datasets": [],
      "downloads_last_month": 4475436,
      "gated": "manual",
      "id": "meta-llama/Llama-3.1-8B-Instruct",
      "inference": null,
      "languages": [
        "en",
        "de",
        "… 6 more"
      ],
      "last_modified": "2024-09-25T17:00:57.000Z",
      "library": "transformers",
      "licenses": [
        "llama3.1"
      ],
      "likes": 8780,
      "name": "Llama-3.1-8B-Instruct",
      "pipeline_tag": "text-generation",
      "private": false,
      "regions": [
        "us"
      ],
      "sha": "0e9e39f249a16976918f6564b8830bc894c89659",
      "tags": [
        "transformers",
        "safetensors",
        "… 24 more"
      ],
      "trending_score": 60,
      "url": "https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct"
    },
    {
      "arxiv": [],
      "author": "meta-llama",
      "base_models": [],
      "created_at": "2024-04-17T09:35:12.000Z",
      "datasets": [],
      "downloads_last_month": 319018,
      "gated": "manual",
      "id": "meta-llama/Meta-Llama-3-8B-Instruct",
      "inference": null,
      "languages": [
        "en"
      ],
      "last_modified": "2025-06-18T23:49:51.000Z",
      "library": "transformers",
      "licenses": [
        "llama3"
      ],
      "likes": 5708,
      "name": "Meta-Llama-3-8B-Instruct",
      "pipeline_tag": "text-generation",
      "private": false,
      "regions": [
        "us"
      ],
      "sha": "8afb486c1db24fe5011ec46dfbe5b5dccdb575c2",
      "tags": [
        "transformers",
        "safetensors",
        "… 15 more"
      ],
      "trending_score": 47,
      "url": "https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct"
    },
    "… 18 more"
  ],
  "next_cursor": "eyIkb3IiOlt7InRyZW5kaW5nU2NvcmUiOjEsIl9pZCI6eyIkZ3QiOiI2NjFmOTdiZTljYWU5M2MwMjM5M2U4ZWYifX0seyJ0cmVuZGluZ1Njb3JlIjp7IiRsdCI6MX19LHsidHJlbmRp…",
  "query": "llama",
  "sort": "trending"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- apish: https://openany.si/market/apis/hugging-face/hugging-face-model-search-api/?offering=14a82141-6894-469c-b042-15a4a81d015b

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
