Video data API

Pornhub API

Get Pornhub video details together with a ready-to-use MP4 download link for every available quality in one call, plus user, pornstar and channel profiles and the full localized category list.

Overview

What the Pornhub API gives you

Endpoints

Pornhub API endpoints

GET

Get video with download links

Returns video details (title, duration, thumbnail, uploader, views, likes, pornstars, categories, tags) and a direct MP4 download link for every available quality, with the exact file size.

/video/{viewkey}
  • viewkey — video ID from the page URL: pornhub.com/view_video.php?viewkey={viewkey}
GET

Get user by nickname

Returns Pornhub user information by nickname.

/users/{nickname}
  • nickname — Pornhub user nickname
  • lang — optional language code (en, ru, de, fr, es, it, pt, pl, ja, nl, cz, cn)
GET

Get pornstar by nickname

Returns Pornhub pornstar profile information.

/pornstars/{nickname}
  • nickname — Pornhub pornstar nickname
  • lang — optional language code
GET

Get channel by name

Returns Pornhub channel information.

/channels/{channel_name}
  • channel_name — Pornhub channel name
  • lang — optional language code
GET

Get the full categories list

Returns the localized full category list for the requested language code.

/categories_list/{lang}
  • lang — language code (en, ru, de, fr, es, it, pt, pl, ja, nl, cz, cn)
GET

Get download traffic quota

Returns your monthly video download traffic: limit, used and remaining traffic, the reset date and how many downloads can run at the same time.

/quota

Quick start

Make your first request

Apimirai gateway

Send your account API key in the X-API-Key header, as an Authorization: Bearer token or as the api_key query parameter. Every response is JSON.

curl \
     -H "X-API-Key: <your-api-key>" \
     "https://api.mirai-api.com/pornhub-api/video/<viewkey>"

RapidAPI

Already on RapidAPI? Call the same endpoints with your RapidAPI key and host headers.

curl \
     -H "X-RapidAPI-Key: <your-rapidapi-key>" \
     -H "X-RapidAPI-Host: pornhub-api1.p.rapidapi.com" \
     "https://pornhub-api1.p.rapidapi.com/video/<viewkey>"

Good to know

Integration notes

Use cases

What teams build with the Pornhub API

Video downloaders

Offer downloads in every quality from a single API call per video.

Content catalogs

Index video details, tags and categories for search and recommendation.

Creator analytics

Track views and likes of channels, users and pornstars over time.

Localized sites

Show category names in 12 languages without maintaining translations.

FAQ

Pornhub API questions

How do I download a video?

Call GET /video/{viewkey}, pick a quality from formats and download its download_url with any HTTP client. The link needs no API key and supports Range requests, so interrupted downloads can be resumed.

Do downloads count as API requests?

No. Downloads use the monthly video traffic of your plan instead of the request quota. GET /quota shows the balance.

What happens with deleted or private videos?

They answer HTTP 200 with an error object that explains the reason, such as Video not found.

How do I get an API key for the Pornhub API?

Create an account on mirai-api.com, choose a plan for the Pornhub API and copy your API key from the Settings page. Send it in the X-API-Key header, as an Authorization: Bearer token or as the api_key query parameter.

Is the Pornhub API available on RapidAPI?

Yes. The same endpoints are published on RapidAPI, so you can also subscribe there and call them with your RapidAPI key.

More APIs

Creator platform API

OnlyFans API

Creator profiles, bulk lookups, posts, social links, a searchable creators catalog and search by face photo.

Start with the Pornhub API

Create an account to get your API key, documentation with live request examples and direct developer support.