There are two kind of possible way to search on pornhub. The first one is to search by term and the second one is to search by filter. This call is for the search by category and subcategory.
Lists of keys available for a special search page by category (click to show)
name of keys |
return type |
description |
related_search |
String |
List of the related videos |
related_pornstars |
String |
List of the related pornstars |
|
|
|
Lists of options available for a search (click to show)
name of options |
return type |
description |
options |
default |
page |
Number |
Number of page to scraper |
- |
1 |
production |
String |
Type of production targeted |
homemade, professional |
- |
min_duration |
Number |
Minimum number of minute of the video searched |
10, 20, 30 |
- |
max_duration |
Number |
Maximum number of minute of the video searched |
10, 20, 30 |
- |
search |
String |
Type of search targeted |
video, pornstars, gifs |
video |
promo |
String |
Category of video |
premium, modelhub |
- |
filter |
String |
Filter of the page |
MOST_VIEWED, HOTTEST, TOP_RATED |
- |
Model page pornhub
async model(name, keys)
name |
type |
description |
name |
String |
name of the model in pornhub |
keys |
Array or String if there is only one option |
List of the keys |
type |
String |
There is two kind of model : pornstar or model |
Lists of keys available for a model page (click to show)
name of keys |
return type |
description |
title |
String |
The name of the model |
description |
String |
The description of the model |
rank_model |
String |
The actual rank of the model |
rank_week_model |
String |
The rank of the model for the week |
rank_month_model |
String |
The rank of the model for this month |
rank_last_month_model |
String |
The rank of the model for last month |
rank_year_model |
String |
The rank of the model for this year |
relationship_status |
String |
The status of the model (Work only if the model has filled up this field) |
interested_in |
String |
The interest of the model (Work only if the model has filled up this field) |
gender |
String |
The gender of the model (Work only if the model has filled up this field) |
birthday |
Date |
The birthday of the model (Work only if the model has filled up this field) |
age |
Number |
The age of the model (Work only if the model has filled up this field) |
height |
String |
The height of the model (Work only if the model has filled up this field) |
weight |
String |
The weight of the model (Work only if the model has filled up this field) |
ethnicity |
String |
The ethnicity of the model (Work only if the model has filled up this field) |
video_views |
Number |
The number of video view of the model (Work only if the model has filled up this field) |
profile_views |
Number |
The number of profil view of the model (Work only if the model has filled up this field) |
videos_watched |
Number |
The number of video watched by the model (Work only if the model has filled up this field) |
joined |
String |
The period passed after the model joined Pornhub |
Examples
Scraping the title of a video (click to show)
const pornhub = require('phub-dl');
const video = await pornhub.page(url, ['title']);
{
"title": "Name of the video"
}
Scraping the title of a video and the description (click to show)
const pornhub = require('phub-dl');
const video = await pornhub.page(url, ['title','description']);
{
"title": "Name of the video",
"description": "Description of the video"
}
Scraping the name of the pornstars and the downloads links (click to show)
const pornhub = require('phub-dl');
const video = await pornhub.page(url, ['title','pornstars','download_urls']);
{
"title": "Title of the video",
"pornstars": ["Sophie A","Rocco B"],
"download_urls": {
"720" : "https://p.com/link1",
"480" : "https://p.com/link2",
"360" : "https://p.com/link3"
}
}
Scraping a search pornhub without options (click to show)
const pornhub = require('phub-dl');
const video = await pornhub.search("Aa",["title","link","premium","hd"]);
[{
"link": "https://p.com/link1",
"title": "Title of the video",
"hd": true,
"premium": true
},{
"link": "https://p.com/link2",
"title": "Title of the video",
"hd": false,
"premium": false
}]
Scraping a search pornhub with options (click to show)
const pornhub = require('phub-dl');
const video = await pornhub.search("Aa",["actor","rank"],{production: 'homemade', search: 'pornstars'});
[{
"actor": "Herica Alue",
"rank": 8005,
},{
"actor": "Robert Laach",
"rank": 60
},{
"actor": "Aalix Lolo",
"rank": 6500
}]