“Three things tell a man: his eyes, his friends and his favorite quotes.”
Quotes Daddy
 

What is the QuotesDaddy API

The QuotesDaddy API has been created to allow our partners to easily add content to their site, by integrating our content into their design.

The API allows full-freedom in how you use the content you retrieve, and is a great way to add that extra something to your site.

To use the API you must apply for an API Developer user name and key. When applying please provide as many details possible about your intended use of the API.

Thank you for trying out the QuotesDaddy API.

How to use the API

The API accepts REST requests and returns results as a simple XML file.

To receive an XML file with search results, send a request to a url formatted like this:

http://www.quotesdaddy.com/api/:api_user_name:/:your_query:

Sample Queries

All the following examples are going to use a sample username of lennon_22, and a secret key BJz2LYhjOB4grzD8fhrt49rviSW3yvKT.

Note that all sample code in this page is written in PHP and uses the SimpleXML functions.

Sample 1: Showing Random Quotes by Tag

The following sample retrieves 1 random quote tagged science

  1. <?php
  2. $api_user_name = 'lennon_22';
  3. $apiUserKey = 'BJz2LYhjOB4grzD8fhrt49rviSW3yvKT';
  4. $current_user_name = 'zzzrByte';
  5. $tag = 'science';
  6. $max_results = 1;
  7. $page = 1;
  8. $query_hash = hash_hmac('md5', $current_user_name.'random_tagged'.$tag.$max_results.$page, $apiUserKey);
  9. $xml_request_url = 'http://www.quotesdaddy.com/api/'.$api_user_name.'/'.$current_user_name.'/'.$query_hash.'/quotes/random_tagged/'.$tag.'/'.$max_results.'/'.$page;
  10. ?>

Sample 2: Showing Random Quotes by Author

The following sample retrieves 2 random quotes by Albert Einstein

  1. <?php
  2. $api_user_name = 'lennon_22';
  3. $apiUserKey = 'BJz2LYhjOB4grzD8fhrt49rviSW3yvKT';
  4. $current_user_name = 'zzzrByte';
  5. $author = 'Albert Einstein';
  6. $max_results = 2;
  7. $page = 1;
  8. $query_hash = hash_hmac('md5', $current_user_name.'random_by_author'.$author.$max_results.$page, $apiUserKey);
  9. $xml_request_url = 'http://www.quotesdaddy.com/api/'.$api_user_name.'/'.$current_user_name.'/'.$query_hash.'/quotes/random_by_author/'.$author.'/'.$max_results.'/'.$page;
  10. ?>

Sample 3: Showing Random User Favorite

The following sample retrieves 2 random quotes from zzzrByte's favorites.

  1. <?php
  2. $api_user_name = 'lennon_22';
  3. $apiUserKey = 'BJz2LYhjOB4grzD8fhrt49rviSW3yvKT';
  4. $current_user_name = 'zzzrByte';
  5. $username = 'zzzrByte';
  6. $max_results = 2;
  7. $page = 1;
  8. $query_hash = hash_hmac('md5', $current_user_name.'random_fave'.$usernam.$max_results.$page, $apiUserKey);
  9. $xml_request_url = 'http://www.quotesdaddy.com/api/'.$api_user_name.'/'.$current_user_name.'/'.$query_hash.'/quotes/random_fave/'.$username.'/'.$max_results.'/'.$page;
  10. ?>
Add Quotes to your Emails Daily Quote EmailSend us your own quotes.Use QuotesDaddy for your Email signature