PbnPremium REST APIs is a powerful API to help search for expired or expiring domain names specially designed for SEOs. JSON for Linked Data (JSON-LD) and Hydra Core Vocabulary web standards and also Swagger/Open API are included ! In order to facilitate the exploitation of data, PbnPremium API has a Swagger Sandbox tool available at this url : https://www.pbnpremium.com/api
The use of the API is subject to the purchase of daily, weekly, monthly and yearly access and the number of view credits (quota) per access. You can purchase more quota|views with addon pack x1000 in subscription page : https://www.pbnpremium.com/member/subscription/
The next step is to authenticate with our system. For this you will use the "Authorize" endpoint located at https://www.pbnpremium.com/api/login . Our api endpoints use REST to communicate with our system. To authenticate your client make a POST http request.
All PbnPremium API calls are subject to a Basic authentication of type « Bearer Token »
{"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTgxMTk1ODYsImV4cCI6MTYxODEyMzE4Niwicm9sZXMiOlsiUk9MRV9NRU1CRVIiLCJST0xFX0FETUlOIl0sInVzZXJuYW1lIjoic2ViIn0.M6qIg4Mt8KcdwfMkDlIXZfib_EoBL-dunq-k7flvd5O8c_hwZR5YYkK9wup_V2GQNFasNi3Ld4MeMwYd0w6WWUbYfZYfwFoI-mVDmTRc8rekOyQeyI56vOZBzt8f7Fh3t61gnNGF-4PUK_Psjwf6VqPL7wqGIfgLsrFbvqhvuLAjqHF-uh5jkxtkpO-ndQiagUHZB5D0sB0V2bCbwNKyY6RknQfsc_8Q2cwFqAAKNjrcLVs8l7PS7A5Za8Hz9M_0lIMvHAFTJeYv4vSzKN3Id1hw-rbf7eGZcQETfABXtDW_nq-4vPaRlFb82GF-hDjNfMs8EwBuAE8ghINQbZqE7-I8pOQOaZKfH48sstbRGyv_J4hkwZliKkQy3lVrDd7Ds1P2JKAup4Yq5mVbU76KjYJDQCXJB057pKTlxI0htYQx2eYhb6bdgSQ6z21PnSSXyy6ufjN99IB1rEd9aWNxr7VENFn9PQlRi4E6RCl1PtXy2BQ-FHgoYAnQtGNt-MypuKNNRLeXnvc9-34nsaBJrv8KEAvP3DG5uLkAlBb3W5a7ZXA65tZK1k7STYN0dD_hXwrNl21nT41wOOQmLHtJXHeoqa1Cq92PG3QCNt715wc47iDdFCPtMlD4oajlANtoGIJFYW28jVoz-TR2kl2j6H_xgcK66sUnyj1f3prQkhA"}
For this request you simply need your login and your password
{"username": "myusername","password": "mypassword"}
Directly from the terminal window, you can type :
curl -X POST "https://www.pbnpremium.com/api/login" -H "accept: application/ld+json" -H "Content-Type: application/json" -d "{ \"username\": \"myusername\", \"password\": \"mypassword\"}"
PHP Script (CURL)
curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://www.pbnpremium.com/api/login', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "username":"myusername", "password" : "mypassword" }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
{code : 401, message : Bad credentials}
{ token : « ExampleTOkenzI1NiIsInR5cCI6IkpXUyJ9.eyJleHAiOjE0MzQ3Mjc1MzYsInVzZXJuYW1lIjoia29ybGVvbiIsImlhdCI6IjE0MzQ2NDExMzYifQ.nh0L_wuJy6ZKIQWh6OrW5hdLkviTs1_bau2GqYdDB0Yqy_RplkFghsuqMpsFls8zKEErdX5TYCOR7muX0aQvQxGQ4mpBkvMDhJ4-pE4ct2obeMTr_s4X8nC00rBYPofrOONUOR4utbzvbd4d2xT_tj4TdR_0tsr91Y7VskCRFnoXAnNT-qQb7i7HIBTbutb9zVStOFejrb4aLbr7Fl4byeIEYgp2Gd7gY »}
curl -X GET "endpoint_url" -H "accept: application/ld+json" -H "Authorization: Bearer mytoken"
Warning : the token must be prefixed by the keyword Bearer followed by a space.
The token is valid for one hour.
Retrieves the collection of Domain resources.
[ { "dateAdded": "2021-04-11T06:39:37.907Z", "name": "string", "tld": "string", "new": true, "referingDomainCount": 0, "ratioFlowMajestic": 0, "trustFlowMajestic": 0, "citationFlowMajestic": 0, "domainAuthorityMoz": 0, "pageAuthorityMoz": 0, "mozRank": 0, "trustFlowTopicsMajestic": "string", "topicalFlowMajestic": "string", "anchorTextMajestic": "string", "refDomainsMajestic": "string", "externalBacklinks": 0, "backlinksMajestic": "string", "available": true, "spammed": true, "pendingDate": "2021-04-11T06:39:37.907Z", "pendingAvailableDate": "2021-04-11T06:39:37.907Z", "dmozIndexed": true, "semrush": true, "historySemrush": "string", "maxTrafficSemrush": 0, "maxTrustFlowBacklinks": 0, "googleIndexed": true, "pageRank": 0, "pageRankDecimal": 0 } ]
curl -X GET "https://www.pbnpremium.com/api/domains" -H "accept: application/ld+json" -H "Authorization: Bearer myExampleTokenXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTgwODA5NzcsImV4cCI6MTYxODA4NDU3Nywicm9sZXMiOlsiUk9MRV9NRU1CRVIiLCJST0xFX0FETUlOIl0sInVzZXJuYW1lIjoic2ViIn0.BTZI86OpZrssKdGy0ZdILhqiTk1P5h2MwiVeX136MX32hZcmVU1qPEzTzUXDiVf1e5x2bktWGFmah6Slp6003OYMPrjHDkCyzHqRa1hawy0oPQZVABPMot7zcZDz_0Szr_t5iySow89Ubn4fEfsY0PxFjp1hoYCwV35GuCZrzspBRy7WuJboiVoaonhoRKWrKHyTpbc282_AZjvASPv3s2qGW_vS6nAx0xe_TWa5LVan6k7M4_3uZXU8Q3gMAgVT7wQZDpXI1DjkTnF42x_UwbsZVSKGQM7n2hIs4J7dQWH2vB0AYPbeKEfinOg9EgfokgiPnghOv1UxsRZCBH-aCmIvlRSmZVvblVqLrBUMAq3b1bvp3dgfMePSmB1TkBm2F-MCY0MuofaLr4-T2zrfYftb8FW410n9zfwkC7qgCHwOpmunWY7JKSZMSIMHKJBO2NfAQo0q_DeT0qr-roN3FpWBu2SZXvoqkBUQWSZis2F57SZAFcpaDsk31EGhB539wOQylGD9Vqa60niWItkwWiiClLVhbX6HUeDayCpvvsZfj4jS6K7B8AOPEsSKQD_um6bcfDyoNW4imzYId_IZEgd7H4G7k56Lk7wYmR5J5SP13l4MhqvZRMYgbEsLbE6HHyb4ZgMZdVT4IS1PgoqEPmTdqfjt7smdGQU9qdZjXDc
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://www.pbnpremium.com /api/domains', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => array( 'Authorization: Bearer myTokenExampleAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTgwODA5NzcsImV4cCI6MTYxODA4NDU3Nywicm9sZXMiOlsiUk9MRV9NRU1CRVIiLCJST0xFX0FETUlOIl0sInVzZXJuYW1lIjoic2ViIn0.BTZI86OpZrssKdGy0ZdILhqiTk1P5h2MwiVeX136MX32hZcmVU1qPEzTzUXDiVf1e5x2bktWGFmah6Slp6003OYMPrjHDkCyzHqRa1hawy0oPQZVABPMot7zcZDz_0Szr_t5iySow89Ubn4fEfsY0PxFjp1hoYCwV35GuCZrzspBRy7WuJboiVoaonhoRKWrKHyTpbc282_AZjvASPv3s2qGW_vS6nAx0xe_TWa5LVan6k7M4_3uZXU8Q3gMAgVT7wQZDpXI1DjkTnF42x_UwbsZVSKGQM7n2hIs4J7dQWH2vB0AYPbeKEfinOg9EgfokgiPnghOv1UxsRZCBH-aCmIvlRSmZVvblVqLrBUMAq3b1bvp3dgfMePSmB1TkBm2F-MCY0MuofaLr4-T2zrfYftb8FW410n9zfwkC7qgCHwOpmunWY7JKSZMSIMHKJBO2NfAQo0q_DeT0qr-roN3FpWBu2SZXvoqkBUQWSZis2F57SZAFcpaDsk31EGhB539wOQylGD9Vqa60niWItkwWiiClLVhbX6HUeDayCpvvsZfj4jS6K7B8AOPEsSKQD_um6bcfDyoNW4imzYId_IZEgd7H4G7k56Lk7wYmR5J5SP13l4MhqvZRMYgbEsLbE6HHyb4ZgMZdVT4IS1PgoqEPmTdqfjt7smdGQU9qdZjXDc', 'Content-Type: application/ld+json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response
The endpoint /api/domains can receive parameters to filter, order or paginate the results. All these parameters are of type Query, so they have to be passed directly in the url (contrary to the endpoint /api/login where the connection parameters have to be passed in the body).
The parameters of type order can be cumulated :
Example :
https://www.pbnpremium.com/api/domains?order[pageRank]=DESC&order[trustFlowMajestic]=ASCThe domains names will then be sorted by PR and if several domains have the same PR they will be sorted by TF Majestic
Filters can be combined
The format of each filter depends on its type
tld=com
pageRank[between]=5..10
pageRank[gt]=5
pageRank[gte]=5
pageRank[lt]=5
pageRank[lte]=5
dateAdded[before]=DateTimeExample for all domains added before today (the time is set to 00:00:00) : dateAdded[before]=today
dateAdded[strictly_before]=DateTimeExample for all domains added strictly before 12 Hours : dateAdded[strictly_before]=-12hours
dateAdded[after]=DateTimeExample for all domains added after 2021/05/20 : dateAdded[after]=2021/05/20 or dateAdded[after]=2021-05-20
dateAdded[strictly_after]=DateTimeExample for all domains added strictly after 01/01/2021 : dateAdded[strictly_after]=first day of January 2021
Supported expression Syntax https://dev.mysql.com/doc/refman/8.0/en/regexp.html#regexp-syntax