The StackExchange API exposes several rest endpoints that lets us tap into one of the best technical resources around. We'll use the search method that will give us related questions once we pass a few parameters.
Using the metaWeblog api we’ll add the widget to every blog post.
The api is primarily focused in JavaScript applications. For those there is an oAuth authentication & key submission with every request.
Rather than retrieving the links with JavaScript we took the offline approach. This way you can process the links just one time, you won’t run into throttling issues and keep page loads fast.
The response form this call is JSON data. We’ll use JSON.net to parse it and create a html widget with the returned questions. At this stage we will only use the title and link of every question to display them as a list.
In the next post we'll use the metaWeblog api to insert the widget in blog posts. In particular we will take on parsing html and inserting/replacing the widget in the post markup.