API Useful Websites

Simple API with which you can use a simple PHP or JS code to randomly receive different useful pages that we have in our database. Or the list of the top ten useful pages

The URLS where the requests have to be made are the following:

                        
    https://www.usefulweb.site/api/random // A random website
    https://www.usefulweb.site/api/best // The top 10 websites
                        
                    

Get random website

By means of this code you will be able to receive a random website from among all the useful websites in our database. Once you have received the data via JSON you can store it in the way that suits you best.

Here is an example of the information in JSON language that you will receive after making the request. Each time you run this query again you will receive a different result.

The data to be received will be: name of the website, url and description.

                        
    {"name":"Real Favicon Generator","link":"https:\/\/realfavicongenerator.net","description":"The best Favicon generator"}
                        
                    

Using PHP

With this simple PHP code you will receive the data to store it in the way that suits you best. In the example we have stored it in different variables, but you can use the $arr array the way you want, which is the one that contains the data.

                        
    $url="https://www.usefulweb.site/api/random/";
    $c = curl_init($url);
    curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
    $info = curl_exec($c);
    curl_close($c);
    $arr = json_decode($info);

    //Now you can use the data as you wish.
    $name = $arr->name;
    $link = $arr->link;
    $description = $arr->description;
                        
                    

Get best websites

You may also want the top 10 useful websites from our database. We also give you that option with the code below. In this case the request is made to the url https://www.usefulweb.site/api/best/

The difference is that this time it will always show you the top 10 results, these will not be fixed, as the positions of the top 10 change in our database, they will also change for you.

Here is the example of the data you will receive in JSON

                        
    [{"name":"All People on 1 page","link":"https:\/\/www.worldometers.info\/watch\/world-population\/region.php","description":"Displays live world population by region"},{"name":"A Soft Murmur","link":"https:\/\/asoftmurmur.com\/","description":"Create your own ambient sound to your liking, rain, fire, thunder, birds, air..."},{"name":"Camel Camel Camel","link":"https:\/\/es.camelcamelcamel.com\/","description":"To track the price of a product on amazon"},{"name":"ManualsLib","link":"https:\/\/www.manualslib.com\/","description":"If you have lost the manual of anything, cell phone, washing machine, television, mp3 player, you can find it here"},{"name":"Real Favicon Generator","link":"https:\/\/realfavicongenerator.net","description":"The best Favicon generator"},{"name":"LMGTFY","link":"https:\/\/es.lmgtfy.app\/#gsc.tab=0","description":"To troll those people who ask anything before googling."},{"name":"Cloud Convert","link":"https:\/\/cloudconvert.com\/","description":"Site for conversion between more than 200 formats. audio, video, documents..."},{"name":"Have I Been pwned","link":"https:\/\/haveibeenpwned.com\/","description":"Check if your email has been hacked on many major online services"},{"name":"Frinkiac","link":"https:\/\/frinkiac.com\/","description":"Search for any Simpsons scene from a dialogue and it allows you to create a GIF."},{"name":"Can You Run it","link":"https:\/\/www.systemrequirementslab.com\/cyri\/","description":"Find out if your PC's features are capable of running a game"}]
                        
                    

Using PHP

Just like the previous example form, it returns the data for you to store where you want it, only this time it is in an array.

                        
    $url="https://www.usefulweb.site/api/best/";
    $c = curl_init($url);
    curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
    $info = curl_exec($c);
    curl_close($c);
    $arr = json_decode($info, true);

    //Now you can use the data as you wish.
    $name = $arr[3]['name'];
    $link = $arr[3]['link'];
    $description = $arr[3]['description'];