Hugging Face

Get Hugging Face Space

Get a Hugging Face Space with its run state, hardware, SDK and linked models and datasets.

GET/v1/hugging-face/spaces/{owner}/{name}
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
3
ownerstringrequiredpath

Owner of the repository: a user or organization name.

pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$

namestringrequiredpath

Repository name, without the owner.

pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$

revisionstringoptionalquery

Branch, tag or commit. Default: the default branch (`main`).

min 1 chars · max 200 chars · pattern: ^[A-Za-z0-9][A-Za-z0-9._/-]*$

Response fields
44

Endpoint-specific response payload.

datalookupStatus
string

Whether the item was found.

one of: found, not_found

The Space when lookupStatus is `found`; otherwise null.

dataspaceid
string

Repository id, `owner/name`.

dataspacetype
string

Repository type.

one of: model, dataset, space

dataspaceuid
stringnullable

Stable repository id; survives renames.

dataspaceurl
string

Repository page URL.

dataspaceauthor
stringnullable

Owner account name.

dataspacecreatedAt
stringnullable

When the repository was created (ISO-8601).

dataspacelastModified
stringnullable

When the repository last changed (ISO-8601).

dataspacesha
stringnullable

Latest commit on the default branch.

dataspacelikes
integernullable

Likes.

dataspacedownloads
integernullable

Downloads in the last 30 days.

dataspacedownloadsAllTime
integernullable

Downloads since the repository was created.

dataspacetrendingScore
numbernullable

Trending score.

dataspacegated

Whether access needs approval: `false`, `auto` (accepted on request) or `manual` (reviewed by the owner).

dataspacedisabled
booleannullable

Whether the repository has been disabled.

Tags: task, library, languages, licence and more.

dataspacetags[]
stringoptional
dataspacepipelineTag
stringnullable

Main task of a model, e.g. `text-generation`; null in dataset and Space results.

dataspacelibrary
stringnullable

Library a model is made for, e.g. `transformers`; null in dataset and Space results.

dataspacelicense
stringnullable

Licence id taken from the tags, e.g. `mit`.

dataspacesdk
stringnullable

SDK of a Space, e.g. `gradio`; null in model and dataset results.

dataspaceparameters
integernullable

Parameter count of a model, when known; null in dataset and Space results.

dataspacespaceStage
stringnullable

Run state of a Space, e.g. `RUNNING` or `SLEEPING`; null in model and dataset results.

dataspacesubdomain
stringnullable

Subdomain the Space's app is served from.

dataspaceappUrl
stringnullable

URL of the running app.

dataspaceregion
stringnullable

Region the Space runs in.

Ids of models the Space uses.

dataspacemodels[]
stringoptional

Ids of datasets the Space uses.

dataspacedatasets[]
stringoptional

Run state of the Space.

dataspaceruntimestage
stringnullable

Run state: `RUNNING`, `SLEEPING`, `BUILDING`, `RUNTIME_ERROR`, `PAUSED` and more.

dataspaceruntimehardware
stringnullable

Hardware the Space runs on, e.g. `cpu-basic`.

dataspaceruntimerequestedHardware
stringnullable

Hardware the owner asked for.

dataspaceruntimereplicas
integernullable

Replicas running.

dataspaceruntimerequestedReplicas
integernullable

Replicas the owner asked for.

dataspaceruntimeerrorMessage
stringnullable

Build or runtime error text when the Space failed.

dataspacecard
objectnullable

The repository's card header (YAML front matter) as the author wrote it: licence, languages, datasets, base model, metrics and more.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/hugging-face/spaces/black-forest-labs/FLUX.1-dev" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Space details.