Newsfeed (Streaming) v1 API Reference

Free Trial ➡

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

NameTypeLocationDescription
Upgradestring , x ∈ { websocket }headers

Most Websocket client libraries will do this automatically, but the Upgrade: websocket header must be specified for the connection to be established.

Responses

CodeModelDescription
101 Switching ProtocolsStreamMessage

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

PropertyTypeDescription
api_versionstring

Indicates the message API version. Currently websocket/v1.

kindstring

Indicates the message data Kind. Currently News/v1.

dataobject

Message payload

data.idinteger

The unique identifier of the event that triggered the action.

data.actionstring , x ∈ { Created , Updated , Removed }

Indicates what type of status change is occured for this news item.

data.timestampstring

Indicates event time. (string:RFC3339Milli)

data.contentobject

News object data

data.content.idinteger

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_idinteger

The unique identifier of the article revision. Changes when story is updated.

data.content.typestring

Article type/source. ex. 'story'.

data.content.created_atstring (2012-02-17T21:01:39.000Z)

The moment the article is first published. This timestamp will not change on revisions. (RFC3339Milli)

data.content.updated_atstring (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.titlestring

The headline of the article. This will only be plain text. May be updated with revisions.

data.content.bodystring

The article content. This field can contain html and html encoded characters such as &amp or . etc. You may request plaintext only with HTML removed, but this may impact formatting/style and produce results different from what the source intended.

data.content.authorsobject

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

data.content.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.

data.content.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.

data.content.channelsstring[]

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 WIIM channel.

data.content.securitiesobject[]

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[].symbolstring-
data.content.securities[].primaryboolean-
data.content.securities[].exchangestring-
data.content.tagsstring[]

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

PropertyTypeDescription
idinteger

The unique identifier of the event that triggered the action.

actionstring , x ∈ { Created , Updated , Removed }

Indicates what type of status change is occured for this news item.

timestampstring

Indicates event time. (string:RFC3339Milli)

data.contentobject

News object data

data.content.idinteger

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_idinteger

The unique identifier of the article revision. Changes when story is updated.

data.content.typestring

Article type/source. ex. 'story'.

data.content.created_atstring (2012-02-17T21:01:39.000Z)

The moment the article is first published. This timestamp will not change on revisions. (RFC3339Milli)

data.content.updated_atstring (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.titlestring

The headline of the article. This will only be plain text. May be updated with revisions.

data.content.bodystring

The article content. This field can contain html and html encoded characters such as &amp or . etc. You may request plaintext only with HTML removed, but this may impact formatting/style and produce results different from what the source intended.

data.content.authorsobject

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

data.content.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.

data.content.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.

data.content.channelsstring[]

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 WIIM channel.

data.content.securitiesobject[]

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[].symbolstring-
data.content.securities[].primaryboolean-
data.content.securities[].exchangestring-
data.content.tagsstring[]

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

PropertyTypeDescription
idinteger

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_idinteger

The unique identifier of the article revision. Changes when story is updated.

typestring

Article type/source. ex. 'story'.

created_atstring (2012-02-17T21:01:39.000Z)

The moment the article is first published. This timestamp will not change on revisions. (RFC3339Milli)

updated_atstring (2012-02-17T21:01:39.000Z)

The timestamp of the last update to the article. This timestamp is updated for each revision. (RFC3339Milli)

titlestring

The headline of the article. This will only be plain text. May be updated with revisions.

bodystring

The article content. This field can contain html and html encoded characters such as &amp or . etc. You may request plaintext only with HTML removed, but this may impact formatting/style and produce results different from what the source intended.

authorsobject

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

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.

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.

channelsstring[]

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 WIIM channel.

securitiesobject[]

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[].symbolstring-
securities[].primaryboolean-
securities[].exchangestring-
tagsstring[]

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"
  ]
}