
The DayPI supports a mechanism we call source filtering as a means to limit API results to a specific set of sources, or to eliminate a specified set of sources from returned results.
This recipe describes the two existing methods for invoking source filters in DayPI calls.
In general, source filters can contain either a white list, which ensures that returned results are limited to a specified set of results, or as a black list, which suppresses results from a particular set of sources from return data.
In addition, source filters can be defined in two ways: as a predefined set or as a runtime defined set , which you provide in the context of your DayPI call.
Indexes help you create fun widgets to keep track of the coverage that topics of your interest are getting. The Index Creator in our labs section helps your create an index widget in few minutes with upto 12 topics/queries that you care about.
However, if you want an index widget with more customizations, you can use our News Indexer code to generate the data files for such a widget. Some examples of these customizations could be a an index with
Remember, this code lets you generate the XML data files for an index widget. You will have to then build the UI for the widget that consumes this XML.
If you see your blog or website on Daylife, you can enable your site search using the Daylife APIs. You can find out if you are in the Daylife system or not by searching for your blog or site name on Daylife . If you cannot find your content in the Daylifesystem
The support for Source Filtering in the DayPI will help you to search through your content archive by using a source filter that just has your source.
You can also enhance the search experience on your site by giving results from your partners or from all over the web. As long as your partner's content is in the Daylife system, you can build a source filter with a list of your partners.
Let's pretend that you are a big sports fan and you want to get sports news about your favorite teams and players from a set of sources you find most reliable, and put those headlines on your website or your blog or your widget. Here's how, step-by-step.
DayPIs (version 4.4 and above) let you filter news from a specific set of sources by either using a source_filter_id or mentioning a list of source names in the API calls in the source_whitelist parameter.