# Hugging Face collections API

Get Hugging Face Collections data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as output, q, and retrieve structured data including collection display title, description, owner, last updated, and id to discover curated model stacks, track organization showcases, and feed downstream detail lookups.

Documentation: https://openany.si/market/apis/hugging-face/hugging-face-collections-api/?offering=61f18da2-c8b4-42ad-8789-905cf37051a8
API ID: 61f18da2-c8b4-42ad-8789-905cf37051a8
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/huggingface/v1/collections
Page update time: 2026-12-03T02:43:38.133Z
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.519Z. 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 collections 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 collection title."
        },
        "owner": {
          "type": "string",
          "description": "Only collections of this user or organization."
        },
        "item": {
          "type": "string",
          "description": "Collections containing an item, e.g. `models/meta-llama/Llama-3.1-8B-Instruct` (comma-separated for several)."
        },
        "sort": {
          "type": "string",
          "description": "`trending` (default), `upvotes` or `modified`.",
          "enum": [
            "trending",
            "upvotes",
            "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": {
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "gating": {
                "type": "boolean"
              },
              "items": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "downloads": {
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        },
                        "likes": {
                          "type": "integer"
                        },
                        "note": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string"
                            }
                          ]
                        },
                        "position": {
                          "type": "integer"
                        },
                        "title": {
                          "type": "null"
                        },
                        "type": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              },
              "last_updated": {
                "type": "string"
              },
              "owner": {
                "type": "string"
              },
              "owner_type": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "theme": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "upvotes": {
                "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/collections?output=json&q=llama' \
  -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": [
    {
      "description": "This collection hosts the transformers and original repos of the Meta Llama 3 and Llama Guard 2 releases",
      "gating": true,
      "items": [
        {
          "downloads": 132549,
          "id": "meta-llama/Meta-Llama-3-8B",
          "likes": 6780,
          "note": null,
          "position": 0,
          "title": null,
          "type": "model"
        },
        {
          "downloads": 319018,
          "id": "meta-llama/Meta-Llama-3-8B-Instruct",
          "likes": 5708,
          "note": "8B models\n",
          "position": 1,
          "title": null,
          "type": "model"
        },
        "… 2 more"
      ],
      "last_updated": "2024-12-06T16:49:01.623Z",
      "owner": "meta-llama",
      "owner_type": "org",
      "slug": "meta-llama/meta-llama-3-66214712577ca38149ebb2b6",
      "theme": "orange",
      "title": "Meta Llama 3",
      "upvotes": 1023,
      "url": "https://huggingface.co/collections/meta-llama/meta-llama-3-66214712577ca38149ebb2b6"
    },
    {
      "description": null,
      "gating": true,
      "items": [
        {
          "downloads": 534018,
          "id": "meta-llama/Llama-3.1-8B",
          "likes": 2751,
          "note": null,
          "position": 0,
          "title": null,
          "type": "model"
        },
        {
          "downloads": 27522,
          "id": "meta-llama/Llama-3.1-70B",
          "likes": 449,
          "note": null,
          "position": 1,
          "title": null,
          "type": "model"
        },
        "… 2 more"
      ],
      "last_updated": "2024-12-13T09:25:04.176Z",
      "owner": "meta-llama",
      "owner_type": "org",
      "slug": "meta-llama/metas-llama-31-models-and-evals-675bfd70e574a62dd0e40565",
      "theme": "orange",
      "title": "Meta's Llama 3.1 models & evals",
      "upvotes": 640,
      "url": "https://huggingface.co/collections/meta-llama/metas-llama-31-models-and-evals-675bfd70e574a62dd0e40565"
    },
    "… 18 more"
  ],
  "next_cursor": "NmFlMjZlY2M0MWYxYjllMWUyMmJkMmEwLTA=",
  "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-collections-api/?offering=61f18da2-c8b4-42ad-8789-905cf37051a8

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