Skip to content

Monitor a Company

Use the Companies endpoint to watch how a company is being covered — volume, sentiment, momentum, and which outlets and topics drive the conversation.

Step 1: Resolve the company

Look the company up by name (or Wikidata ID) and take its id.

bash
curl "https://api.apitube.io/v1/companies?name=Tesla&api_key=YOUR_API_KEY"
python
import requests

response = requests.get(
    "https://api.apitube.io/v1/companies",
    params={
        "name": "Tesla",
        "api_key": "YOUR_API_KEY",
    },
)
print(response.json())
javascript
const params = new URLSearchParams({ "name": "Tesla", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/companies?${params}`);
const data = await response.json();
console.log(data);
php
$query = http_build_query(["name" => "Tesla", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/companies?$query");
$data = json_decode($response, true);
print_r($data);
go
package main

import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	u, _ := url.Parse("https://api.apitube.io/v1/companies")
	q := u.Query()
	q.Set("name", "Tesla")
	q.Set("api_key", "YOUR_API_KEY")
	u.RawQuery = q.Encode()

	resp, _ := http.Get(u.String())
	defer resp.Body.Close()

	body, _ := io.ReadAll(resp.Body)
	var data map[string]any
	json.Unmarshal(body, &data)
	fmt.Println(data)
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.apitube.io/v1/companies?name=Tesla&api_key=YOUR_API_KEY"))
            .GET()
            .build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
text
Write a script in your preferred language that calls the APITube News API:

GET https://api.apitube.io/v1/companies?name=Tesla

Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/parameters

Step 2: Read the coverage block

Fetch the profile and inspect coverage:

bash
curl "https://api.apitube.io/v1/companies/474?api_key=YOUR_API_KEY"
python
import requests

response = requests.get(
    "https://api.apitube.io/v1/companies/474",
    params={
        "api_key": "YOUR_API_KEY",
    },
)
print(response.json())
javascript
const params = new URLSearchParams({ "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/companies/474?${params}`);
const data = await response.json();
console.log(data);
php
$query = http_build_query(["api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/companies/474?$query");
$data = json_decode($response, true);
print_r($data);
go
package main

import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	u, _ := url.Parse("https://api.apitube.io/v1/companies/474")
	q := u.Query()
	q.Set("api_key", "YOUR_API_KEY")
	u.RawQuery = q.Encode()

	resp, _ := http.Get(u.String())
	defer resp.Body.Close()

	body, _ := io.ReadAll(resp.Body)
	var data map[string]any
	json.Unmarshal(body, &data)
	fmt.Println(data)
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.apitube.io/v1/companies/474?api_key=YOUR_API_KEY"))
            .GET()
            .build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
text
Write a script in your preferred language that calls the APITube News API:

GET https://api.apitube.io/v1/companies/474

Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/parameters
  • Is attention rising?coverage.momentum.change_pct.
  • What's the tone?coverage.sentiment (positive / neutral / negative).
  • Who's writing?coverage.top_sources.
  • About what?coverage.top_topics.
  • What broke today?recent_articles.

Step 3: Poll on a schedule

For ongoing monitoring, poll the profile periodically (coverage is cached for ~5 minutes server-side) and alert on shifts — e.g. a negative spike in sentiment, or momentum.change_pct crossing a threshold.

python
import requests

def snapshot(company_id, api_key):
    r = requests.get(
        f"https://api.apitube.io/v1/companies/{company_id}",
        params={"api_key": api_key},
    ).json()
    cov = r["coverage"]
    return {
        "articles_30d": cov["momentum"]["last_30_days"],
        "change_pct": cov["momentum"]["change_pct"],
        "sentiment": cov["sentiment"],
    }

Tip: for a complete, filterable feed (by date, sentiment, source) follow the profile's links.articles into /v1/news/everything.