getNews API

The getNews API returns news headlines, articles and related photos based upon news sources, category, sub-category and/or keyword.

Pricing is based on the number of monthly queries and fields requested. We offer four packages: Small, Medium, Large, Enterprise. Contact us for additional details.


API Documentation

INPUTS:

sources (required)
The news feed code. (list-enum)
Valid values: AP, APAI, BC, CP, CPF, CNW, CRB, DJ, CMTX, CMTX:PCS, CMTX:PCC, CMTX:WALLST, CMTX:SEC, IF, USDA, PRNW, ZACKS, BRUG, AGFAX, SETZ, SPC, STPE, NASS, ESTMZ, DVND, LME-COT, LME-WHS, DLFRX, GLDRPT, COT
Example: AP,IF

symbols (optional)
A symbol or code that identifies a financial instrument. (list)
Example: AMZN,GOOG,AAPL

category (optional)
A grouping of related news content. (enum)
Valid values: stocks, futures, forex
Example: stocks

subCategory (optional)
A more specific category of related news content. (enum)
Example: tech

series (optional)
A grouping of stories under a recurring news topic. e.g. Morning Call (MORNCALL). (list-enum)
Valid values: MORNCALL
Example: MORNCALL

keyword (optional)
A term used to create searches. (string)
Example: tablet

maxRecords (optional)
The maximum number of records to show in the return. (int)
Default: 30
Example: 10

startDate (optional)
The beginning date for the query. (dateTime)
Example: 2017-02-22T04:33:15

displayType (required)
The type of new displayed: headlines only, headline and preview, or full. (enum)
Valid values: headline, preview, full
Example: preview

images (optional)
An option for returning the images contained in the news article. (boolean)
Example: true

storyId (optional)
Parameter allows to get specific story by providing newsID. Parameters: sources, symbols, category, subCategory, keyword, maxRecords, startDate will be ignored. (int)
Example: 259220

rss (optional)
Parameter formats XML requests as RSS feeds. This parameter has no effect on JSON or CSV requests. (boolean)
Default: false
Example: true

rssTitle (optional)
Parameter overides the default RSS feed title and description. (string)
Default: Barchart OnDemand News
Example:

fields (optional)
The additional fields requested. (list)
Example: publishDate

barchartClassification (optional)
(list)
Example:


OUTPUTS:

newsID (always returned)
The identifying news code. (int)
timestamp (always returned)
The timestamp for a news article. (dateTime)
source (always returned)
The origin of the news feed. (string)
categories (always returned)
A grouping of related news content. (list)
subCategories (always returned)
A more specific category list of related news content. (list)
headline (always returned)
The title of the news article. (string)
isExternal (always returned)
A flag indicating if the news stories is from an external source. (boolean)
headlineURL (as requested)
The URL of the news article. This is used for headline only feeds. (string)
preview (as requested)
A brief summary of the entire news article. (string)
fullText (as requested)
The full published text of the news article. (string)
imageURL (as requested)
The URL of the image enclosed in the news article. (string)
imageCaption (as requested)
A brief summary explaining an image. (string)
imageHeight (as requested)
The height of an image. (int)
imageWidth (as requested)
The width of an image. (int)
pdfURL (as requested)
The web location of PDF version of the news article. (string)
publishDate (as requested)
The actual publish date of the news story. (dateTime)
largeImageURL (as requested)
The URL of the alternative larger image enclosed in the article (string)
largeImageHeight (as requested)
The height of the larger image, if available. (int)
largeImageWidth (as requested)
The width of the larger image, if available. (int)

STATUS CODE RESPONSES:

200 OK Success
400 Bad Request The request was invalid, please see the message for more information.
500 Internal Server Error Something is not working correctly, please contact support.