Newsfeed & Why is it Moving v2 API Reference

Free Trial ➡

This REST API returns structured data for news.

Best Practices

For optimal performance, we have a few recommendations.

Limit query, improve performance

Limiting the scope of the query will directly improve the latency of the API. This can be accomplished by using parameters such as tickers, date, and channels, or (preferably) by using updatedSince for deltas.

Using Deltas

A common pattern is to use a delta to query for the latest change in a dataset. By reducing the amount of data available in the query, it will produce results with the least amount of latency and limited data an application will have to traverse.

In our case, we recommend tracking and querying by the latest updated timestamp.

One caveat to allow for some latency and second-only timestamps: when querying, set updatedSince to a value 5 seconds earlier than you actually want. A query may look like:

/news?updatedSince=LAGGED_TIMESTAMP Where LAGGED_TIMESTAMP is set to be five seconds less than the maximum value of the updated field (converted to a Unix timestamp) in rows already pulled from our API.

API Endpoint
https://api.benzinga.com/api/v2
Schemes

https, http

Version

2.0.0

Authentication

token authentication

apiKey to be passed as token in query parameter.

Type:
apiKey
Name:
token
In:
query

Playground

Endpoints

GET /news

Get the news items

Parameters

NameTypeLocationDescription
acceptstring , x ∈ { application/json (default) , application/xml (deprecated) }header

Specify return format.

pageintegerquery

Page offset. For optimization, performance and technical reasons, page offsets are limited from 0 - 100000. Limit the query results by other parameters such as date.

pageSizeinteger 15query

Number of results returned.

displayOutputstring , x ∈ { full , abstract , headline (default) }query

Specify headline only (headline), headline + teaser (abstract), or headline + full body (full) text

datestring (yyyy-mm-dd)query

The date to query for news. Shorthand for date_from and date_to if they are the same

dateFromstring (yyyy-mm-dd)query

Date to query from point in time. Sorted by published date

dateTostring (yyyy-mm-dd)query

Date to query to point in time. Sorted by published date

updatedSinceinteger (int64)query

The last updated Unix timestamp (UTC) to pull and sort by

publishedSinceinteger (Unix timestamp)query

The last published Unix timestamp (UTC) to pull and sort by

sortstring (field, field:direction) , x ∈ { id:asc , id:desc , created:asc , created:desc , updated:asc , updated:desc }query

Allows control of results sorting. Default is updated, DESC. (updated:desc)

Sort Fields

  • id
  • created
  • updated

Sort Order Direction

  • asc (ascending)
  • desc (descending)
isinstring (csv)query

One or more ISINs separated by a comma. Maximum 50.

cusipstring (csv)query

One or more CUSIPs separated by a comma. Maximum 50. License agreement required.

tickersstring (csv)query

One or more ticker symbols separated by a comma. Maximum 50.

channelsstring (csv)query

One or more channel names or IDs separated by a comma

topicsstring (csv)query

One or more words/phrases separated by a comma; searches Title, Tags, and Body in order of priority.

authorsstring (csv)query

One or more authors separated by a comma

content_typesstring (csv)query

One or more content types separated by a comma

Responses

CodeModelDescription
200 OKBenzingaStory

success

Response (200 OK)

[
  {
    "id": "integer",
    "author": "string",
    "created": "string (Wed, 17 May 2017 14:20:15 -0400)",
    "title": "string",
    "teaser": "string",
    "body": "string",
    "url": "string",
    "image": [
      {
        "size": "string",
        "url": "string"
      }
    ],
    "channels": [
      {
        "name": "string"
      }
    ],
    "stocks": [
      {
        "name": "string"
      }
    ],
    "tags": [
      {
        "name": "string"
      }
    ]
  }
]

GET /news-removed

Returns the removed news data

Parameters

NameTypeLocationDescription
acceptstring , x ∈ { application/json (default) }header

Specifies return format. Query parameters work the same for both formats.

pageintegerquery

Page offset. For optimization, performance and technical reasons, page offsets are limited from 0 - 100000. Limit the query results by other parameters such as date.

pageSizeinteger 15query

Number of results returned.

updatedinteger (int64)query

The last updated Unix timestamp (UTC) to pull and sort by

Responses

CodeModelDescription
200 OK

success

Response (200 OK)

{
  "removed": [
    {
      "id": "integer"
    }
  ]
}

Models

BenzingaStory: object

PropertyTypeDescription
idinteger

The unique identifier of the article. This identifier is also found in the path of url on benzinga.com.

authorstring

The author of the article. This could be a Benzinga journalist, news desk analyst or contributor on benzinga.com.

createdstring (Wed, 17 May 2017 14:20:15 -0400)

The moment the article is created. The time zone is Greenwich Mean Time (GMT) - 4:00, commonly know as Eastern Daylight Time (EDT). This time stamp will not change. The date format standard used is RFC 2822 / RFC 1123.

updatedobject-
titlestring

The headline of the article. This will only be plain text.

teaserstring

Depending on where the content is originated from (Benzinga.com or Benzinga Pro Terminal) the teaser functions in different ways. If the article is a full length article from Benzinga.com, where the body field is filled out, this will be the first sentence of the article up to 256 characters. If this is a Benzinga Pro headline, this will function like the body of an article and provide additional context to the headline, usually no more than a few paragraphs. This field can contain html and html encoded characters such as '&quot' etc.

bodystring

The article content. This field can contain html and html encoded characters such as 'quot' etc.

urlstring

The url where the article lives on Benzinga.com. If this is a pro headline, it will take the user to a shortened headline with a paywall to purchase the Benzinga Pro terminal, so use with caution.

imageobject[]

The featured image related to the article, if applicable. Benzinga Pro headlines will not contain a featured image.

image[].sizestring-
image[].urlstring-
channelsobject[]

The topic(s) or categories that relate to the article. Channels can have sub-channels, but they will all be listed as their own item and not as a sub-level of the array.

For Why is it Moving (WIIM) data, enter WIIM as channel.

channels[].namestring-
stocksobject[]

The stock symbols that are listed within the article body. This will not display competitor symbols unless they are specifically referenced in the article.

stocks[].namestring-
tagsobject[]

Additional tags that are not channels or categories, but are reoccuring themes including, but not limited to; analyst names, bills being talked about in Congress (Dodd-Frank), specific products (iPhone), politicians, celebrities, stock movements (i.e. 'Mid-day Losers' & 'Mid-day Gainers').

tags[].namestring-
Structure (JSON)
{
  "id": "integer",
  "author": "string",
  "created": "string (Wed, 17 May 2017 14:20:15 -0400)",
  "title": "string",
  "teaser": "string",
  "body": "string",
  "url": "string",
  "image": [
    {
      "size": "string",
      "url": "string"
    }
  ],
  "channels": [
    {
      "name": "string"
    }
  ],
  "stocks": [
    {
      "name": "string"
    }
  ],
  "tags": [
    {
      "name": "string"
    }
  ]
}

news-removed: object

PropertyTypeDescription
idinteger

id of removed news content

updatedobject-
Structure (JSON)
{
  "id": "integer"
}

updated: string (Wed, 17 May 2017 14:20:15 -0400)

The timestamp of the last update to the article. The time zone is Greenwich Mean Time (GMT) - 4:00, commonly know as Eastern Daylight Time (EDT). This time stamp has the ability to change one or many times, updating each time an update is pushed to the article. The date format standard used is RFC 2822 / RFC 1123.

Structure (JSON)
"string (Wed, 17 May 2017 14:20:15 -0400)"