API

Introduction:

Getting Started:

Before you start using the HostMozart API, it is important to know that:

  1. Most of the API features require an API key. Sign Up Here
  2. API requests are made over HTTPS. Data features return JSON.
  3. Some JSON data is cached. Cached Data does not count against hit limits. Non-Cached JSON Data, or expired Cached JSON Data does count against limits.Example: Non-Cached JSON DATA (PHP CURL)Most random data is not cached.
    <?php
    
    $apikey = "UEQ0bZ0uzJ1ssL96zKMi8KteIQPTgaJp" ;
    $cmd = "wiki" ;
    $option = "Francisco_Vázquez_de_Coronado" ; 
    $url = "http://hostmozart.com/api.php?APIKEY=".$apikey."&cmd=".$cmd."&opt=".$option ;
    
    $json = file_get_contents($url) ;
    
    ?>
    
    
  4. Per the Terms of Service a link back to this site must be included in credits where API data is displayed.<p>Data Provided by <a href="http://hostmozart.com" target="_blank" nofollow>Host Mozart's API</a>.</p>

Your API Key can be found in your user profile on this site after you login. If your APIKEY has been stolen, you can change it by changing the “API Salt” to something random, and your key will be reset. API calls are limited to 100 queries per day, cached content does not count against the limit except the first time, or after the cache has expired. Different commands have different cache limits, some have no cache unless you add the limit yourself, some have minimum cache requirements which are automatically added unless you add a higher limit.  (NOTE cachetime is in minutes, not seconds.)

If a command has more then one option, separate each with a comma. Order is important.

$option = “foo,bar,foo,bar” ;  // 4 options

For more information see each individual command page.