# Hugging Face repository commit history API

Get Hugging Face Repo Commit History data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as id, output, and retrieve structured data including repository identifier, revision, full Git commit hash, first-line commit title, and extended commit message body to audit release branches and tags, and pin reproducible deployment commits.

Documentation: https://openany.si/hugging-face/hugging-face-repository-commit-history-api/ef586b99-8770-4d20-9497-b60c9f4a8fcb/
API ID: ef586b99-8770-4d20-9497-b60c9f4a8fcb
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/huggingface/v1/model/commits
Page update time: 2026-12-03T02:43:38.246Z
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.
Contract update time: 2026-12-03T02:43:37.342Z. 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": []
  }
}
```

## Usage and limits
## Hugging Face Repo Commit History API

Pass required id (owner/name or huggingface.co URL) with optional type (defaults to model, or inferred from a pasted URL), revision (branch, tag or commit, default main) and page (default 1). Returned items\[\] expose commit hashes, titles, messages, timestamps, authors and commit URLs.

## What You Can Build

- **Monitor silent weight or tokenizer changes**: Poll commit history on main to detect new checkpoints, config edits or README updates.
- **Audit release branches and tags**: Pass revision to inspect commits on a specific quantized branch, PR ref or tagged release.
- **Pin reproducible deployment commits**: Capture items\[\].id hashes to pass into the Repo File Tree API or downstream download workflows.

## Returned Data

| Field | Meaning |
| --- | --- |
| `id` | Repository identifier (owner/name) |
| `type` | Repository type: model, dataset or space |
| `revision` | Resolved branch, tag or commit revision queried |
| `total` | Total commits reported for the revision |
| `items[].id` | Full Git commit hash |
| `items[].title` | First-line commit title |
| `items[].message` | Extended commit message body |
| `items[].date` | Commit timestamp |
| `items[].authors[].name` | Commit author username or name |
| `next_page` | Next page number, or null on the last page |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Hugging Face repository commit history 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": {
        "id": {
          "type": "string",
          "description": "Repo id (owner/name) or huggingface.co link."
        },
        "type": {
          "type": "string",
          "description": "Repo type (default model; taken from a pasted link).",
          "enum": [
            "model",
            "dataset",
            "space"
          ]
        },
        "revision": {
          "type": "string",
          "description": "Branch, tag or commit (default main)."
        },
        "page": {
          "type": "integer",
          "description": "Page number (default 1)."
        },
        "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."
        }
      },
      "required": [
        "id"
      ]
    },
    "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"
    },
    "id": {
      "type": "string"
    },
    "items": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "authors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "avatar": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  }
                }
              },
              "date": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "next_page": {
      "type": "null"
    },
    "page": {
      "type": "integer"
    },
    "revision": {
      "type": "string"
    },
    "total": {
      "type": "integer"
    },
    "type": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/huggingface/v1/model/commits?id=openai-community%2Fgpt2&output=json' \
  -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": 26,
  "credits_used": 1,
  "id": "openai-community/gpt2",
  "items": [
    {
      "authors": [
        {
          "avatar": "https://cdn-avatars.huggingface.co/v1/production/uploads/5e3aec01f55e2b62848a5217/PMKS0NNB4MJQlTSFzh918.jpeg",
          "name": "lysandre"
        }
      ],
      "date": "2024-02-19T10:57:45.000Z",
      "id": "607a30d783dfa663caf39e06633721c8d4cfcd7e",
      "message": "- Adds tokenizer_config.json file (db6d57930088fb63e52c010bd9ac77c955ac55e7)",
      "title": "Adds the tokenizer configuration file (#80)",
      "url": "https://huggingface.co/openai-community/gpt2/commit/607a30d783dfa663caf39e06633721c8d4cfcd7e"
    },
    {
      "authors": [
        {
          "avatar": "https://cdn-avatars.huggingface.co/v1/production/uploads/1651743336129-624c60cba8ec93a7ac188b56.png",
          "name": "fxmarty"
        }
      ],
      "date": "2023-06-30T02:19:43.000Z",
      "id": "11c5a3d5811f50298f278a704980280950aedb10",
      "message": "- Adding ONNX file of this model (9411f419c589519e1a46c94ac7789ea20fd7c322)",
      "title": "Adding ONNX file of this model (#60)",
      "url": "https://huggingface.co/openai-community/gpt2/commit/11c5a3d5811f50298f278a704980280950aedb10"
    },
    "… 24 more"
  ],
  "next_page": null,
  "page": 1,
  "revision": "main",
  "total": 26,
  "type": "model"
}
```

## 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.

## Common questions
### Can I query commit history for datasets and Spaces, not just models?
Yes. Set type to dataset or space, or paste the full huggingface.co/datasets or huggingface.co/spaces URL in id.

### Which branch is queried if I omit revision?
revision defaults to main; you can pass any branch name, tag or commit hash.

### How do I paginate through older commits?
Pass page (default 1) and continue with next_page until it returns null.

### Does this endpoint return file diffs or raw file contents?
No. It returns commit metadata (ID, title, message, date, authors and URL); use the Repo File Tree API to inspect files at a revision.

### Can I read commits from private Hugging Face repositories?
No. Only publicly accessible repositories are supported.

### How do caching and field selection work?
Output is JSON only. Pass fresh=1 to skip the 24-hour cache, raw=0 to omit raw blocks, or fields to select specific keys.

## Available implementations
- apish: https://openany.si/hugging-face/hugging-face-repository-commit-history-api/ef586b99-8770-4d20-9497-b60c9f4a8fcb/

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