व्यापार इंटेलिजेंस API
IPTC मीडिया News API
आईपीटीसी मीडिया विषय एक मीडिया वर्गीकरण है जिसमें 1,200 से अधिक शर्तें शामिल हैं जो 13 भाषाओं में उपलब्ध हैं। यह समाचार और पाठ विषयों को वर्गीकृत करने के लिए महत्वपूर्ण है।
API संदर्भ संस्करण: 1.0.0 3 एंडपॉइंट प्रमाणीकरण
बेस URL
https://api.pressmonitor.com/news-iptc/v1 प्रमाणीकरण
सभी अनुरोध Bearer टोकन प्रमाणीकरण का उपयोग करते हैं। प्रत्येक कॉल में Authorization हेडर जोड़ें।
Authorization: Bearer YOUR_TOKEN GET
/headlines समाचार शीर्षक प्राप्त करें
News Headlines
पैरामीटर
| नाम | प्रकार | स्थान | आवश्यक | विवरण |
|---|---|---|---|---|
| code | string | query | हां | इकाई कोड (जैसे, टिकटिंग प्रतीक, उद्योग कोड) |
| lang_code | string | query | नहीं | भाषा कोड द्वारा फ़िल्टर करें (ISO 639-1) |
| country_code | string | query | नहीं | देश कोड द्वारा फ़िल्टर करें (ISO 3166-1 alpha-2) |
| count | integer | query | नहीं | परिणामों की संख्या वापस करें |
| cursor | string | query | नहीं | पृष्ठांकन कर्सर (search_after के विकल्प के रूप में) |
कोड उदाहरण
curl --request GET \ --url 'https://api.pressmonitor.com/news-iptc/v1/headlines?code=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&cursor=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/news-iptc/v1/headlines?code=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&cursor=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/news-iptc/v1/headlines" querystring = {"code":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","country_code":"SOME_STRING_VALUE","count":"SOME_INTEGER_VALUE","cursor":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/news-iptc/v1/headlines?code=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&cursor=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/news-iptc/v1/headlines?code=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&cursor=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); प्रतिक्रियाएं
200 सफलता
GET
/briefs समाचार सारांश प्राप्त करें
News Briefs
पैरामीटर
| नाम | प्रकार | स्थान | आवश्यक | विवरण |
|---|---|---|---|---|
| code | string | query | हां | इकाई कोड (जैसे, टिकटिंग प्रतीक, उद्योग कोड) |
| lang_code | string | query | नहीं | भाषा कोड द्वारा फ़िल्टर करें (ISO 639-1) |
| country_code | string | query | नहीं | देश कोड द्वारा फ़िल्टर करें (ISO 3166-1 alpha-2) |
| count | integer | query | नहीं | परिणामों की संख्या वापस करें |
| cursor | string | query | नहीं | पृष्ठांकन कर्सर (search_after के विकल्प के रूप में) |
कोड उदाहरण
curl --request GET \ --url 'https://api.pressmonitor.com/news-iptc/v1/briefs?code=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&cursor=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/news-iptc/v1/briefs?code=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&cursor=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/news-iptc/v1/briefs" querystring = {"code":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","country_code":"SOME_STRING_VALUE","count":"SOME_INTEGER_VALUE","cursor":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/news-iptc/v1/briefs?code=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&cursor=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/news-iptc/v1/briefs?code=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&cursor=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); प्रतिक्रियाएं
200 सफलता
GET
/fulltext पूरा समाचार टेक्स्ट प्राप्त करें
News Fulltext
पैरामीटर
| नाम | प्रकार | स्थान | आवश्यक | विवरण |
|---|---|---|---|---|
| code | string | query | हां | इकाई कोड (जैसे, टिकटिंग प्रतीक, उद्योग कोड) |
| lang_code | string | query | नहीं | भाषा कोड द्वारा फ़िल्टर करें (ISO 639-1) |
| country_code | string | query | नहीं | देश कोड द्वारा फ़िल्टर करें (ISO 3166-1 alpha-2) |
| count | integer | query | नहीं | परिणामों की संख्या वापस करें |
| cursor | string | query | नहीं | पृष्ठांकन कर्सर (search_after के विकल्प के रूप में) |
कोड उदाहरण
curl --request GET \ --url 'https://api.pressmonitor.com/news-iptc/v1/fulltext?code=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&cursor=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/news-iptc/v1/fulltext?code=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&cursor=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/news-iptc/v1/fulltext" querystring = {"code":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","country_code":"SOME_STRING_VALUE","count":"SOME_INTEGER_VALUE","cursor":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/news-iptc/v1/fulltext?code=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&cursor=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/news-iptc/v1/fulltext?code=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&country_code=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&cursor=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); प्रतिक्रियाएं
200 सफलता