Newsfeed (Streaming) v1 API Reference
This Websocket API streams Benzinga Newsfeed Content realtime. An always-on connection delivers news the instant it becomes available. Example client implementation available at https://github.com/Benzinga/websocket-feed-examples. You may find tools like https://websocketking.com helpful for testing.
API Endpoint
wss://api.benzinga.com/api/v1/news
Schemes
wss
Version
1.0.0
Authentication
token
authentication
- Type:
- apiKey
- Name:
- token
- In:
- query
Playground
Endpoints
GET /stream
Stream Newsfeed
Server will automatically send PING control frames to connected clients, but does not require response. Many client libraries will automatically respond with PONG control frames; this is desirable, but not required. Sending any message over websocket to the server other than PING/PONG control frames will result in immediate disconnection.
Parameters
Name | Type | Location | Description |
---|---|---|---|
Upgrade | string , x ∈ { websocket } | headers | Most Websocket client libraries will do this automatically, but the |
Responses
Code | Model | Description |
---|---|---|
101 Switching Protocols | StreamMessage | ok, websocket connection established and ready. *Note messages are sent as single messages, not an array, but documentation spec does not have support for Websocket message type. |
401 Unauthorized | Unauthorized. Missing or Invalid key. | |
429 Too Many Requests | Too Many Connections. A single API key can only have one simultaneous connection. You may need to backoff and try again if you had a recent disconnection. |
Response (101 Switching Protocols)
{
"api_version": "string",
"kind": "string",
"data": {
"id": "integer",
"action": "string",
"timestamp": "string",
"content": {
"id": "integer",
"revision_id": "integer",
"type": "string",
"created_at": "string (2012-02-17T21:01:39.000Z)",
"updated_at": "string (2012-02-17T21:01:39.000Z)",
"title": "string",
"body": "string",
"authors": "object",
"teaser": "string",
"url": "string",
"channels": [
"string"
],
"securities": [
{
"symbol": "string",
"primary": "boolean",
"exchange": "string"
}
],
"tags": [
"string"
]
}
}
}
Models
StreamMessage: object
Property | Type | Description |
---|---|---|
api_version | string | Indicates the message API version. Currently |
kind | string | Indicates the message data Kind. Currently |
data | object | Message payload |
data.id | integer | The unique identifier of the event that triggered the action. |
data.action | string , x ∈ { Created , Updated , Removed } | Indicates what type of status change is occured for this news item. |
data.timestamp | string | Indicates event time. (string:RFC3339Milli) |
data.content | object | News object data |
data.content.id | integer | The unique identifier of the article. This identifier is also found in the path of url on benzinga.com. Does not change when story is updated. |
data.content.revision_id | integer | The unique identifier of the article revision. Changes when story is updated. |
data.content.type | string | Article type/source. ex. 'story'. |
data.content.created_at | string (2012-02-17T21:01:39.000Z) | The moment the article is first published. This timestamp will not change on revisions. (RFC3339Milli) |
data.content.updated_at | string (2012-02-17T21:01:39.000Z) | The timestamp of the last update to the article. This timestamp is updated for each revision. (RFC3339Milli) |
data.content.title | string | The headline of the article. This will only be plain text. May be updated with revisions. |
data.content.body | string | The article content. This field can contain html and html encoded characters such as |
data.content.authors | object | The authors of the article. This could be a Benzinga journalist, news desk analyst or contributor on benzinga.com. |
data.content.teaser | string | 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. |
data.content.url | string | 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. |
data.content.channels | string[] | 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. Why Is It Moving (WIIM) data will be labeled with the |
data.content.securities | object[] | The securities that are listed within the article body. This will not display competitor symbols unless they are specifically referenced in the article. Additional fields beyond name are not enabled by default and must be enabled by Benzinga staff. |
data.content.securities[].symbol | string | - |
data.content.securities[].primary | boolean | - |
data.content.securities[].exchange | string | - |
data.content.tags | string[] | 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'). |
Structure (JSON)
{
"api_version": "string",
"kind": "string",
"data": {
"id": "integer",
"action": "string",
"timestamp": "string",
"content": {
"id": "integer",
"revision_id": "integer",
"type": "string",
"created_at": "string (2012-02-17T21:01:39.000Z)",
"updated_at": "string (2012-02-17T21:01:39.000Z)",
"title": "string",
"body": "string",
"authors": "object",
"teaser": "string",
"url": "string",
"channels": [
"string"
],
"securities": [
{
"symbol": "string",
"primary": "boolean",
"exchange": "string"
}
],
"tags": [
"string"
]
}
}
}
StreamMessageData: object
Message payload
Property | Type | Description |
---|---|---|
id | integer | The unique identifier of the event that triggered the action. |
action | string , x ∈ { Created , Updated , Removed } | Indicates what type of status change is occured for this news item. |
timestamp | string | Indicates event time. (string:RFC3339Milli) |
data.content | object | News object data |
data.content.id | integer | The unique identifier of the article. This identifier is also found in the path of url on benzinga.com. Does not change when story is updated. |
data.content.revision_id | integer | The unique identifier of the article revision. Changes when story is updated. |
data.content.type | string | Article type/source. ex. 'story'. |
data.content.created_at | string (2012-02-17T21:01:39.000Z) | The moment the article is first published. This timestamp will not change on revisions. (RFC3339Milli) |
data.content.updated_at | string (2012-02-17T21:01:39.000Z) | The timestamp of the last update to the article. This timestamp is updated for each revision. (RFC3339Milli) |
data.content.title | string | The headline of the article. This will only be plain text. May be updated with revisions. |
data.content.body | string | The article content. This field can contain html and html encoded characters such as |
data.content.authors | object | The authors of the article. This could be a Benzinga journalist, news desk analyst or contributor on benzinga.com. |
data.content.teaser | string | 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. |
data.content.url | string | 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. |
data.content.channels | string[] | 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. Why Is It Moving (WIIM) data will be labeled with the |
data.content.securities | object[] | The securities that are listed within the article body. This will not display competitor symbols unless they are specifically referenced in the article. Additional fields beyond name are not enabled by default and must be enabled by Benzinga staff. |
data.content.securities[].symbol | string | - |
data.content.securities[].primary | boolean | - |
data.content.securities[].exchange | string | - |
data.content.tags | string[] | 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'). |
Structure (JSON)
{
"id": "integer",
"action": "string",
"timestamp": "string",
"content": {
"id": "integer",
"revision_id": "integer",
"type": "string",
"created_at": "string (2012-02-17T21:01:39.000Z)",
"updated_at": "string (2012-02-17T21:01:39.000Z)",
"title": "string",
"body": "string",
"authors": "object",
"teaser": "string",
"url": "string",
"channels": [
"string"
],
"securities": [
{
"symbol": "string",
"primary": "boolean",
"exchange": "string"
}
],
"tags": [
"string"
]
}
}
NewsContent: object
News object data
Property | Type | Description |
---|---|---|
id | integer | The unique identifier of the article. This identifier is also found in the path of url on benzinga.com. Does not change when story is updated. |
revision_id | integer | The unique identifier of the article revision. Changes when story is updated. |
type | string | Article type/source. ex. 'story'. |
created_at | string (2012-02-17T21:01:39.000Z) | The moment the article is first published. This timestamp will not change on revisions. (RFC3339Milli) |
updated_at | string (2012-02-17T21:01:39.000Z) | The timestamp of the last update to the article. This timestamp is updated for each revision. (RFC3339Milli) |
title | string | The headline of the article. This will only be plain text. May be updated with revisions. |
body | string | The article content. This field can contain html and html encoded characters such as |
authors | object | The authors of the article. This could be a Benzinga journalist, news desk analyst or contributor on benzinga.com. |
teaser | string | 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. |
url | string | 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. |
channels | string[] | 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. Why Is It Moving (WIIM) data will be labeled with the |
securities | object[] | The securities that are listed within the article body. This will not display competitor symbols unless they are specifically referenced in the article. Additional fields beyond name are not enabled by default and must be enabled by Benzinga staff. |
securities[].symbol | string | - |
securities[].primary | boolean | - |
securities[].exchange | string | - |
tags | string[] | 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'). |
Structure (JSON)
{
"id": "integer",
"revision_id": "integer",
"type": "string",
"created_at": "string (2012-02-17T21:01:39.000Z)",
"updated_at": "string (2012-02-17T21:01:39.000Z)",
"title": "string",
"body": "string",
"authors": "object",
"teaser": "string",
"url": "string",
"channels": [
"string"
],
"securities": [
{
"symbol": "string",
"primary": "boolean",
"exchange": "string"
}
],
"tags": [
"string"
]
}