Example of the Widget API
This page is making use of the widget API to create a simple alphabetical bullet list of articles on this site
This is done by include this javascript file:
<script type="text/javascript" src="/apiservice/js/helpers.js"></script>
And then calling this function to retrieve the results:
fetchDynamicWidgetASMX(moduleID, error function, results function, page, articleID);
You can the manipulate the results using ordinary javascript to produce your desired outcome.