Retrieve subscription plan information
curl --request POST \
--url https://v3-api.newscatcherapi.com/api/subscription \
--header 'x-api-token: <api-key>'import requests
url = "https://v3-api.newscatcherapi.com/api/subscription"
headers = {"x-api-token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-token': '<api-key>'}};
fetch('https://v3-api.newscatcherapi.com/api/subscription', 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://v3-api.newscatcherapi.com/api/subscription",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-token: <api-key>"
],
]);
$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://v3-api.newscatcherapi.com/api/subscription"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v3-api.newscatcherapi.com/api/subscription")
.header("x-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v3-api.newscatcherapi.com/api/subscription")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"active": true,
"concurrent_calls": 123,
"plan": "<string>",
"plan_calls": 123,
"remaining_calls": 123,
"historical_days": 123
}{
"message": "Invalid JSON in request body",
"status_code": 400,
"status": "Bad request"
}{
"message": "The 'x-api-token' parameter has an invalid value. Please provide a valid API key.",
"status_code": 401,
"status": "Unauthorized"
}{
"message": "Your plan request date range cannot be greater than 400 days",
"status_code": 403,
"status": "Forbidden"
}{
"message": "Request timed out after 30 seconds",
"status_code": 408,
"status": "Request timeout"
}{
"message": "Invalid date format",
"status_code": 422,
"status": "Validation error"
}{
"message": "Max API requests concurrency reached",
"status_code": 429,
"status": "Too many requests"
}Internal Server ErrorSubscription
Retrieve subscription plan information
Retrieves information about your subscription plan.
POST
/
api
/
subscription
Retrieve subscription plan information
curl --request POST \
--url https://v3-api.newscatcherapi.com/api/subscription \
--header 'x-api-token: <api-key>'import requests
url = "https://v3-api.newscatcherapi.com/api/subscription"
headers = {"x-api-token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-token': '<api-key>'}};
fetch('https://v3-api.newscatcherapi.com/api/subscription', 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://v3-api.newscatcherapi.com/api/subscription",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-token: <api-key>"
],
]);
$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://v3-api.newscatcherapi.com/api/subscription"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v3-api.newscatcherapi.com/api/subscription")
.header("x-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v3-api.newscatcherapi.com/api/subscription")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"active": true,
"concurrent_calls": 123,
"plan": "<string>",
"plan_calls": 123,
"remaining_calls": 123,
"historical_days": 123
}{
"message": "Invalid JSON in request body",
"status_code": 400,
"status": "Bad request"
}{
"message": "The 'x-api-token' parameter has an invalid value. Please provide a valid API key.",
"status_code": 401,
"status": "Unauthorized"
}{
"message": "Your plan request date range cannot be greater than 400 days",
"status_code": 403,
"status": "Forbidden"
}{
"message": "Request timed out after 30 seconds",
"status_code": 408,
"status": "Request timeout"
}{
"message": "Invalid date format",
"status_code": 422,
"status": "Validation error"
}{
"message": "Max API requests concurrency reached",
"status_code": 429,
"status": "Too many requests"
}Internal Server ErrorAuthorizations
API Key to authenticate requests.
To access the API, include your API key in the x-api-token header.
To obtain your API key, complete the form or contact us directly.
Response
A successful response containing information about the current subscription plan.
Response model for a successful Subscription request retrieving plan information. Response field behavior:
- Required fields are guaranteed to be present and non-null.
- Optional fields may be
null/undefinedif the data couldn't be extracted during processing.
Was this page helpful?

