# Hugging Face API

> Returns Hugging Face models and datasets, their files and commit history, with search ordered by downloads.

Category: Developer & Tech. Region: global. 13 endpoints at `https://api.hoshime.com/v1/huggingface/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/huggingface
## GET /v1/huggingface/models

Public Hugging Face models matching a search, most downloaded first.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Words to search for, such as bert. (e.g. bert) |
| `limit` | integer | no | Items per page, 1 to 100. (default 10) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (string), `downloadCount` (integer (int64)), `gated` (boolean), `id` (string), `library` (string), `license` (string), `likeCount` (integer (int64)), `pipelineTag` (string), `private` (boolean), `tags` (string[]), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/huggingface/models?query=bert" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/huggingface/model

One Hugging Face model by id, such as google-bert/bert-base-uncased.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Model id, such as google-bert/bert-base-uncased. (e.g. google-bert/bert-base-uncased) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (string), `downloadCount` (integer (int64)), `gated` (boolean), `id` (string), `library` (string), `license` (string), `likeCount` (integer (int64)), `pipelineTag` (string), `private` (boolean), `tags` (string[]), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/huggingface/model?id=google-bert%2Fbert-base-uncased" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/huggingface/datasets

Public Hugging Face datasets matching a search, most downloaded first.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Words to search for, such as squad. (e.g. squad) |
| `limit` | integer | no | Items per page, 1 to 100. (default 10) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (string), `downloadCount` (integer (int64)), `gated` (boolean), `id` (string), `library` (string), `license` (string), `likeCount` (integer (int64)), `pipelineTag` (string), `private` (boolean), `tags` (string[]), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/huggingface/datasets?query=squad" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/huggingface/dataset

One Hugging Face dataset by id, such as rajpurkar/squad.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Dataset id, such as rajpurkar/squad. (e.g. rajpurkar/squad) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (string), `downloadCount` (integer (int64)), `gated` (boolean), `id` (string), `library` (string), `license` (string), `likeCount` (integer (int64)), `pipelineTag` (string), `private` (boolean), `tags` (string[]), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/huggingface/dataset?id=rajpurkar%2Fsquad" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/huggingface/files

The files and folders at one path of a model's or dataset's main branch.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `kind` | string | no | Repository kind: model or dataset. (one of model, dataset; default model; e.g. model) |
| `id` | string | yes | Repository id, such as google-bert/bert-base-uncased. (e.g. google-bert/bert-base-uncased) |
| `path` | string | no | Folder inside the repository, such as onnx. Omit it for the root. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `oid` (string), `path` (string), `size` (integer (int64)), `type` (string)

```bash
curl "https://api.hoshime.com/v1/huggingface/files?kind=model&id=google-bert%2Fbert-base-uncased" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/huggingface/commits

The commit history of a model's or dataset's main branch, newest first. Page with cursor.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `kind` | string | no | Repository kind: model or dataset. (one of model, dataset; default model; e.g. model) |
| `id` | string | yes | Repository id, such as google-bert/bert-base-uncased. (e.g. google-bert/bert-base-uncased) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `authors` (string[]), `committedAt` (string), `id` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/huggingface/commits?kind=model&id=google-bert%2Fbert-base-uncased" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/huggingface/discussions

The discussions and pull requests of a model or dataset, newest first. Page with cursor.

Scope: `social:read` · Units: 1 · Cached: 15 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `kind` | string | no | Repository kind: model or dataset. (one of model, dataset; default model; e.g. model) |
| `id` | string | yes | Repository id, such as google-bert/bert-base-uncased. (e.g. google-bert/bert-base-uncased) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (string), `comments` (integer (int64)), `createdAt` (string), `isPullRequest` (boolean), `num` (integer (int64)), `status` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/huggingface/discussions?kind=model&id=google-bert%2Fbert-base-uncased" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/huggingface/spaces

Public Hugging Face Spaces matching a search, with their SDK and likes.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Words to search for, such as gradio. (e.g. gradio) |
| `limit` | integer | no | Items per page, 1 to 100. (default 10) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `createdAt` (string), `id` (string), `likeCount` (integer (int64)), `sdk` (string), `tags` (string[])

```bash
curl "https://api.hoshime.com/v1/huggingface/spaces?query=gradio" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/huggingface/collections

Hugging Face collections, the curated lists of repositories, matching a search. Without a query, the newest.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Words to search for, such as bert. Omit it for the newest collections. (e.g. bert) |
| `limit` | integer | no | Items per page, 1 to 100. (default 10) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `description` (string), `owner` (string), `slug` (string), `title` (string), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/huggingface/collections?query=bert" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/huggingface/trending

The models, datasets or Spaces that are trending on Hugging Face right now.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `type` | string | no | Kind of repository: model, dataset or space. (one of model, dataset, space; default model; e.g. model) |
| `limit` | integer | no | Items per page, 1 to 100. (default 20) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (string), `downloadCount` (integer (int64)), `gated` (boolean), `id` (string), `likeCount` (integer (int64)), `type` (string), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/huggingface/trending?type=model" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/huggingface/user

One Hugging Face user by name: display name, bio, avatar and how many models, datasets, Spaces and followers they have.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | User name on the Hub, such as julien-c. (e.g. julien-c) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `avatarUrl` (string), `createdAt` (string), `datasetCount` (integer (int64)), `details` (string), `followerCount` (integer (int64)), `fullName` (string), `id` (string), `isPro` (boolean), `isVerified` (boolean), `modelCount` (integer (int64)), `name` (string), `spaceCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/huggingface/user?name=julien-c" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/huggingface/organization

One Hugging Face organization by name: its full name, description, verification and how many models, datasets, Spaces and followers it has.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | Organization name on the Hub, such as google. (e.g. google) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `avatarUrl` (string), `createdAt` (string), `datasetCount` (integer (int64)), `details` (string), `followerCount` (integer (int64)), `fullName` (string), `id` (string), `isPro` (boolean), `isVerified` (boolean), `modelCount` (integer (int64)), `name` (string), `spaceCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/huggingface/organization?name=google" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/huggingface/papers

Research papers on Hugging Face Papers (arXiv papers with community discussion) matching a search, with authors and upvotes.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Words to search for, such as attention. (e.g. attention is all you need) |
| `limit` | integer | no | Items per page, 1 to 100. (default 20) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `authors` (string[]), `commentCount` (integer (int64)), `id` (string), `publishedAt` (string), `summary` (string), `title` (string), `upvotes` (integer (int64)), `url` (string)

```bash
curl "https://api.hoshime.com/v1/huggingface/papers?query=attention+is+all+you+need" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
