Advice Slip JSON API

Random advice

HTTP Method GET
URL http://api.adviceslip.com/advice
Description Returns a random advice slip as a slip object.
Parameters
callback
string To define your own callback function name and return the JSON in a function wrapper (as JSONP), add the parameter callback with your desired name as the value.

Advice by ID

HTTP Method GET
URL http://api.adviceslip.com/advice/{slip_id}
Description If an advice slip is found with the corresponding {slip_id}, a slip object is returned.
Parameters
callback
string To define your own callback function name and return the JSON in a function wrapper (as JSONP), add the parameter callback with your desired name as the value.

Searching advice

HTTP Method GET
URL http://api.adviceslip.com/advice/search/{query}
Description If an advice slip is found, containing the corresponding search term in {query}, an array of slip objects is returned inside a search object.
Parameters
callback
string To define your own callback function name and return the JSON in a function wrapper (as JSONP), add the parameter callback with your desired name as the value.

Messages

In the event of an error occuring, a message object is returned, containing relevant information about the request.

Slip object

A slip object is a simple piece of advice.

Name Type
slip_id integer The unique ID of this advice slip.
advice string The advice being given.

  {
    "slip": {
      "slip_id": "2",
       "advice": "Smile and the world smiles with you. Frown and you're on your own."
    }
  }
  

Back to top

Search object

A search object contains the results of a slip search query.

Name Type
total_results integer Total number of matching advice slips found.
query integer The search query provided.
slips string An array of slip objects matching the search query.

  {
    "total_results": "2", 
    "slips": [
      {
        "advice": "Remember that spiders are more afraid of you, than you are of them."
      },
      {
      	"advice":"Smile and the world smiles with you. Frown and you're on your own."
      }
     ]
  }
  

Back to top

Message object

A messages object contains information about the status of the requested API URL.

Name Type
type string The type of messages. Can be either noticed, warning or error.
text string The messages being received.

  {
   "message": {
      "type": "notice", 
      "text": "Advice slip not found."
    }
  }
  

Back to top

RSS

RSS feeds allow for easy access and sharing of advice slips.

Daily Advice Slip

URL http://api.adviceslip.com/daily_adviceslip.rss
Description This feed provides a single piece of advice, chosen at random daily, in a simple RSS 2.0 format.

Back to top

Berg Little Printer

Berg Little Printer

If you're lucky enough to own a Little Printer, Advice Slip has required the API endpoints available for you to subscribe to daily advice slips.

There is also a sample edition to view online.

Back to top