APIMASH Chuck Norris Starter Kit – The Undocumented API

APIMASH Chuck Norris Starter Kit

The APIMASH Chuck Norris Starter Kit is a XAML/C# Windows 8 app that demonstrates calling the Internet Chuck Norris API.

Note: You do not download the Chuck Norris Starter Kit…it downloads you!

The ICNDb Web Service returns a simple JSON payload containing a hard-hitting nugget of humor that is deserialized and displayed on the User Interface.

For an overview of the APIMASH Starter Kits and their architecture see this article.

This article provides an overview of the starter kit so that you can learn how to call web services, deserialize JSON to C# and bind to UI controls. By digging into the APIMASH Starter Kits I hope that you are inspired to create your own unique, compelling Windows 8 app, maybe one that leverages the Internet Chuck Norris API.


  • Invokes the Internet Chuck Norris Database API (http://www.icndb.com/)
  • Demonstrates how to deserialize JSON to C#
  • Provides a baseline for a Windows 8 Store App



  • Download the Starter Kit Zip Portfolio from http://apimash.github.io/StarterKits/
  • Open the Solution in Visual Studio
  • Update the reference to the Newtonsoft JSON.NET Library in the APIMASHLib project
  • Compile and Run

Updating APIMASHLib

APIMASHLib by default is using a third party library for JSON deserialization, JSON.NET. The APIMASHLib project in the Rotten Tomatoes Starter Kit Solution will show that the Newtonsoft.Json reference is broken so you will need to update that reference.


There are 2 ways to update the reference to the Newtonsoft JSON.NET library in the APIMASHLIb project; a) Use NuGet, b) download the Zip from Json.codeplex.com and reference the DLL in the WinRT folder.

Using NuGet

To use NuGet, in Visual Studio navigate the menu Tools > Library Package Manager > Manage NuGet Package for Solution.


Search for Json.NET and install. Request to add it to the APIMASHLib project.



There are currently 2 apps in the Windows 8 Store that I am aware of that have leveraged the Chuck Norris Starter Kit. There can never be too many Chuck Norris apps and so we are only just getting started.


Touch Guy Jokes


Chuck Norris LOL

Using the Chuck Norris API

Using the Chuck Norris API is very straightforward. To request a random joke invoke this URL:


The API returns a simple JSON payload:
    "type": "success", 
        "id": 268, 
        "joke": "Time waits for no man. Unless that man is Chuck Norris." 
        "categories": []

In order to deserialize this payload we define the following C# class that maps to this structure:
public class CNorrisJoke
    public string Type { get; set; }

    public JokeValue Value { get; set; }

public class JokeValue
    public string Id { get; set; }

    public string Joke { get; set; }

    public string[] Categories { get; set; }

Note the use of the DataContract and DataMember attributes that provide the mapping between the JSON notation and the C# class members.

See this article for details on JSON Deserialization for C# developers

Changing the name of the main character

The API permits changing the name of the main character when fetching a joke. To do this, use the following GET parameters. To retrieve one random joke with main character called “John Doe”, fetch the URL:


This feature allows you to leverage the joke database in scenarios where you have someone’s name such a friend list from Facebook or Twitter.


Building compelling apps requires compelling data. Open Data API’s are an excellent way to gather and mashup new experiences for end users. To learn more attend one of our in-person workshops or one of our Webcast Series on the APIMASH Starter Kits.  Each session will run from Noon – 1pm EDT. Attend one or all four webcasts, you decide. For more details or to register, choose a webcast below.

6/5/2013 | Exploring the Mashery APIs

In this webcast you will learn how to develop Windows 8 apps using Mashery API’s such as Tom-Tom, Edmunds, Rotten Tomatoes and Active.com. Amit Jotwani from Mashery will join us to provide an overview of Mashery the industry leader in API management. We will cover how to access these web service API’s and then deserialize the response into a set of runtime objects that you can bind to Windows 8 UX Controls to create a compelling experience.

6/12/2013 | Exploring the Social Networking APIs

In this webcast you will learn how to develop Windows 8 apps using the Twitter, Meetup and Facebook APIs. Twitter, Meetup and Facebook are the premier social networking sites and their API’s provide access to Tweets, Meetups and Friends. What a great combination!

6/19/2013 | Exploring the Yelp API

In this webcast you will learn how to develop Windows 8 apps using the Yelp API. Yelp is a local business directory service and review site with social networking features. People use Yelp to search for everything from the city’s tastiest burger to the most renowned cardiologist.

6/25/2013 | Exploring the Bing Maps API

In this webcast you will learn how to develop Windows 8 apps using the Bing Maps API. Bing Maps gives you a rich set of tools to help you create amazing map experiences perfect for mash-ups.

Lastly don’t forget to check out the “Keep the Cash Rewards” offer to see how you can get $100 for publishing your app(s) in the Windows Store and/or Windows Phone Store. Publish your app before June 30, 2013 and you can get a $100 virtual Visa card for every qualified app you enter (up to $2000*). Learn more.


4 observations on “APIMASH Chuck Norris Starter Kit
  1. Pingback: APIMASH EchoNest Starter Kit | 42 base 13

  2. Pingback: APIMASH GeoNames Wikipedia API Walkthrough - DevFish on MSDN ...>««(o>... - Site Home - MSDN Blogs

  3. Pingback: APIMASH Chuck Norris Starter Kit for Windows Phone 8 | BOB FAMILIAR

  4. Pingback: Dew Drop – June 7, 2013 (#1,563) | Alvin Ashcraft's Morning Dew

Leave Your Observation

Your email address will not be published. Required fields are marked *

Read previous post:
Northeast APIMASH Tour

Get ready to learn and code, because the Northeast MSDN Roadshow team is loading up content, code, and demos that...