An open API service indexing awesome lists of open source software.

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

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

![Node.js](https://img.shields.io/badge/Node.js-16%2B%20%7C%2018%2B-brightgreen?logo=nodedotjs)

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

[![Live API](https://img.shields.io/badge/Live%20API-online-brightgreen?style=flat-square&logo=nodedotjs)](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.