curl --request GET \
--url 'https://api.benzinga.com/api/v2/news?token=' \
--header 'accept: <accept>'import requests
url = "https://api.benzinga.com/api/v2/news?token="
headers = {"accept": "<accept>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {accept: '<accept>'}};
fetch('https://api.benzinga.com/api/v2/news?token=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.benzinga.com/api/v2/news?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept: <accept>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.benzinga.com/api/v2/news?token="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "<accept>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.benzinga.com/api/v2/news?token=")
.header("accept", "<accept>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benzinga.com/api/v2/news?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = '<accept>'
response = http.request(request)
puts response.read_body[
{
"id": 36444586,
"author": "GlobeNewswire",
"created": "Mon, 01 Jan 2024 13:35:14 -0400",
"updated": "Mon, 01 Jan 2024 13:35:15 -0400",
"title": "Company XYZ Announces Q4 2023 Earnings Results and Strategic Initiatives",
"teaser": "",
"body": "",
"url": "https://www.benzinga.com/pressreleases/24/01/g36444586/company-xyz-announces-q4-2023-earnings-results-and-strategic-initiatives",
"image": [
{
"size": "thumb",
"url": "https://cdn.benzinga.com/files/imagecache/250x187xUP/images/story/2023/press_release_image.jpeg"
},
{
"size": "small",
"url": "https://cdn.benzinga.com/files/imagecache/1024x768xUP/images/story/2023/press_release_image.jpeg"
},
{
"size": "large",
"url": "https://cdn.benzinga.com/files/imagecache/2048x1536xUP/images/story/2023/press_release_image.jpeg"
}
],
"channels": [
{
"name": "Press Releases"
}
],
"stocks": [
{
"name": "AAPL",
"cusip": "037833100",
"isin": "US0378331005",
"exchange": "NASDAQ"
}
],
"tags": [
{
"name": "Press Release"
}
]
}
]
{
"ok": false,
"errors": [
{
"code": "auth_failed",
"id": "unauthorized",
"value": "Invalid or missing authentication token"
}
]
}
{
"ok": false,
"errors": [
{
"code": "no_data_found",
"id": "not_found",
"value": "No data found for the specified parameters"
}
]
}
{
"ok": false,
"errors": [
{
"code": "internal_server_error",
"id": "server_error",
"value": "An unexpected error occurred while processing your request"
}
]
}
プレスリリース
このREST APIは、プレスリリースの構造化データを返します。最適なパフォーマンスを得るには、ティッカー、日付、チャネルなどのパラメータを使用してクエリ範囲を絞り込むか、差分取得にはupdatedSinceを使用してください。ページオフセットは0~100000に制限されています。
curl --request GET \
--url 'https://api.benzinga.com/api/v2/news?token=' \
--header 'accept: <accept>'import requests
url = "https://api.benzinga.com/api/v2/news?token="
headers = {"accept": "<accept>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {accept: '<accept>'}};
fetch('https://api.benzinga.com/api/v2/news?token=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.benzinga.com/api/v2/news?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept: <accept>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.benzinga.com/api/v2/news?token="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "<accept>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.benzinga.com/api/v2/news?token=")
.header("accept", "<accept>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benzinga.com/api/v2/news?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = '<accept>'
response = http.request(request)
puts response.read_body[
{
"id": 36444586,
"author": "GlobeNewswire",
"created": "Mon, 01 Jan 2024 13:35:14 -0400",
"updated": "Mon, 01 Jan 2024 13:35:15 -0400",
"title": "Company XYZ Announces Q4 2023 Earnings Results and Strategic Initiatives",
"teaser": "",
"body": "",
"url": "https://www.benzinga.com/pressreleases/24/01/g36444586/company-xyz-announces-q4-2023-earnings-results-and-strategic-initiatives",
"image": [
{
"size": "thumb",
"url": "https://cdn.benzinga.com/files/imagecache/250x187xUP/images/story/2023/press_release_image.jpeg"
},
{
"size": "small",
"url": "https://cdn.benzinga.com/files/imagecache/1024x768xUP/images/story/2023/press_release_image.jpeg"
},
{
"size": "large",
"url": "https://cdn.benzinga.com/files/imagecache/2048x1536xUP/images/story/2023/press_release_image.jpeg"
}
],
"channels": [
{
"name": "Press Releases"
}
],
"stocks": [
{
"name": "AAPL",
"cusip": "037833100",
"isin": "US0378331005",
"exchange": "NASDAQ"
}
],
"tags": [
{
"name": "Press Release"
}
]
}
]
{
"ok": false,
"errors": [
{
"code": "auth_failed",
"id": "unauthorized",
"value": "Invalid or missing authentication token"
}
]
}
{
"ok": false,
"errors": [
{
"code": "no_data_found",
"id": "not_found",
"value": "No data found for the specified parameters"
}
]
}
{
"ok": false,
"errors": [
{
"code": "internal_server_error",
"id": "server_error",
"value": "An unexpected error occurred while processing your request"
}
]
}
[
{
"id": 36444586,
"author": "GlobeNewswire",
"created": "Mon, 01 Jan 2024 13:35:14 -0400",
"updated": "Mon, 01 Jan 2024 13:35:15 -0400",
"title": "Company XYZ Announces Q4 2023 Earnings Results and Strategic Initiatives",
"teaser": "",
"body": "",
"url": "https://www.benzinga.com/pressreleases/24/01/g36444586/company-xyz-announces-q4-2023-earnings-results-and-strategic-initiatives",
"image": [
{
"size": "thumb",
"url": "https://cdn.benzinga.com/files/imagecache/250x187xUP/images/story/2023/press_release_image.jpeg"
},
{
"size": "small",
"url": "https://cdn.benzinga.com/files/imagecache/1024x768xUP/images/story/2023/press_release_image.jpeg"
},
{
"size": "large",
"url": "https://cdn.benzinga.com/files/imagecache/2048x1536xUP/images/story/2023/press_release_image.jpeg"
}
],
"channels": [
{
"name": "Press Releases"
}
],
"stocks": [
{
"name": "AAPL",
"cusip": "037833100",
"isin": "US0378331005",
"exchange": "NASDAQ"
}
],
"tags": [
{
"name": "Press Release"
}
]
}
]
{
"ok": false,
"errors": [
{
"code": "auth_failed",
"id": "unauthorized",
"value": "Invalid or missing authentication token"
}
]
}
{
"ok": false,
"errors": [
{
"code": "no_data_found",
"id": "not_found",
"value": "No data found for the specified parameters"
}
]
}
{
"ok": false,
"errors": [
{
"code": "internal_server_error",
"id": "server_error",
"value": "An unexpected error occurred while processing your request"
}
]
}
承認
APIキー認証。APIキーをクエリパラメータとして指定してください。
ヘッダー
返却形式を指定
application/json, application/xml クエリパラメータ
ページオフセット。最適化、パフォーマンス、および技術上の理由により、ページオフセットは0~100000に制限されています。日付などの他のパラメータでクエリ結果を絞り込んでください。
返される結果数。最大100件。
x <= 100見出しのみ(headline)、見出し+要約(abstract)、または見出し+本文全文(full)を指定
full, abstract, headline ニュースをクエリする日付。dateFromとdateToが同じ場合の省略指定です。形式: yyyy-mm-dd
クエリ開始日。公開日でソートされます。形式: yyyy-mm-dd
クエリ終了日。公開日でソートされます。形式: yyyy-mm-dd
取得およびソートに使用する最終更新のUnixタイムスタンプ(UTC)
取得およびソートに使用する最終公開のUnixタイムスタンプ(UTC)
結果の並べ替えを制御できます。デフォルトはcreated, DESCです。形式: field:direction。ソート項目: id, created, updated。ソート順: asc(昇順)、desc(降順)
id:asc, id:desc, created:asc, created:desc, updated:asc, updated:desc カンマ区切りの1つ以上のISIN(国際証券識別番号)。最大50件。形式: csv
カンマ区切りの1つ以上のCUSIP。最大50件。ライセンス契約が必要です。形式: csv
カンマ区切りの1つ以上のティッカーシンボル。最大50件。形式: csv
カンマ区切りの1つ以上のプライマリティッカーシンボル。プライマリティッカーへの関連付けのみで絞り込みます。形式: csv
カンマ区切りの1つ以上のチャネル名またはID。形式: csv
カンマ区切りの1つ以上の単語またはフレーズ。優先順位に従ってタイトル、タグ、本文を検索します。形式: csv
topicsクエリの論理演算子。すべてのtopicsを必須にするには'and'、いずれかのtopicを必須にするには'or'を使用します
and, or カンマ区切りの1人以上の著者。形式: csv
APIレスポンスの形式を指定します
text 重要度で絞り込みます
low, medium, high 地域で絞り込みます(例: カナダ向けコンテンツの場合は「ca」または「canada」)
レスポンス
成功
"Benzinga Newsdesk"
Show child attributes
Show child attributes
"Wed, 17 May 2017 14:20:15 -0400"
123456
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"Apple Announces New iPhone"
"Wed, 17 May 2017 14:20:15 -0400"
"https://www.benzinga.com/news/123456"