https://github.com/brian404/pornhub-api
https://github.com/brian404/pornhub-api
expressjs json nodejs nsfw pornhub rest-api unofficial-api
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/brian404/pornhub-api
- Owner: brian404
- Created: 2025-03-19T07:48:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-04-01T19:27:55.000Z (3 months ago)
- Last Synced: 2026-04-02T04:37:15.723Z (3 months ago)
- Topics: expressjs, json, nodejs, nsfw, pornhub, rest-api, unofficial-api
- Language: HTML
- Homepage: https://civilian-hettie-techstar-7f0e18e1.koyeb.app/
- Size: 96.7 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# p-api
Unofficial Pornhub API is a sleek Node.js RESTful solution that easily scrapes publicly available metadata from Pornhub.com and turns it into clean, structured JSON. It's great for videos, trending content, and more.
## Requirements

## Installation
1. **Clone the repository**
```bash
git clone https://github.com/brian404/p-api.git
cd p-api
2. Install dependencies:
```bash
npm i
```
3. Start the server:
```bash
npm start
```
## Usage
By default, the API will be running at:
http://localhost:3099/api/
Visit /api/docs in your browser for full documentation.
## Endpoints
Base URL: `http://localhost:3099/api/`
Method
Endpoint Path
Description
GET
/
Returns a welcome message
GET
/trending
Fetches trending video IDs
GET
/random
Fetches a single random video ID from Pornhub’s video page
GET
/categories
Lists all Pornhub categories with their names and IDs
GET
/studios
Lists all Pornhub studios
GET
/video/:id
Gets metadata for a specific video
POST
/status
Returns API status and uptime
## Disclaimer
This project is not affiliated with Pornhub. It uses publicly available data for educational and non-commercial purposes only.
No video content is hosted, and the author is not responsible for misuse.
## Contributions
Contributions, ideas, and improvements are always welcome!
Feel free to open an issue, suggest a feature, or submit a pull request.
## Demo
[](https://node-1-sync.obj3ct32.com:8443/api/docs)
A live instance of the API is available here:
[https://node-1-sync.obj3ct32.com:8443/api/docs](https://node-1-sync.obj3ct32.com:8443/api/docs)
This endpoint provides full interactive documentation and allows you to test the API in real time.
Note: This is a public, self-hosted demo intended for testing and development only.