The DayPI provides programmers with a web accessible interface to Daylife’s news aggregation and analysis service. By using the DayPI, developers can ask rich questions about the news, and retrieve data that will allow them to build applications around the answers to those questions.
This documentation covers DayPI version 4.6.
As a user of Daylife’s API, you have the opportunity to influence near term development of the DayPI. If you have thoughts, complaints, suggestions, comments, or just want to talk, you can leave feedback in the comments attached to each page of the documentation, or send your thoughts directly to us:
Unless you have a separate agreement with Daylife, Inc., your use of the DayPI is covered by our Terms of Use at http://developer.daylife.com/API_TOU. If you’re interested in a commercial agreement, call John Donovan, or send email to partners@daylife.com
The documentation is in several parts:
The DayPI exposes metadata about and connections around a core set of News Objects. These News Objects and their relationships enable developers to build applications that reveal new kinds of information to users and enable users to explore the landscape of news.
Our goal is to enable developers to ask rich questions about news content, and to build applications around those questions and their answers.
The DayPI allows you to access various methods that retrieve information about the following classes of News Objects:
Articles
Each text-based item made available by a source that Daylife indexes has a corresponding representation in the DayPI. These include blog posts, news articles, press releases, transcripts,
and so on.
Which articles from this week's European Press cover the same subject as this
morning's lead article in the New York Times?
Quotes
Quotations extracted from articles that Daylife indexes are attributed to individuals, associated with topics, and made available via a set of API calls.
What has Angelina Jolie said about Darfur this month?
Topics
Daylife's platform organizes content according to things Daylife knows about in the world: People, Places, Companies, Organizations, and so on.
What were the most relevant articles published about Prince Charles this April?
Searches
The DayPI supports full text search of indexed content, and enables retrieval of the context created by the results of those searches.
Which organizations are most mentioned in recent articles about “Solar Powerâ€Â
Each instance of an Article, Image, Quote, or Topic News Object has a unique ID. These IDs can be obtained initially through the search method calls. For example, the search method call search_getRelatedArticles returns articles containing a query string each with a unique article_id. These unique IDs can then be used to call article_getRelatedQuotes to obtain additional content about or related to that specific article. This principle of unique IDs applies to all News Objects.
Note: Some calls accept multiple unique IDs. In other cases, alternative mechanisms exist to access News Objects other than unique IDs. See the Constructing Requests section and the individual calls in the reference section for more details.
Timestamps are returned by the DayPI and are provided to the DayPI as parameters to News Object method calls. Timestamps are formatted as epoch values or ISO 8601 strings.
In all cases, Timestamps provided to and returned by the DayPI are expressed in Universal Time (UTC).
Epoch Value Timestamp
Date and time represented by an integer indicating the number of seconds elapsed since Jan 1, 1970.
ISO 8601 Timestamps
A string in the form YYYY-MM-DD hh:mm:ss, where date and time are separated by an empty space:
YYYY - four digit number representing the year.
MM - two digit number representing the month. Values are in the range 01 to 12.
DD - two digit number representing the day. Values are in the range 01 to 31.
hh - two digit number representing the hour in 'military time'. Values are in the range 00 to 23.
mm -two digit number representing the minute. Values are in the range 00 to 59.
ss - two digit number representing the whole seconds. Values are in the range 00 to 59.
Timestamps in DayPI Requests
The DayPI accepts two request parameters that are timestamps -- start_time and end_time.
start_time always chronologically precedes the end_time. For example, if start_time is "2007-01-01", then end_time must be sometime chronologically after Jan 1, 2007.
Each parameter can accept either an integer epoch value or an ISO 8601 formatted string (see earlier discussion on Timestamps).
Omitted parts of ISO 8601 formatted timestamps fall back to default values with the following rules:
Timestamps in DayPI Responses
Timestamps in DayPI responses are returned as two separate (but logically identical) response parameters for convenience:
The DayPI is accessed by calling News Object methods and passing parameters via HTTP GET.
Requests are composed by constructing a URL that specifies an API endpoint and a list of input parameters. Input parameters are provided as URLEncoded name value pairs.
A DayPI endpoint is specified like this:
http://freeapi.daylife.com/<protocol>/publicapi/<version>/<NewsObject name>_<method name>
Input parameters are appended to the DayPI endpoint as '&' separated list of name-value pairs of arguments, added to the query string using the standard HTTP GET formatting.
So a fully expressed call to the DayPI looks like this:
http://freeapi.daylife.com/<protocol>/publicapi/<version>
/
<NewsObject name>_<method name>?
<ampersand delimited list of input params>
For example, a call to search for articles containing the text "iraq war" is defined as follows:
http://freeapi.daylife.com
/xmlrest/publicapi/4.3/search _getRelatedArticles?accesskey= <accesskey>&signature=<signature>&query=iraq+war
where <accesskey> is your assigned access key, and <signature> is replaced by an actual MD5 security signature as explained below.
The above request may return multiple articles in its response each with a unique ID (discussed earlier). A request for quotes related to one of these articles would look like this:
http://freeapi.daylife.com
/xmlrest/publicapi/4.8/article _getRelatedQuotes?accesskey= <accesskey>&signature=<signature>&article_id=04rJ6WI8rR1nm
If quotes from multiple articles are desired, multiple articles may be provided as multiple article_id parameter name-value pairs as follows:
http://freeapi.daylife.com
DayAPI users are provided with two authentication credentials to call DayPI methods:
Each DayPI call has a core input at its heart (see earlier discussion on Unique IDs). The specific nature of this core input depends on the News Object being accessed.
In order to authenticate, DayPI users create a signature using the access key, the shared secret, and the core input for the call at hand. That signature string is then used in the API call parameter named signature. The signature parameter is calculated as follows:
Signature = md5(concatenation of access key, the shared secret, and the core input)
So, for example in PHP:
$accesskey = "6674e8aeda420d50e716706c20c123
45";
$sharedsecret = "2234e8aeda420d50e716706c20c56789";
$coreinput = "Iraq war";
$signature = hash('md5', $accesskey.$sharedsecret.$coreinput);
Note that the core input should NOT be urlencoded for the purposes of signature generation.
If an API call accepts multiple values for the core input parameter (e.g. article calls can accept multiple article ids or multiple article urls), the $coreinput for signature generation is a concatenated string of alphabetically sorted list of the core input values.
For e.g., If I am calling article_getInfo for article ids 0eQ1fovglo368, 0fP60GB2Qy9EX and 08Dh1Ij97064e, to create signature in PHP:
$accesskey = "6674e8aeda420d50e716706c20c123
45";
$sharedsecret = "2234e8aeda420d50e716706c20c56789";
$coreinput = "08Dh1Ij97064e" . "0eQ1fovglo368" . "0fP60GB2Qy9EX";
$signature = hash('md5', $accesskey.$sharedsecret.$coreinput);
Some more discussion about creating signatures here.
The DayPI returns data in a variety of formats, depending on the value of <protocol> you specify in your constructed request. In this version of the DayPI, there are 3 response formats are available:
Again, the only thing you need to change is the protocol you specify in your method call. So, for instance:
http://freeapi.daylife.com/xmlrest/publicapi/4.3/search_getCounts
?query=iPhone& accesskey=8befa1cf0a7c029161324 2235638a662&signature=48ac7a28b 5862696c123f5ab616d608f
and
http://freeapi.daylife.com/phprest/publicapi/4.3/search_getCounts
?query=iPhone& accesskey=8befa1cf0a7c029161324 2235638a662&signature=48ac7a28b 5862696c123f5ab616d608
and
http://freeapi.daylife.com/jsonrest/publicapi/4.3/search_getCounts
?query=iPhone& accesskey=8befa1cf0a7c029161324 2235638a662&signature=48ac7a28b 5862696c123f5ab616d608f
Each returns the same data, only in different formats.
Daylife tracks news from thousands of sources across the world. Sources include mainstream news such as the New York Times, blogs such as BuzzMachine, and other types of news content sources such as Getty Images for photos.
For your application, however, you may wish to restrict the results you retrieve to suppress certain sources, or to only feature content from specific sources.
DayPI users can restrict the results of the DayPIs to sources of their choice by creating and accessing source filters – i.e., whitelists or blacklists of news and image sources. 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.
You can have as many source filters as you like, which you can use for various purposes. For example:
You can read more about how to use source filters here.
All DayPI requests must be made with URL encoded parameter values.
For example query="George Bush" must be encoded as query=%22George%20Bush%22 (or query=%22George+Bush%22).
Wikipedia has a nice overview of URLEncoding (http://en.wikipedia.org/wiki
You can find hard-core documentation in RFC3986 on the IETF site (http://tools.ietf.org/html
All responses from the DayPI return data in UTF-8 encoding.
You can read more about UTF-8 encoding in a Wikipedia article at http://en.wikipedia.org/wiki
The DayPI provides the capability to paginate through and sort returned results.
A DayPI user can page through results by specifying positive integer values for the limit and offset request parameters. For example:
http://freeapi.daylife.com
/xmlrest/publicapi/4.3/search _getRelatedArticles?accesskey=<accesskey>&signature=<signature>&query=iraq+war&offset=0&limit=10
returns 10 rows of results starting at index 0. Similarly, offset=10&limit=10 returns the next 10 rows in the results starting at index 10.
DayPI users can also sort results by specifying a sort parameter in the request. For example:
http://freeapi.daylife.com
/xmlrest/publicapi/4.3/search _getRelatedArticles?accesskey=<accesskey>&signature=<signature>&query=iraq+war&offset=0&limit=10&sort=date
returns results sorted by reverse chronological order.
Most of the DayPI methods allow for sorting by chronologically ascending 'date' or by weighted 'relevance'. For specific information about supported sorting options, refer to the News Object method calls themselves as well as the section/appendix on search query syntax which includes more information on relevance sorting and ways of influencing it.
There are parameters in the DayPI that accept multiple values. They can be expressed as
paramName=paramValue1¶mName=paramValue2¶mName=paramValue1
If a core input parameter can accept multiple values, the methodology to create a signature is specified here.
In order to accommodate an evolving DayPI while ensuring backwards compatibility (we don't want your stuff breaking!), Daylife uses an explicit versioning scheme.
Each DayPI call endpoint has a version number and every request explicitly specifies the version number in the request URL.
The DayPI uses a Major.Minor.Patch version scheme, like so:
Major
A major change introduces dramatically new and or different functionality, and includes changes in syntax that will almost certainly break existing applications.
Minor/Compatibility Level
The Minor level increments with added features released. A developer should expect to see new features in the DayPI. Minor level changes are NOT guaranteed to be backwards compatible.
Patch Level
The Patch level increments when bug fixing a Minor release. These fixes to existing calls are guaranteed to be backwards compatible for the corresponding Major and Minor level. For example, if a new version 1.4.2 of the DayPI is released, all 1.4 calls will continue to work as before.
Daylife keeps multiple versions of the API running simultaneously, so that your application can continue running against an existing compatibility level until that level is explicitly discontinued.
In order to make sure that the broad community of users has access to the DayPI for free, we cap each developer's daily usage of the DayPI.
At this time, you're allowed to make 5000 calls per day to the DayPI.
If your usage will exceed this cap, you should contact us.
Typically, Premium Licenses of the DayPI are not subject to daily usage caps.
The Search News Object enables full-text searching of news content. The DayPI search engine is based on Lucene. As such, the DayPI supports a subset of Lucene's search syntax.
Search News Object can accept queries with that are composed of upto 32 terms. Each term is considered to be a word where space is a word boundary. The logical operators are not counted in these 32 terms.
Search News Object method calls must have their query strings URL Encoded. For example, an "iraq war" query string (sans quotes) must be converted to either iraq+war or iraq%20war:
http://freeapi.daylife.com
A query is broken up into terms and Boolean operators (discussed below). There are two types of terms: Single Terms and Phrases.
A Single Term is a single word such as "test" or "hello".
A Phrase is a group of words surrounded by double quotes such as "hello dolly".
Multiple terms can be combined together with Boolean operators to form a more complex query (see below). Note that all single terms and phrases are case insensitive.
Calls to the Search API are limited to 32 terms in total.
You can refine your search by limiting the application of a particular term to the headline or title of an article. This works like so:
title:"Global Warming"
You can combine this with a search against the body of the article, for example:
"jail time" AND title:Libby
This finds articles that contain the phrase "jail time" and have the word Libby in the headline.
The DayPI (via Lucene) supports modifying query terms to provide a wide range of searching options.
Daylife searches determine the relevance level of matching documents based on the terms found. To boost a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.
Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for
cheney wiretapping
and you want the term "cheney" to be more relevant boost it using the ^ symbol along with the boost factor next to the term. You would type:
cheney^4 wiretapping
This will make documents with the term cheney appear more relevant. In effect, this changes the sort order of the documents returned to you when you query using sort=relevance.
You can also boost Phrase Terms as in the example:
"cheney wiretapping"^4 "Alberto Gonzales"
By default, the boost factor is 1. The boost factor must be positive, and it can be less than 1 (e.g. 0.2)
Boolean operators allow terms to be combined through logic operators. The DayPI supports AND, "+", OR, NOT and "-" as Boolean operators. Note: Boolean operators must be in ALL CAPS.
The AND operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the AND operator is used.
You can use up to 32 terms in any given call to the Search API.
The AND operator matches documents where both terms exist anywhere in the text of a single document. This is equivalent to an intersection using sets. The symbols && can be used in place of the token AND.
To search for documents that contain "libby perjury" and "Valery Plame" use the query:
"libby perjury" "Valery Plame"
or
"libby perjury" AND "Valery Plame"
The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. The symbol || can be used in place of the word OR.
To search for documents that contain either "libby perjury" or just "plame" use the query:
"libby perjury" OR plame
The "+" or required operator requires that the term after the "+" symbol exist somewhere in the text of a retrieved document.
To search for documents that must contain "libby" and may contain "pejury" use the query:
+libby perjury
The NOT operator excludes documents that contain the term after the NOT operator. This is equivalent to a difference using sets. The symbol ! can be used in place of the token NOT.
To search for documents that contain "libby perjury" but not "Valery Plame" use the query:
"libby perjury" NOT "Valery Plame"
Note: The NOT operator should not be used with just one term. For example, the following search will return no results:
NOT "Valery Plame"
The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.
To search for documents that contain "libby perjury" but not "Valery Plame" use the query:
"libby perjury" -"Valery Plame"
You can use parentheses to group clauses to form sub queries. This allows specific control over how Boolean logic is applied to a query.
To search for either "libby" or "cheney" and "indictment" use the query:
(libby OR cheney) AND indictment
This retrieves articles where either "libby" or "cheney" are used along with "indictment".
If you use the DayPI to power your product, you must include a Powered By Daylife tag on each page that uses Daylife Techology.
We may from time to time change these branding requirements. Your continued use of the DayPI in your application is contingent on your continued compliance with these branding guidelines.
Our design guidelines are simple:
Download this .zip file for production-quality branding art.
And, of course, contact us if you have any questions.
| Attachment | Size |
|---|---|
| DaylifeBranding.zip | 933.83 KB |
The Daylife API tester lets you make Daylife API calls without having to write any code. Plus, it lets you visualize the data with some basic HTML.
Read below how to start using this API tester.
There are only a very few things you need to do before you can start playing with the DayPIs.
a. Signup on our Developer site
b. Wait for an email that sends you a set of API credentials - an Accesskey and a Sharedsecret
Once you have your API credentials, you are ready to make your first API call using our API Tester.
The goal of the API Tester is to give you a test bed to play with the DayPIs without having to write a single line of code.
Where to find the API Tester?
You can use the tester at http://demos.daylife.com/api_tester/
What information does one need to use the API Tester?
You will need to fill out your Accesskey and Sharedsecret under the User Info section as shown in the screenshot below. You do not need to put any data in the signature box. The API tester fills out the signature box to help you verify your signature calculation by comparing it with the one calculated by the tester.

You can add the javascript below as a bookmark in firefox to help you fill the accesskey and sharedsecret. Once you have the API tester open in firefox, click on the bookmark and you are ready to use the API tester. Just fill in your accesskey and the sharedsecret in the javascript below before adding it as a bookmark.
javascript:(function(){ var fields = document.getElementsByTagName('input'); for (var i = fields.length - 1; i >= 0; i--){ switch(fields[i].name){ case 'accesskey': fields[i].value = 'your access key'; break; case 'sharedsecret': fields[i].value = 'your shared secret'; break;}};})()
How to select an API call in the API Tester?
The drop downs for Type and Method under the Resource Type and Method section helps you select the API call you are trying to test.
The Type drop down lists the news objects that are available. If you want to find articles for a given topic name, the topic is the news object and you select topic in the Type drop-down. Similarly, you select article Type if you have an article ID or an article URL to find related content about.
Once you have selected the Type, the Method drop-down shows you the list of functions that are available for that particular news object. For e.g., if you select topic as your Type, your Method drop down shows options such as getRelatedArticles, getRelatedImages etc.

How do I specify the parameters for an API call?
Once you have selected the method you are trying to call, you will see a stack of boxes under the Parameters section. Please read the API documentation to determine the possible values for any parameter.

How do I call the API?
Once you have filled out the API credentials, selected the API call and filled out the parameters, you can call the API by clicking on the
button
The API Call URL box gives you the actual DayPI URL that was called.

How should I read the response?
The Response box displays the data returned by the DayPI call.
There are 4 tabs on the top of the Response box - HTML, XML, JSON and PHP.
Each tab except HTML helps you select the format in which you want the data to be returned by the DayPI. The HTML tab is present in the API tester to help make the DayPI response more readable.

We hope the API tester will help you get a head start in learning how to call the APIs and what kind of data comes back. If you encounter issues while using the API tester, please use the the developer forum to get your questions answered.
The DayPI call responses include codes indicating success or failure as well as a message with some explanation or helpful tip in cases of failure. Here is the current list of response/error codes and messages:
| 2001 | Success |
| 2002 | Success (cached response) |
| -2001 | Invalid API Credentials |
| -2002 | Invalid input id |
| -2003 | Date start_time is in an invalid format. Please use "YYYY-MM-DD hh:mm:ss" or an epoch value |
| -2004 | Invalid date range [%(start)s, %(end)s]. Start date cannot be earlier than the end date |
| -2006 | Source filter ID is invalid |
| -2007 | Invalid topic id provided in the "speaker_topic_id" parameter. |
| -2008 | Topic Not found in system |
| -2009 | Invalid value "%(error_value)s" for field "%(error_field)s |
| -2011 | Found multiple values for parameter "%(error_field)s". Only one instance of this parameter is permitted |
| -2012 | Multiple name-value pairs found for a parameter that is allowed only once. |
| -2013 | Required ID or name not found in the request |
| -2014 | Invalid Topic Type |
| -2016 | Invalid Source ID |
| -2017 | Conflicting usage of parameters. |
| -2018 | Invalid Source Type |
| -2019 | Invalid Source Rank |
| -2020 | Invalid Query |
| -2021 | Query exceeded the maximum term limit of 32 terms and/or phrases |
| -2022 | Content exceeded the maximum character limit of 20,000 characters |
| -2023 | Invalid text in the content parameter |
| -2025 | Request time out |
| -2026 | Request time out |
| -2027 | Invalid value for min_topic_image_confidence. Valid values are high, low or medium. |
| -2028 | Request time out |
| -2029 | Start time and end time must be within the last 90 days |
| -2030 | Value of top_count cannot exceed 50. |
| -2031 | Required ID or name not found in the request |
This method is used to retrieve articles that are related to the given article.
Sample Invocation
http://freeapi.daylife.com/xmlrest/publicapi/4.8/article_getRelatedArticles?
accesskey=<accesskey>&signature=<signature>&article_id=07vgers9mJayf&limit=2
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature* | string | Y | <calculated_signature> | N/A | |
| article_id | The article id or a list of name-value pairs of article_ids | string | Y if url not provided | 03cV5zI2fk03s | N/A |
| url | The article url or a list of name-value pairs of article urls | string | Y if article_id not provided | N/A | |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | The number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | Flag to indicate the sorting order | string | N | date, relevance | date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| include_image | Flag to indicate if one related scraped image should be returned if available. | integer | N | 0 or 1 | 0 |
| include_scores | Flag to indicate if enhanced score data should be included for every article if available. | integer | N | 0 or 1 | 0 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <article> <timestamp_epoch type="int4">1200682287</timestamp_epoch> <source> <name type="str">Associated Press</name> <url type="str">http://hosted.ap.org/</url> <daylife_url type="str">http://www.daylife.com/source/Associated_Press</daylife_url> <rank type="int4">1</rank> <source_id type="str">0f279rG8jo3Is</source_id> <type type="int4">1</type> <favicon_url type="str">http://favicon.daylife.com/imageserve/0g0BarQeCPe2i/favicon.png</favicon_url> </source> <headline type="str">Sunni Sheik Offers Guns and Gets Rewards</headline> <timestamp type="str">2008-01-18 18:51:27</timestamp> <related_article_count type="int4">13</related_article_count> <excerpt type="str">They know him as the sheik. But what that really means in this Sunni town is a bit of everything: community leader, public works supervisor, agricultural planner, militia captain. </excerpt> <url type="str">http://hosted.ap.org/dynamic/stories/I/IRAQ_SHEIKS_BARGAIN?SITE=TNKNN</url> <query_term type="str">07vgers9mJayf</query_term> <daylife_url type="str">http://www.daylife.com/article/03j9fqr8kkb6B</daylife_url> <article_id type="str">03j9fqr8kkb6B</article_id> <scores> <newsdomain type="str">World</newsdomain> <op-ed type="int4">5</op-ed> <spinometer type="int4">-5</spinometer> </scores> </article> ........ ........ </payload> </response>
This method is used to retrieve quotes from articles related to the given article.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature* | string | Y | <calculated_signature> | N/A | |
| article_id | The article id or a list of name-value pairs of article_ids | string | Y if url not provided | 03cV5zI2fk03s | N/A |
| url | The article url or a list of name-value pairs of article urls | string | Y if article_id not provided | N/A | |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | the number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | flag to indicate the sorting order | string | N | date, relevance | date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| require_speaker | flag specifying the quotes returned must be attributed (i.e., the speaker is known) | integer | N | 0 or 1 | 0 |
| speaker_topic_id | topic_ids of topics that the quotes returned must be attributed to | string | N | list of name-value pairs of topic_ids | None |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <quote> <quote_id type="str">03TWezQa1M85p</quote_id> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <timestamp type="str">2008-01-19 13:29:12</timestamp> <quote_text type="str">But we will still be friends with the Americans and invite them to tea every time they drive through the town </quote_text> <source> <name type="str">MSNBC</name> <url type="str">http://www.msnbc.msn.com/</url> <daylife_url type="str">http://www.daylife.com/source/MSNBC</daylife_url> <rank type="int4">1</rank> <source_id type="str">07yTb3kbhD6Bo</source_id> <type type="int4">1</type> </source> <query_term type="str">07vgers9mJayf</query_term> <daylife_url type="str">http://www.daylife.com/quote/03TWezQa1M85p</daylife_url> <article> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <headline type="str">'Awakening' pacts prove complicated</headline> <timestamp type="str">2008-01-19 13:29:12</timestamp> <url type="str">http://www.msnbc.msn.com/id/22739412/</url> <daylife_url type="str">http://www.daylife.com/article/0baOdqcflg2hB</daylife_url> <article_id type="str">0baOdqcflg2hB</article_id> </article> </quote> ........ ........ </payload> </response>
This method is used to retrieve topics from articles related to the given article.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature* | string | Y | <calculated_signature> | N/A | |
| article_id | The article id or a list of name-value pairs of article_ids | string | Y if url not provided | 03cV5zI2fk03s | N/A |
| url | The article url or a list of name-value pairs of article urls | string | Y if article_id not provided | N/A | |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | The number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | Flag to indicate the sorting order To be implemented in future. | string | N | date, relevance | Date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| include_topic_type | one or more name value pairs indicating which sorts of topics you wish to include | string | N | PERSON, ORGANIZATION, PLACE, EVENT, HOLIDAY, ISSUE, SPORT, STATION, PRODUCT, DRUG, DISEASE | All types of topics |
| include_image | Flag that indicates if a thumbnail image for each topic should be returned if available. | integer | N | 0 or 1 | 0 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <topic> <topic_id type="str">0dVm3LAbhJbES</topic_id> <type type="str">PLACE</type> <name type="str">United States</name> <daylife_url type="str">http://www.daylife.com/topic/United_States</daylife_url> <image> <url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</url> <daylife_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/340x.jpg</daylife_url> <thumb_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</thumb_url> <timestamp_epoch type="int4">1177281949</timestamp_epoch> <timestamp type="str">2007-04-22 22:45:49</timestamp> <credit type="str">AFP/Getty Images</credit> <image_topic_relevance type="int4">10</image_topic_relevance> <width type="int4">2860</width> <height type="int4">2268</height> <image_id type="str">0gwb63H2Wmapg</image_id> <caption type="str"> Vania King of the US (L) speaks with US team captain Zena Garrison (R) during a break in her match against Kirsten Flipken of Belgium in the quarter-finals round in the Fed Cup World Group 2007 between Belgium and the US in Delray Beach, Florida 22 April 2007. King won the match 4-6, 6-4, 7-5 to give the US a total score of 3-0 and move to the next round </caption> <source> <name type="str">Getty Images</name> <url type="str">http://gettyimages.com/</url> <daylife_url type="str">http://www.daylife.com/source/Getty_Images</daylife_url> <rank type="int4">1</rank> <source_id type="str">0a9L9fsaU55wK</source_id> <type type="int4">6</type> </source> </image> </topic> ........ ........ </payload> </response>
This method is used to retrieve quotes from within the given article.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature* | string | Y | <calculated_signature> | N/A | |
| article_id | The article id or a list of name-value pairs of article_ids | string | Y | 03cV5zI2fk03s | N/A |
| url | The article url or a list of name-value pairs of article urls | string | Y if article_id not provided | N/A | |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | the number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | flag to indicate the sorting order | string | N | date, relevance | date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| require_speaker | flag specifying the quotes returned must be attributed | integer | N | 0 or 1 | 0 |
| speaker_topic_id | topic_ids of topics that the quotes returned must be attributed to | string | N | List of topic_ids for topics specified as speaker_topic_id=topicIDA&speaker_topic_id=topicIDB and so on | None |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <quote> <quote_id type="str">03TWezQa1M85p</quote_id> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <timestamp type="str">2008-01-19 13:29:12</timestamp> <quote_text type="str">But we will still be friends with the Americans and invite them to tea every time they drive through the town </quote_text> <source> <name type="str">MSNBC</name> <url type="str">http://www.msnbc.msn.com/</url> <daylife_url type="str">http://www.daylife.com/source/MSNBC</daylife_url> <rank type="int4">1</rank> <source_id type="str">07yTb3kbhD6Bo</source_id> <type type="int4">1</type> </source> <query_term type="str">07vgers9mJayf</query_term> <daylife_url type="str">http://www.daylife.com/quote/03TWezQa1M85p</daylife_url> <article> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <headline type="str">'Awakening' pacts prove complicated</headline> <timestamp type="str">2008-01-19 13:29:12</timestamp> <url type="str">http://www.msnbc.msn.com/id/22739412/</url> <daylife_url type="str">http://www.daylife.com/article/0baOdqcflg2hB</daylife_url> <article_id type="str">0baOdqcflg2hB</article_id> </article> </quote> ........ ........ </payload> </response>
This method is used to retrieve topics from within the given article.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature* | string | Y | <calculated_signature> | N/A | |
| article_id | The article id or a list of name-value pairs of article_ids | string | Y | 03cV5zI2fk03s | N/A |
| url | The article url or a list of name-value pairs of article urls | string | Y if article_id not provided | N/A | |
| limit | The number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | Flag to indicate the sorting order To be implemented in future. | string | N | date, relevance | date |
| include_topic_type | one or more name value pairs indicating which sorts of topics you wish to include | string | N | PERSON, ORGANIZATION, PLACE, EVENT, HOLIDAY, ISSUE, SPORT, STATION, PRODUCT, DRUG, DISEASE | All types of topics |
| include_image | Flag that indicates if a thumbnail image for each topic should be returned if available. | integer | N | 0 or 1 | 0 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <topic> <topic_id type="str">0dVm3LAbhJbES</topic_id> <type type="str">PLACE</type> <name type="str">United States</name> <daylife_url type="str">http://www.daylife.com/topic/United_States</daylife_url> <image> <url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</url> <daylife_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/340x.jpg</daylife_url> <thumb_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</thumb_url> <timestamp_epoch type="int4">1177281949</timestamp_epoch> <timestamp type="str">2007-04-22 22:45:49</timestamp> <credit type="str">AFP/Getty Images</credit> <image_topic_relevance type="int4">10</image_topic_relevance> <width type="int4">2860</width> <height type="int4">2268</height> <image_id type="str">0gwb63H2Wmapg</image_id> <caption type="str"> Vania King of the US (L) speaks with US team captain Zena Garrison (R) during a break in her match against Kirsten Flipken of Belgium in the quarter-finals round in the Fed Cup World Group 2007 between Belgium and the US in Delray Beach, Florida 22 April 2007. King won the match 4-6, 6-4, 7-5 to give the US a total score of 3-0 and move to the next round </caption> <source> <name type="str">Getty Images</name> <url type="str">http://gettyimages.com/</url> <daylife_url type="str">http://www.daylife.com/source/Getty_Images</daylife_url> <rank type="int4">1</rank> <source_id type="str">0a9L9fsaU55wK</source_id> <type type="int4">6</type> </source> </image> </topic> ........ ........ </payload> </response>
This method is used to retrieve information about one or more article IDs.
Sample Invocation
http://freeapi.daylife.com/xmlrest/publicapi/4.8/article_getInfo?
accesskey=<accesskey>&signature=<signature>&article_id=07vgers9mJayf
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature* | string | Y | <calculated_signature> | N/A | |
| article_id | The article id or a list of name-value pairs of article_ids | string | Y if url not provided | 03cV5zI2fk03s | N/A |
| url | The article url or a list of name-value pairs of article urls | string | Y if article_id not provided | N/A | |
| include_image | Flag to indicate if one related scraped image should be returned if available. | integer | N | 0 or 1 | 0 |
| include_scores | Flag to indicate if enhanced score data should be included for every article if available. | integer | N | 0 or 1 | 0 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <article> <timestamp_epoch type="int4">1200682287</timestamp_epoch> <source> <name type="str">Associated Press</name> <url type="str">http://hosted.ap.org/</url> <daylife_url type="str">http://www.daylife.com/source/Associated_Press</daylife_url> <rank type="int4">1</rank> <source_id type="str">0f279rG8jo3Is</source_id> <type type="int4">1</type> <favicon_url type="str">http://favicon.daylife.com/imageserve/0g0BarQeCPe2i/favicon.png</favicon_url> </source> <headline type="str">Sunni Sheik Offers Guns and Gets Rewards</headline> <timestamp type="str">2008-01-18 18:51:27</timestamp> <related_article_count type="int4">13</related_article_count> <excerpt type="str">They know him as the sheik. But what that really means in this Sunni town is a bit of everything: community leader, public works supervisor, agricultural planner, militia captain. </excerpt> <url type="str">http://hosted.ap.org/dynamic/stories/I/IRAQ_SHEIKS_BARGAIN?SITE=TNKNN</url> <query_term type="str">07vgers9mJayf</query_term> <daylife_url type="str">http://www.daylife.com/article/03j9fqr8kkb6B</daylife_url> <article_id type="str">03j9fqr8kkb6B</article_id> <scores> <newsdomain type="str">World</newsdomain> <op-ed type="int4">5</op-ed> <spinometer type="int4">-5</spinometer> </scores> </article> ........ ........ </payload> </response>
You can now group multiple DayPI requests into one request using the Batch API. Batch APIs help improve the performance of your application as your application makes only HTTP request to the DayPIs.
You can also download a PHP script to call the Batch API.
Read more about how to call the Batch API using PHP.
The Batch API accepts multiple DayPI requests, executes each of them in parallel and returns a combined response for all DayPI requests. You can make up to 12 individual DayPI requests in one batch request.
http: //freeapi.daylife.com/xmlrest/publicapi/4.8/search_getRelatedArticles? query=george%20bush&accesskey=youraccesskey&signature=thesignature
/publicapi/4.8/search_getRelatedArticles? query=george%20bush&accesskey=youraccesskey&signature=thesignature
http: //freeapi.daylife.com/xmlrest/batch/1.0/parallel?accesskey=youraccesskey& request=urlencode(/publicapi/4.8/search_getRelatedArticles?query=george%20bush& accesskey=youraccesskey&signature=thesignature&request_id=1001) &request=urlencode(/publicapi/4.8/search_getRelatedTopics?query=george%20bush& accesskey=youraccesskey&signature=thesignature&request_id=1002)
Notice the request_id param in the values of the request parameter above. Every single DayPI request provided as input to the batch.parallel method needs to have a unique alphanumeric request_id. When the batch API combines the response of each individual DayPI request, it adds the request_id from the indvidual request to its corresponding response. Your Batch API client can then match up every single request sent to batch.parallel to the individual responses in the combined response using the request_id.
Download Sample Batch Response Here.
Yes, any parameter to the batch.parallel API call that starts with "batch_" is appended to each individual request without the prefix "batch_". For e.,g,, your provide batch_accesskey=XYZ as an input to the batch.parallel call, then accesskey=XYZ gets added as a parameter to each individual request.
Yes. The Batch API attempts to make individual requests in parallel, waits a maximum upto 25 seconds for each request to come back and then returns the combined responses of the requests that got completed.
No. The Batch API has no authentication of its own. Each individual DayPI request provided as an input must contain a valid accesskey and signature. However, you can use the feature mentioned in topic 6 above to provide batch_accesskey and batch_signature as an input to the batch.parallel call rather than providing accesskey and signature in each individual request.
3001: Success. All individual requests were completed without a timeout. However, this does not guarantee that each individual request was successful.
-3001: One or more individual requests did not complete within the 25 second timeframe.
-3002: Duplicate request_ids provided in the individual requests
-3003: One or more of the individual DayPI request were not formatted properly. See above how to make a valid request for the Batch API.
-3004: More than 12 requests provided as input to the batch API.
The timeout parameter lets you specify the maximum number of seconds that you want to allow your individual requests in the batch to complete in. If some of the requests are not completed, still the Batch API returns with partial results.
| Attachment | Size |
|---|---|
| response-parallel.zip | 8.65 KB |
In the DayPI, quotes are things people have said (not stock quotes!). When the Daylife system can determine who said the quote, the quote is assigned an attribution. The quote API method calls return articles, quotes, images and topics for a given quote.
This function returns basic information for a quote.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| quote_id | The quote id | string | Y | 0ak0fu91Rr3km | N/A |
Sample Output
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <quote> <quote_id type="str">03TWezQa1M85p</quote_id> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <timestamp type="str">2008-01-19 13:29:12</timestamp> <quote_text type="str">But we will still be friends with the Americans and invite them to tea every time they drive through the town </quote_text> <source> <name type="str">MSNBC</name> <url type="str">http://www.msnbc.msn.com/</url> <daylife_url type="str">http://www.daylife.com/source/MSNBC</daylife_url> <rank type="int4">1</rank> <source_id type="str">07yTb3kbhD6Bo</source_id> <type type="int4">1</type> </source> <query_term type="str">07vgers9mJayf</query_term> <daylife_url type="str">http://www.daylife.com/quote/03TWezQa1M85p</daylife_url> <article> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <headline type="str">'Awakening' pacts prove complicated</headline> <timestamp type="str">2008-01-19 13:29:12</timestamp> <url type="str">http://www.msnbc.msn.com/id/22739412/</url> <daylife_url type="str">http://www.daylife.com/article/0baOdqcflg2hB</daylife_url> <article_id type="str">0baOdqcflg2hB</article_id> </article> </quote> ........ ........ </payload> </response>
This method is used to retrieve articles that are related to the article that contains the given quote.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | String | Y | <your_access_key> | N/A | |
| signature | String | Y | <calculated_signature> | N/A | |
| quote_id | The quote id | String | Y | 03cV5zI2fk03s | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | The number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | Flag to indicate the sorting order | string | N | date, relevance | date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| include_image | Flag to indicate if one related scraped image be returned if available. | integer | N | 0 or 1 | 0 |
| include_scores | Flag to indicate if enhanced score data be included for every article if available. | integer | N | 0 or 1 | 0 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <article> <timestamp_epoch type="int4">1200682287</timestamp_epoch> <source> <name type="str">Associated Press</name> <url type="str">http://hosted.ap.org/</url> <daylife_url type="str">http://www.daylife.com/source/Associated_Press</daylife_url> <rank type="int4">1</rank> <source_id type="str">0f279rG8jo3Is</source_id> <type type="int4">1</type> <favicon_url type="str">http://favicon.daylife.com/imageserve/0g0BarQeCPe2i/favicon.png</favicon_url> </source> <headline type="str">Sunni Sheik Offers Guns and Gets Rewards</headline> <timestamp type="str">2008-01-18 18:51:27</timestamp> <related_article_count type="int4">13</related_article_count> <excerpt type="str">They know him as the sheik. But what that really means in this Sunni town is a bit of everything: community leader, public works supervisor, agricultural planner, militia captain. </excerpt> <url type="str">http://hosted.ap.org/dynamic/stories/I/IRAQ_SHEIKS_BARGAIN?SITE=TNKNN</url> <query_term type="str">07vgers9mJayf</query_term> <daylife_url type="str">http://www.daylife.com/article/03j9fqr8kkb6B</daylife_url> <article_id type="str">03j9fqr8kkb6B</article_id> </article> ........ ........ </payload> </response>
This method is used to retrieve quotes from articles that are related to the article containing the given quote.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| quote_id | The quote id | string | Y | 03cV5zI2fk03s | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | the number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | flag to indicate the sorting order | string | N | date, relevance | date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| require_speaker | flag specifying the quotes returned must be attributed | integer | N | 0 or 1 | 0 |
| speaker_topic_id | topic_ids of topics that the quotes returned must be attributed to | string | N | List of topic_ids for topics specified as spkear_topic_id=topicIDA&speaker_topic_id=topicIDB and so on | None |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <quote> <quote_id type="str">03TWezQa1M85p</quote_id> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <timestamp type="str">2008-01-19 13:29:12</timestamp> <quote_text type="str">But we will still be friends with the Americans and invite them to tea every time they drive through the town </quote_text> <source> <name type="str">MSNBC</name> <url type="str">http://www.msnbc.msn.com/</url> <daylife_url type="str">http://www.daylife.com/source/MSNBC</daylife_url> <rank type="int4">1</rank> <source_id type="str">07yTb3kbhD6Bo</source_id> <type type="int4">1</type> </source> <query_term type="str">07vgers9mJayf</query_term> <daylife_url type="str">http://www.daylife.com/quote/03TWezQa1M85p</daylife_url> <article> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <headline type="str">'Awakening' pacts prove complicated</headline> <timestamp type="str">2008-01-19 13:29:12</timestamp> <url type="str">http://www.msnbc.msn.com/id/22739412/</url> <daylife_url type="str">http://www.daylife.com/article/0baOdqcflg2hB</daylife_url> <article_id type="str">0baOdqcflg2hB</article_id> </article> </quote> ........ ........ </payload> </response>
This method is used to retrieve topics from articles that are related to the article containing the given quote.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| quote_id | The quote id | string | Y | 03cV5zI2fk03s | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | The number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | Flag to indicate the sorting order To be implemented in future. | string | N | date, relevance | date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| include_topic_type | one or more name value pairs indicating which sorts of topics you wish to include | string | N | PERSON, ORGANIZATION, PLACE, EVENT, HOLIDAY, ISSUE, SPORT, STATION, PRODUCT, DRUG, DISEASE | All types of topics |
| include_image | Flag that indicates if a thumbnail image for each topic should be returned if available. | integer | N | 0 or 1 | 0 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <topic> <topic_id type="str">0dVm3LAbhJbES</topic_id> <type type="str">PLACE</type> <name type="str">United States</name> <daylife_url type="str">http://www.daylife.com/topic/United_States</daylife_url> <image> <url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</url> <daylife_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/340x.jpg</daylife_url> <thumb_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</thumb_url> <timestamp_epoch type="int4">1177281949</timestamp_epoch> <timestamp type="str">2007-04-22 22:45:49</timestamp> <credit type="str">AFP/Getty Images</credit> <image_topic_relevance type="int4">10</image_topic_relevance> <width type="int4">2860</width> <height type="int4">2268</height> <image_id type="str">0gwb63H2Wmapg</image_id> <caption type="str"> Vania King of the US (L) speaks with US team captain Zena Garrison (R) during a break in her match against Kirsten Flipken of Belgium in the quarter-finals round in the Fed Cup World Group 2007 between Belgium and the US in Delray Beach, Florida 22 April 2007. King won the match 4-6, 6-4, 7-5 to give the US a total score of 3-0 and move to the next round </caption> <source> <name type="str">Getty Images</name> <url type="str">http://gettyimages.com/</url> <daylife_url type="str">http://www.daylife.com/source/Getty_Images</daylife_url> <rank type="int4">1</rank> <source_id type="str">0a9L9fsaU55wK</source_id> <type type="int4">6</type> </source> </image> </topic> ........ ........ </payload> </response>
The Search API methods return search results containing related articles, quotes, images and topics for a given query term.
Returns articles that contain the given query term. (See section/appendix on search query syntax.)
Sample Invocation
http://freeapi.daylife.com
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| query | the search term | string | Y | "Iraq war". A query can be compsed of a maximum of 32 terms combined using logical operators. |
N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | The number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | string | N | daterank, date, relevance. ** daterank is an option to sort by combination of date and relevance |
daterank | |
| source_filter_id | string | N | 06T8a8lavf8sc | None | |
| source_whitelist | one or more name value pairs of Daylife source ids |
string | N | source_whitelist=0a0F0VifAodow&source_whitelist=04Ew78S3C96yc | None |
| include_scores | Flag to indicate if enhanced score data be included for every article if available. | integer | N | 0 or 1 | 0 |
| sliding_excerpt | Flag to suppress sliding excerpts. |
integer | N | 0 or 1 | 1 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <article> <timestamp_epoch type="int4">1200682287</timestamp_epoch> <source> <name type="str">Associated Press</name> <url type="str">http://hosted.ap.org/</url> <daylife_url type="str">http://www.daylife.com/source/Associated_Press</daylife_url> <rank type="int4">1</rank> <source_id type="str">0f279rG8jo3Is</source_id> <type type="int4">1</type> <favicon_url type="str">http://favicon.daylife.com/imageserve/0g0BarQeCPe2i/favicon.png</favicon_url> </source> <headline type="str">Sunni Sheik Offers Guns and Gets Rewards</headline> <timestamp type="str">2008-01-18 18:51:27</timestamp> <related_article_count type="int4">13</related_article_count> <excerpt type="str">They know him as the sheik. But what that really means in this Sunni town is a bit of everything: community leader, public works supervisor, agricultural planner, militia captain. </excerpt> <url type="str">http://hosted.ap.org/dynamic/stories/I/IRAQ_SHEIKS_BARGAIN?SITE=TNKNN</url> <daylife_url type="str">http://www.daylife.com/article/03j9fqr8kkb6B</daylife_url> <article_id type="str">03j9fqr8kkb6B</article_id> <scores> <newsdomain type="str">World</newsdomain> <op-ed type="int4">5</op-ed> <spinometer type="int4">-5</spinometer> </scores> </article> ........ ........ </payload> </response>
This method is used to retrieve references to Daylife topics whose names match with the given query term. For example, to find the Condoleezza Rice topic, you could use query=Condoleezza.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| query | the search term | string | Y | "Iraq war". A query can be compsed of a maximum of 32 terms combined using logical operators. | N/A |
| limit | the number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| include_topic_type | one or more name value pairs indicating which sorts of topics you wish to include | string | N | PERSON, ORGANIZATION, PLACE, EVENT, HOLIDAY, ISSUE, SPORT, STATION, PRODUCT, DRUG, DISEASE | All topic types |
| include_image | Flag that indicates if a thumbnail image for each topic should be returned if available. | integer | N | 0 or 1 |
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <topic> <topic_id type="str">0dVm3LAbhJbES</topic_id> <type type="str">PLACE</type> <name type="str">United States</name> <daylife_url type="str">http://www.daylife.com/topic/United_States</daylife_url> <image> <url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</url> <daylife_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/340x.jpg</daylife_url> <thumb_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</thumb_url> <timestamp_epoch type="int4">1177281949</timestamp_epoch> <timestamp type="str">2007-04-22 22:45:49</timestamp> <credit type="str">AFP/Getty Images</credit> <image_topic_relevance type="int4">10</image_topic_relevance> <width type="int4">2860</width> <height type="int4">2268</height> <image_id type="str">0gwb63H2Wmapg</image_id> <caption type="str"> Vania King of the US (L) speaks with US team captain Zena Garrison (R) during a break in her match against Kirsten Flipken of Belgium in the quarter-finals round in the Fed Cup World Group 2007 between Belgium and the US in Delray Beach, Florida 22 April 2007. King won the match 4-6, 6-4, 7-5 to give the US a total score of 3-0 and move to the next round </caption> <source> <name type="str">Getty Images</name> <url type="str">http://gettyimages.com/</url> <daylife_url type="str">http://www.daylife.com/source/Getty_Images</daylife_url> <rank type="int4">1</rank> <source_id type="str">0a9L9fsaU55wK</source_id> <type type="int4">6</type> </source> </image> </topic> ........ ........ </payload> </response>
This method is used to retrieve references to Daylife sources whose names match with the given query term.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| query | the search term | string | Y | "New York". A query can be compsed of a maximum of 32 terms combined using logical operators. | N/A |
| limit | the number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <source> <source_id type="str">0dVm3LAbhJbES</source_id> <rank type="str">3</rank> <name type="str">New York Post</name> <search_score type="float">10.0</search_score> <type type="int4">1</type> <daylife_url type="str">http://www.daylife.com/source/New_York_Post</daylife_url> </source> <source> ........ ........ </source> </payload> </response>
This method is used to retrieve references to Daylife topics that have appeared in articles containing the given query term. To find specifically named topics, use the search_getMatchingTopics method call.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| query | the search term | string | Y | "Iraq war". A query can be compsed of a maximum of 32 terms combined using logical operators. | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | the number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | flag to indicate the sorting order | string | N | daterank, date, relevance. ** daterank is an option to sort by combination of date and relevance |
daterank |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| source_whitelist | one or more name value pairs of Daylife source ids | string | N | source_whitelist=0a0F0VifAodow&source_whitelist=04Ew78S3C96yc | None |
| include_topic_type | one or more name value pairs indicating which sorts of topics you wish to include | string | N | PERSON, ORGANIZATION, PLACE, EVENT, HOLIDAY, ISSUE, SPORT, STATION, PRODUCT, DRUG, DISEASE |
All topic types |
| include_image | Flag that indicates if a thumbnail image for each topic should be returned if available. | integer | N | 0 or 1 | 0 |
Sample Output
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <topic> <topic_id type="str">0dVm3LAbhJbES</topic_id> <type type="str">PLACE</type> <name type="str">United States</name> <daylife_url type="str">http://www.daylife.com/topic/United_States</daylife_url> <image> <url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</url> <daylife_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/340x.jpg</daylife_url> <thumb_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</thumb_url> <timestamp_epoch type="int4">1177281949</timestamp_epoch> <timestamp type="str">2007-04-22 22:45:49</timestamp> <credit type="str">AFP/Getty Images</credit> <image_topic_relevance type="int4">10</image_topic_relevance> <width type="int4">2860</width> <height type="int4">2268</height> <image_id type="str">0gwb63H2Wmapg</image_id> <caption type="str"> Vania King of the US (L) speaks with US team captain Zena Garrison (R) during a break in her match against Kirsten Flipken of Belgium in the quarter-finals round in the Fed Cup World Group 2007 between Belgium and the US in Delray Beach, Florida 22 April 2007. King won the match 4-6, 6-4, 7-5 to give the US a total score of 3-0 and move to the next round </caption> <source> <name type="str">Getty Images</name> <url type="str">http://gettyimages.com/</url> <daylife_url type="str">http://www.daylife.com/source/Getty_Images</daylife_url> <rank type="int4">1</rank> <source_id type="str">0a9L9fsaU55wK</source_id> <type type="int4">6</type> </source> </image> </topic> ........ ........ </payload> </response>
This method is used to retrieve quotes from articles that contain the given query term .
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| query | the search term | string | Y | "Iraq war". A query can be compsed of a maximum of 32 terms combined using logical operators. | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | the number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | flag to indicate the sorting order | string | N | daterank, date, relevance. ** daterank is an option to sort by combination of date and relevance |
daterank |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| source_whitelist | one or more name value pairs of Daylife source ids | string | N | source_whitelist=0a0F0VifAodow&source_whitelist=04Ew78S3C96yc | None |
| require_speaker | flag specifying the quotes returned must be attributed (i.e., the speaker is known) | integer | N | 0 or 1 | 0 |
| speaker_topic_id | topic_ids of topics that the quotes returned must be attributed to | string | N | name-value pairs of topic_ids | None |
Sample Output
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <quote> <quote_id type="str">03TWezQa1M85p</quote_id> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <timestamp type="str">2008-01-19 13:29:12</timestamp> <quote_text type="str">But we will still be friends with the Americans and invite them to tea every time they drive through the town </quote_text> <source> <name type="str">MSNBC</name> <url type="str">http://www.msnbc.msn.com/</url> <daylife_url type="str">http://www.daylife.com/source/MSNBC</daylife_url> <rank type="int4">1</rank> <source_id type="str">07yTb3kbhD6Bo</source_id> <type type="int4">1</type> </source> <daylife_url type="str">http://www.daylife.com/quote/03TWezQa1M85p</daylife_url> <article> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <headline type="str">'Awakening' pacts prove complicated</headline> <timestamp type="str">2008-01-19 13:29:12</timestamp> <url type="str">http://www.msnbc.msn.com/id/22739412/</url> <daylife_url type="str">http://www.daylife.com/article/0baOdqcflg2hB</daylife_url> <article_id type="str">0baOdqcflg2hB</article_id> </article> </quote> ........ ........ </payload> </response>
This method is used to retrieve quotes that mention a given query term .
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| query | the search term | string | Y | "Iraq war". A query can be compsed of a maximum of 32 terms combined using logical operators. | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | the number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | flag to indicate the sorting order | string | N | daterank, date, relevance. ** daterank is an option to sort by combination of date and relevance |
daterank |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| source_whitelist | one or more name value pairs of Daylife source ids | string | N | source_whitelist=0a0F0VifAodow&source_whitelist=04Ew78S3C96yc | None |
| require_speaker | flag specifying the quotes returned must be attributed (i.e., the speaker is known) | integer | N | 0 or 1 | 0 |
| speaker_topic_id | topic_ids of topics that the quotes returned must be attributed to | string | N | name-value pairs of topic_ids | None |
Sample Output
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <quote> <quote_id type="str">03TWezQa1M85p</quote_id> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <timestamp type="str">2008-01-19 13:29:12</timestamp> <quote_text type="str">But we will still be friends with Condoleezza
and invite them to tea every time they drive through the town </quote_text> <source> <name type="str">MSNBC</name> <url type="str">http://www.msnbc.msn.com/</url> <daylife_url type="str">http://www.daylife.com/source/MSNBC</daylife_url> <rank type="int4">1</rank> <source_id type="str">07yTb3kbhD6Bo</source_id> <type type="int4">1</type> </source> <daylife_url type="str">http://www.daylife.com/quote/03TWezQa1M85p</daylife_url> <article> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <headline type="str">'Awakening' pacts prove complicated</headline> <timestamp type="str">2008-01-19 13:29:12</timestamp> <url type="str">http://www.msnbc.msn.com/id/22739412/</url> <daylife_url type="str">http://www.daylife.com/article/0baOdqcflg2hB</daylife_url> <article_id type="str">0baOdqcflg2hB</article_id> </article> </quote> ........ ........ </payload> </response>
This method is used to retrieve quotes that are said by the topic matching given query term .
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| query | the search term | string | Y | "Iraq war". A query can be compsed of a maximum of 32 terms combined using logical operators. | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | the number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | flag to indicate the sorting order | string | N | daterank, date, relevance. ** daterank is an option to sort by combination of date and relevance |
daterank |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| source_whitelist | one or more name value pairs of Daylife source ids | string | N | source_whitelist=0a0F0VifAodow&source_whitelist=04Ew78S3C96yc | None |
Sample Output
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <quote> <quote_id type="str">03TWezQa1M85p</quote_id> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <timestamp type="str">2008-01-19 13:29:12</timestamp> <quote_text type="str">But we will still be friends with Condoleezza
and invite them to tea every time they drive through the town </quote_text> <source> <name type="str">MSNBC</name> <url type="str">http://www.msnbc.msn.com/</url> <daylife_url type="str">http://www.daylife.com/source/MSNBC</daylife_url> <rank type="int4">1</rank> <source_id type="str">07yTb3kbhD6Bo</source_id> <type type="int4">1</type> </source> <daylife_url type="str">http://www.daylife.com/quote/03TWezQa1M85p</daylife_url> <article> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <headline type="str">'Awakening' pacts prove complicated</headline> <timestamp type="str">2008-01-19 13:29:12</timestamp> <url type="str">http://www.msnbc.msn.com/id/22739412/</url> <daylife_url type="str">http://www.daylife.com/article/0baOdqcflg2hB</daylife_url> <article_id type="str">0baOdqcflg2hB</article_id> </article> </quote> ........ ........ </payload> </response>
This method is used to retrieve images related to articles that contain the given query term
You need a license to photos from Getty Images, Associated Press AND/OR Reuters Pictures in order to get back images through this API. Please email developer@daylife.com for more information on image licensing.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
| Name | Description | Type | Required | Sample Values | Default Value | |
| accesskey | string | Y | <your_access_key> | N/A | ||
| signature | string | Y | <calculated_signature> | N/A | ||
| query | the search term | string | Y | "Iraq war". A query can be compsed of a maximum of 32 terms combined using logical operators. | N/A | |
| end_time | Timestamp | N | 2007-09-24 00:00:00 | <current time> | ||
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | ||
| limit | the number of results to be returned | integer | N | 40 | 10 | |
| offset | integer | N | 5 | 0 | ||
| sort | flag to indicate the sorting order | string | N | daterank, date, relevance. ** daterank is an option to sort by combination of date and relevance |
daterank | |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None | |
Sample Output
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <image> <url type="str">http://cache.daylife.com/imageserve/0dDR845cPSa7m/610x.jpg</url> <daylife_url type="str">http://cache.daylife.com/imageserve/0dDR845cPSa7m/340x.jpg</daylife_url> <thumb_url type="str">http://cache.daylife.com/imageserve/0dDR845cPSa7m/45x45.jpg</thumb_url> <timestamp_epoch type="int4">1200582120</timestamp_epoch> <timestamp type="str">2008-01-17 15:02:00</timestamp> <image_id type="str">0dDR845cPSa7m</image_id> <image_topic_relevance type="int4">10</image_topic_relevance> <width type="int4">3000</width> <height type="int4">1915</height> <caption type="str"> US President George W. Bush (C) meets with the Special Envoy for Sudan, Richard Williamson (L) and Secretary of State Condoleezza Rice (R), in the Oval Office at the White House in Washington, DC, 17 January 2008. </caption> <credit type="str">AFP/Getty Images</credit> <source> <name type="str">Getty Images</name> <url type="str">http://gettyimages.com/</url> <daylife_url type="str">http://www.daylife.com/source/Getty_Images</daylife_url> <rank type="int4">1</rank> <source_id type="str">0a9L9fsaU55wK</source_id> <type type="int4">6</type> </source> </image> .... .... </payload> </response>
This method is used to retrieve number of mentions in news for the given query
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| query | the search term | string | Y | "Iraq war". A query can be compsed of a maximum of 32 terms combined using logical operators. | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| source_filter_id | string | N | None | None | |
| source_whitelist | one or more name value pairs of Daylife source ids | string | N | source_whitelist=0a0F0VifAodow&source_whitelist=04Ew78S3C96yc |
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <count type="int4">1232</count> </payload> </response>
The DayPI Source calls return articles, quotes and connections from content published by one or more sources. These APIs are only available for DayPI version 4.4 and above.
You can download a list of source names and source IDs here.
This method is used to retrieve articles published by one or more sources. You can provide a list of source ids or source names as an multiple name value pairs in the input. Here is how you calculate the signature for multiple input values.
Sample Invocation
http://freeapi.daylife.com/xmlrest/publicapi/4.8/source_getArticles?
accesskey=<accesskey>&signature=<signature>
&name=The%20New%20York%20Times&name=The%20Washington%20Post&limit=2
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature* | string | Y | <calculated_signature> | N/A | |
| source_id | The source id or a list of name-value pairs of source ids | string | Y if name not provided | 03cV5zI2fk03s | N/A |
| name | The source name or a list of name-value pairs of source names |
string | Y if source_id not provided | N/A | |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | The number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| include_image | Flag to indicate if one related scraped image should be returned if available. | integer | N | 0 or 1 | 0 |
| include_scores | Flag to indicate if enhanced score data should be included for every article if available. | integer | N | 0 or 1 | 0 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <article> <timestamp_epoch type="int4">1200682287</timestamp_epoch> <source> <name type="str">Associated Press</name> <url type="str">http://hosted.ap.org/</url> <daylife_url type="str">http://www.daylife.com/source/Associated_Press</daylife_url> <rank type="int4">1</rank> <source_id type="str">0f279rG8jo3Is</source_id> <type type="int4">1</type> <favicon_url type="str">http://favicon.daylife.com/imageserve/0g0BarQeCPe2i/favicon.png</favicon_url> </source> <headline type="str">Sunni Sheik Offers Guns and Gets Rewards</headline> <timestamp type="str">2008-01-18 18:51:27</timestamp> <related_article_count type="int4">13</related_article_count> <excerpt type="str">They know him as the sheik. But what that really means in this Sunni town is a bit of everything: community leader, public works supervisor, agricultural planner, militia captain. </excerpt> <url type="str">http://hosted.ap.org/dynamic/stories/I/IRAQ_SHEIKS_BARGAIN?SITE=TNKNN</url> <query_term type="str">07vgers9mJayf</query_term> <daylife_url type="str">http://www.daylife.com/article/03j9fqr8kkb6B</daylife_url> <article_id type="str">03j9fqr8kkb6B</article_id> <scores> <newsdomain type="str">World</newsdomain> <op-ed type="int4">5</op-ed> <spinometer type="int4">-5</spinometer> </scores> </article> ........ ........ </payload> </response>
This method is used to retrieve topics mentioned in the aritlces published by one or more sources. You can provide a list of source ids or source names as an multiple name value pairs in the input. Here is how you calculate the signature for multiple input values.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature* | string | Y | <calculated_signature> | N/A | |
| source_id | The source id or a list of name-value pairs of source ids | string | Y if name not provided | 03cV5zI2fk03s | N/A |
| name | The source name or a list of name-value pairs of source names | string | Y if source_id not provided | N/A | |
| limit | The number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | Flag to indicate the sorting order To be implemented in future. | string | N | date, relevance | date |
| include_topic_type | one or more name value pairs indicating which sorts of topics you wish to include | string | N | PERSON, ORGANIZATION, PLACE, EVENT, HOLIDAY, ISSUE, SPORT, STATION, PRODUCT, DRUG, DISEASE | All types of topics |
| include_image | Flag that indicates if a thumbnail image for each topic should be returned if available. | integer | N | 0 or 1 | 0 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <topic> <topic_id type="str">0dVm3LAbhJbES</topic_id> <type type="str">PLACE</type> <name type="str">United States</name> <daylife_url type="str">http://www.daylife.com/topic/United_States</daylife_url> <image> <url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</url> <daylife_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/340x.jpg</daylife_url> <thumb_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</thumb_url> <timestamp_epoch type="int4">1177281949</timestamp_epoch> <timestamp type="str">2007-04-22 22:45:49</timestamp> <credit type="str">AFP/Getty Images</credit> <image_topic_relevance type="int4">10</image_topic_relevance> <width type="int4">2860</width> <height type="int4">2268</height> <image_id type="str">0gwb63H2Wmapg</image_id> <caption type="str"> Vania King of the US (L) speaks with US team captain Zena Garrison (R) during a break in her match against Kirsten Flipken of Belgium in the quarter-finals round in the Fed Cup World Group 2007 between Belgium and the US in Delray Beach, Florida 22 April 2007. King won the match 4-6, 6-4, 7-5 to give the US a total score of 3-0 and move to the next round </caption> <source> <name type="str">Getty Images</name> <url type="str">http://gettyimages.com/</url> <daylife_url type="str">http://www.daylife.com/source/Getty_Images</daylife_url> <rank type="int4">1</rank> <source_id type="str">0a9L9fsaU55wK</source_id> <type type="int4">6</type> </source> </image> </topic> ........ ........ </payload> </response>
This method is used to retrieve information about one or more sources. You can provide a list of source ids or source names as an multiple name value pairs in the input. Here is how you calculate the signature for multiple input values.
Sample Invocation
http://freeapi.daylife.com/xmlrest/publicapi/4.8/source_getInfo?
accesskey=<accesskey>&signature=<signature>&article_id=07vgers9mJayf
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature* | string | Y | <calculated_signature> | N/A | |
| source_id | The source id or a list of name-value pairs of source ids | string | Y if name not provided | 03cV5zI2fk03s | N/A |
| name | The source name or a list of name-value pairs of source names | string | Y if source_id not provided | N/A |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2002</code> <payload> <source> <name type="str">The New York Times</name> <url type="str">http://www.nytimes.com/</url> <daylife_url type="str">http://www.daylife.com/source/The_New_York_Times</daylife_url> <rank type="int4">1</rank> <source_id type="str">0a0F0VifAodow</source_id> <type type="int4">1</type> </source> </payload> </response>
The topic API method calls return articles, quotes, images and topics for a given topic name or topic id.
Note: Topic data can be queried by either specifying a topic name as the "name" parameter or a topic id as the "topic_id" parameter. One of these must be set.
This method is used to retrieve recent articles that contain the given topic specified by name or topic id.
Sample Invocation
http://freeapi.daylife.com
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| name | The topic name | string | Y else topic_id | George W. Bush | N/A |
| topic_id | The topic id | string | Y else name | 03cV5zI2fk03s | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | The number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | Flag to indicate the sorting order | string | N | date, relevance | date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| source_whitelist | one or more name value pairs of Daylife source ids | string | N | source_whitelist=0a0F0VifAodow&source_whitelist=04Ew78S3C96yc | None |
| include_image | Flag to indicate if one related scraped image be returned if available. | integer | N | 0 or 1 | 0 |
| include_scores | Flag to indicate if enhanced score data be included for every article if available. | integer | N | 0 or 1 | 0 |
| sliding_excerpt | Flag to suppress sliding excerpts. | integer | N | 0 or 1 | 1 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <story> <timestamp_epoch type="int4">1200779025</timestamp_epoch> <headline type="str">Swiss police temporarily arrest 200 protesters</headline> <timestamp type="str">2008-01-19 21:43:45</timestamp> <related_article_count type="int4">6</related_article_count> <url type="str"> http://rssfeeds.usatoday.com/~r/UsatodaycomWorld-TopStories/~3/219570266... </url> <daylife_url type="str">http://www.daylife.com/article/09MLfkP8jnaob</daylife_url> <topic_story_relevance type="int4">6</topic_story_relevance> <article_id type="str">09MLfkP8jnaob</article_id> <excerpt type="str"> ...will gather for the annual meeting starting Jan. 23 in the Alpine resort of Davos, eastern Switzerland. U.S. Secretary of State Condoleezza Rice and British Prime Minister Gordon Brown will be headliners for the five-day meeting, where a wide range of topics... </excerpt> <source> <name type="str">USA Today</name> <url type="str">http://www.usatoday.com/</url> <daylife_url type="str">http://www.daylife.com/source/USA_Today</daylife_url> <rank type="int4">1</rank> <source_id type="str">0083e6H4MndJP</source_id> <type type="int4">1</type> <favicon_url type="str">http://favicon.daylife.com/imageserve/0g0BarQeCPe2i/favicon.png</favicon_url> </source> <scores> <newsdomain type="str">World</newsdomain> <op-ed type="int4">5</op-ed> <spinometer type="int4">-5</spinometer> </scores> </story> .... .... </payload> </response>
This method is used to retrieve images related to the given topic.
You need a license to photos from Getty Images, Associated Press AND/OR Reuters Pictures in order to get back images through this API. Please email developer@daylife.com for more information on image licensing.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| name | The topic name | string | Y else topic_id | George W. Bush | N/A |
| topic_id | The topic id | string | Y else name | 03cV5zI2fk03s | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | The number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | Flag to indicate the sorting order | string | N | date, relevance | date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| min_topic_image_confidence | parameter to threshold the on the relevance of the topic to image relevance |
string | N | low, medium, high |
None |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <image> <url type="str">http://cache.daylife.com/imageserve/0dDR845cPSa7m/610x.jpg</url> <daylife_url type="str">http://cache.daylife.com/imageserve/0dDR845cPSa7m/340x.jpg</daylife_url> <thumb_url type="str">http://cache.daylife.com/imageserve/0dDR845cPSa7m/45x45.jpg</thumb_url> <timestamp_epoch type="int4">1200582120</timestamp_epoch> <timestamp type="str">2008-01-17 15:02:00</timestamp> <image_id type="str">0dDR845cPSa7m</image_id> <image_topic_relevance type="int4">10</image_topic_relevance> <width type="int4">3000</width> <height type="int4">1915</height> <caption type="str"> US President George W. Bush (C) meets with the Special Envoy for Sudan, Richard Williamson (L) and Secretary of State Condoleezza Rice (R), in the Oval Office at the White House in Washington, DC, 17 January 2008. </caption> <credit type="str">AFP/Getty Images</credit> <source> <name type="str">Getty Images</name> <url type="str">http://gettyimages.com/</url> <daylife_url type="str">http://www.daylife.com/source/Getty_Images</daylife_url> <rank type="int4">1</rank> <source_id type="str">0a9L9fsaU55wK</source_id> <favicon_url type="str">http://favicon.daylife.com/imageserve/06T8a8lavf8sc/favicon.png</favicon_url> <type type="int4">6</type> </source> </image> .... .... </payload> </response>
This method retrieves topics that appear in the same articles as the given topic specified by name or topic id.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| name | The topic name | string | Y else topic_id | George W. Bush | N/A |
| topic_id | The topic id | string | Y else name | 03cV5zI2fk03s | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | The number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | Flag to indicate the sorting order | string | N | date, relevance | date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| source_whitelist | one or more name value pairs of Daylife source ids | string | N | source_whitelist=0a0F0VifAodow&source_whitelist=04Ew78S3C96yc | None |
| include_topic_type | One or more name value pairs indicating which sorts of topics you wish to include | string | N | PERSON, ORGANIZATION, PLACE, EVENT, HOLIDAY, ISSUE, SPORT, STATION, PRODUCT, DRUG, DISEASE | All types of topics |
| include_image | Flag that indicates if a thumbnail image for each topic should be returned if available. | integer | N | 0 or 1 | 0 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <topic> <topic_id type="str">0dVm3LAbhJbES</topic_id> <type type="str">PLACE</type> <name type="str">United States</name> <daylife_url type="str">http://www.daylife.com/topic/United_States</daylife_url> <image> <url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</url> <daylife_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/340x.jpg</daylife_url> <thumb_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</thumb_url> <timestamp_epoch type="int4">1177281949</timestamp_epoch> <timestamp type="str">2007-04-22 22:45:49</timestamp> <credit type="str">AFP/Getty Images</credit> <image_topic_relevance type="int4">10</image_topic_relevance> <width type="int4">2860</width> <height type="int4">2268</height> <image_id type="str">0gwb63H2Wmapg</image_id> <caption type="str"> Vania King of the US (L) speaks with US team captain Zena Garrison (R) during a break in her match against Kirsten Flipken of Belgium in the quarter-finals round in the Fed Cup World Group 2007 between Belgium and the US in Delray Beach, Florida 22 April 2007. King won the match 4-6, 6-4, 7-5 to give the US a total score of 3-0 and move to the next round </caption> <source> <name type="str">Getty Images</name> <url type="str">http://gettyimages.com/</url> <daylife_url type="str">http://www.daylife.com/source/Getty_Images</daylife_url> <rank type="int4">1</rank> <source_id type="str">0a9L9fsaU55wK</source_id> <type type="int4">6</type> </source> </image> </topic> ........ ........ </payload> </response>
This method is used to retrieve quotes from articles that contain the given topic specified by name or topic id.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| name | The topic name | string | Y else topic_id | George W. Bush | N/A |
| topic_id | The topic id | string | Y else name | 03cV5zI2fk03s | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | the number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | flag to indicate the sorting order | string | N | date, relevance | date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| source_whitelist | one or more name value pairs of Daylife source ids | string | N | source_whitelist=0a0F0VifAodow&source_whitelist=04Ew78S3C96yc | None |
| require_speaker | flag specifying the quotes returned must be attributed | integer | N | 0 or 1 | 0 |
| speaker_topic_id | topic_ids of topics that the quotes returned must be attributed to | string | N | list of topic_ids for topics specified as speaker_topic_id=topicIDA&speaker_topic_id=topicIDB and so on | None |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <quote> <quote_id type="str">03TWezQa1M85p</quote_id> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <timestamp type="str">2008-01-19 13:29:12</timestamp> <quote_text type="str">But we will still be friends with the Americans and invite them to tea every time they drive through the town </quote_text> <topic> <daylife_url type="str">http://www.daylife.com/topic/Condoleezza_Rice</daylife_url> <type type="str">PERSON</type> <name type="str">Condoleezza Rice</name> <topic_id type="str">01PQ0QsaGm49k</topic_id> </topic> <source> <name type="str">MSNBC</name> <url type="str">http://www.msnbc.msn.com/</url> <daylife_url type="str">http://www.daylife.com/source/MSNBC</daylife_url> <rank type="int4">1</rank> <source_id type="str">07yTb3kbhD6Bo</source_id> <type type="int4">1</type> </source> <daylife_url type="str">http://www.daylife.com/quote/03TWezQa1M85p</daylife_url> <article> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <headline type="str">'Awakening' pacts prove complicated</headline> <timestamp type="str">2008-01-19 13:29:12</timestamp> <url type="str">http://www.msnbc.msn.com/id/22739412/</url> <daylife_url type="str">http://www.daylife.com/article/0baOdqcflg2hB</daylife_url> <article_id type="str">0baOdqcflg2hB</article_id> </article> </quote> ........ ........ </payload> </response>
This method is used to retrieve quotes said by the topic specified using the name or the topic id.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| name | The topic name | string | Y else topic_id | George W. Bush | N/A |
| topic_id | The topic id | string | Y else name | 03cV5zI2fk03s | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | the number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | flag to indicate the sorting order | string | N | date, relevance | date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| source_whitelist | one or more name value pairs of Daylife source ids | string | N | source_whitelist=0a0F0VifAodow&source_whitelist=04Ew78S3C96yc | None |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <quote> <quote_id type="str">03TWezQa1M85p</quote_id> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <timestamp type="str">2008-01-19 13:29:12</timestamp> <quote_text type="str">But we will still be friends with the Americans and invite them to tea every time they drive through the town </quote_text> <topic> <daylife_url type="str">http://www.daylife.com/topic/Condoleezza_Rice</daylife_url> <type type="str">PERSON</type> <name type="str">Condoleezza Rice</name> <topic_id type="str">01PQ0QsaGm49k</topic_id> </topic> <source> <name type="str">MSNBC</name> <url type="str">http://www.msnbc.msn.com/</url> <daylife_url type="str">http://www.daylife.com/source/MSNBC</daylife_url> <rank type="int4">1</rank> <source_id type="str">07yTb3kbhD6Bo</source_id> <type type="int4">1</type> </source> <daylife_url type="str">http://www.daylife.com/quote/03TWezQa1M85p</daylife_url> <article> <timestamp_epoch type="int4">1200749352</timestamp_epoch> <headline type="str">'Awakening' pacts prove complicated</headline> <timestamp type="str">2008-01-19 13:29:12</timestamp> <url type="str">http://www.msnbc.msn.com/id/22739412/</url> <daylife_url type="str">http://www.daylife.com/article/0baOdqcflg2hB</daylife_url> <article_id type="str">0baOdqcflg2hB</article_id> </article> </quote> ........ ........ </payload> </response>
This method is used to retrieve recent articles that contain the given topic specified by name or topic id.
Sample Invocation
http://freeapi.daylife.com
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| name | The topic name | string | Y else topic_id | George W. Bush | N/A |
| topic_id | The topic id | string | Y else name | 03cV5zI2fk03s | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> | |
| limit | The number of results to be returned | integer | N | 40 | 10 |
| offset | integer | N | 5 | 0 | |
| sort | Flag to indicate the sorting order | string | N | date, relevance | date |
| source_filter_id | daylife source filter id | string | N | 06T8a8lavf8sc | None |
| source_whitelist | one or more name value pairs of Daylife source ids | string | N | source_whitelist=0a0F0VifAodow&source_whitelist=04Ew78S3C96yc | None |
| include_image | Flag to indicate if one related scraped image be returned if available. | integer | N | 0 or 1 | 0 |
| include_scores | Flag to indicate if enhanced score data be included for every article if available. | integer | N | 0 or 1 | 0 |
| sliding_excerpt | Flag to suppress sliding excerpts. | integer | N | 0 or 1 | 1 |
Sample Output:
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <article> <timestamp_epoch type="int4">1200682287</timestamp_epoch> <source> <name type="str">Associated Press</name> <url type="str">http://hosted.ap.org/</url> <daylife_url type="str">http://www.daylife.com/source/Associated_Press</daylife_url> <rank type="int4">1</rank> <source_id type="str">0f279rG8jo3Is</source_id> <type type="int4">1</type> <favicon_url type="str">http://favicon.daylife.com/imageserve/0g0BarQeCPe2i/favicon.png</favicon_url> </source> <headline type="str">Sunni Sheik Offers Guns and Gets Rewards</headline> <timestamp type="str">2008-01-18 18:51:27</timestamp> <related_article_count type="int4">13</related_article_count> <excerpt type="str">They know him as the sheik. But what that really means in this Sunni town is a bit of everything: community leader, public works supervisor, agricultural planner, militia captain. </excerpt> <url type="str">http://hosted.ap.org/dynamic/stories/I/IRAQ_SHEIKS_BARGAIN?SITE=TNKNN</url> <daylife_url type="str">http://www.daylife.com/article/03j9fqr8kkb6B</daylife_url> <article_id type="str">03j9fqr8kkb6B</article_id> <scores> <newsdomain type="str">World</newsdomain> <op-ed type="int4">5</op-ed> <spinometer type="int4">-5</spinometer> </scores> </article> ........ ........ </payload> </response>
This method is used to retrieve a digest of daily number of mentions for a topic in mainstream news and blog sources.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| topic_id | A topic id for the topic in question | String | Y | 045WeJhgDw2Te | |
| name | The topic name | string | Y | George W. Bush | N/A |
| end_time | Timestamp | N | 2007-03 | <current time> | |
| start_time | Timestamp | N | 2007-05-03 09:00:00, 1178182800 | <end_time minus 1 month> |
Sample Output
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <daily_counts> <blog_count type="float">7</blog_count> <article_count type="float">88</article_count> <timestamp_epoch type="int4">1200700800</timestamp_epoch> <timestamp type="str">2008-01-19 00:00:00</timestamp> <article> <headline type="str">Iraqi troops clash with members of Shiite cult in southern Iraq; nearly 50 dead</headline> <url type="str">http://www.macleans.ca/article.jsp?content=w011863A</url> <daylife_url type="str">http://www.daylife.com/article/06pr4Qd3DI2ov</daylife_url> <article_id type="str">06pr4Qd3DI2ov</article_id> <timestamp_epoch type="int4">1200714114</timestamp_epoch> <timestamp type="str">2008-01-19 03:41:54</timestamp> <excerpt type="str"> U.S. military spokesman Maj. Brad Leighton said jet fighters flew over the area in a show of force after the Iraqi's requested help, but no airstrikes were carried out. Some clashes raged into the night, raising the possibility of more casualties.The </excerpt> <source> <name type="str">Macleans.ca</name> <url type="str">http://www.macleans.ca/</url> <daylife_url type="str">http://www.daylife.com/source/Macleans.ca</daylife_url> <rank type="int4">3</rank> <source_id type="str">0a80aBggdl123</source_id> <type type="int4">1</type> </source> </article> </daily_counts> ........ ........ </payload> </response>
This function returns basic information about a given topic specified by name.
Sample Invocation
http://freeapi.daylife.com
accesskey=<accesskey>&signature
Input Parameters
| Name | Description | Type | Required | Sample Values | Default Value |
| accesskey | string | Y | <your_access_key> | N/A | |
| signature | string | Y | <calculated_signature> | N/A | |
| topic_id | A topic id for the topic in question | string | Y | 045WeJhgDw2Te | |
| name | The topic name | string | Y | George W. Bush | N/A |
| include_image | Flag to specify if one thumbnail image is to be returned | int | N | 0 or 1 | 0 |
| include_wikipedia_info | Flag to specify if wiki abstract for the topic is to be returned | int | N | 0 or 1 | 0 |
Sample Output
* Starting version 4.7 and above returns a <hero_image> for a topic if available. Hero images are headshots/logos for topics that are uploaded by an editor.
<response> <message type="str">Success</message> <code type="int4">2001</code> <payload> <topic> <topic_id type="str">0dVm3LAbhJbES</topic_id> <type type="str">PLACE</type> <name type="str">United States</name> <daylife_url type="str">http://www.daylife.com/topic/United_States</daylife_url> <image> <url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</url> <daylife_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/340x.jpg</daylife_url> <thumb_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</thumb_url> <timestamp_epoch type="int4">1177281949</timestamp_epoch> <timestamp type="str">2007-04-22 22:45:49</timestamp> <credit type="str">AFP/Getty Images</credit> <image_topic_relevance type="int4">10</image_topic_relevance> <width type="int4">2860</width> <height type="int4">2268</height> <image_id type="str">0gwb63H2Wmapg</image_id> <caption type="str"> Vania King of the US (L) speaks with US team captain Zena Garrison (R) during a break in her match against Kirsten Flipken of Belgium in the quarter-finals round in the Fed Cup World Group 2007 between Belgium and the US in Delray Beach, Florida 22 April 2007. King won the match 4-6, 6-4, 7-5 to give the US a total score of 3-0 and move to the next round </caption> <source> <name type="str">Getty Images</name> <url type="str">http://gettyimages.com/</url> <daylife_url type="str">http://www.daylife.com/source/Getty_Images</daylife_url> <rank type="int4">1</rank> <source_id type="str">0a9L9fsaU55wK</source_id> <type type="int4">6</type> </source> </image> <hero_image> <image_id type="str">0cPc4PR4931gF</image_id> <hero_image_id type="str">06XG7hW7SE63s</hero_image_id> <hero_image_url type="str">http://cache.daylife.com/imageserve/06XG7hW7SE63s/60x60.jpg</hero_image_url> </hero_image> <wiki_info> <url type="str">http://en.wikipedia.org/wiki/Hillary_Rodham_Clinton</url> <abstract type="str">Hillary Rodham Clinton (born Hillary Diane Rodham on October 26, 1947) is the junior United States Senator from New York. She is married to Bill Clinton, the 42nd President of the United States, and was First Lady of the United States from 1993 to 2001. Before that, she was a lawyer and the First Lady of Arkansas. She is a member of the Democratic Party. </abstract> </wiki_info> </topic> </payload> </response>
* Filter images returned by topic_getRelatedImages by using min_topic_image_confidence : Confidence that the topic is in the photo. Possible values - 'low', 'medium', 'high'
* If the Query for your Search API has more than 32 terms/phrases, an error code is returned. For versions previous to 4.8, an empty <payload> with a Success error code was returned.
* Turn off sliding excerpts in topic_getRelatedArticles, topic_getRelatedStories and search_getRelatedArticles by using sliding_excerpt=0 to get the first 256 characters of the Article body as an excerpt . By default, an excerpt from within the article body that contains your topic name/query is returned, that we call as sliding excerpt.
* topic_getInfo returns a lead image (tag is called <hero_image>) for the topic that is manually selected by an editor at Daylife. These are usually headshots for PERSON topics and logos for COMPANY topics and tend to be more effective and accurate than the lead image selected by the system.
* Introducing sort=daterank for the Search APIs. This sorting is a mix of relevancy (sort=relevance) and recency (sort=date).
* You can now use a new parameter called source_whitelist to filter the results by sources. You can specify multiple sources by using their source ids as multiple name value pairs in the API request.
* include_topic_type for all calls returning related Topics (xxx_getRelatedTopics) changed from the default of ‘person’, ‘place’, ‘organization’ to return all types of topics.
* Introducing search_getQuotesBy and topic_getQuotesBy to return Quotes said by a Topic/matching Topic.
* You can get the Wikipedia abstract for a topic by calling topic_getInfo and using include_wikipedia_info=1. Default is 0.
* Introducing SOURCE APIS – source_getInfo, source_getArticles, and source_getTopics.
* article_getInfo now returns scores for the article by using include_scores=1
* Search for Source - Introducing search_getMatchingSources.
* All Article APIs now accept url as a core input.
* Introducing Topic APIs
* Introducing Search APIs
* Introducing Article APIs
* Introducing Quote APIs