---
title: "How to Get Started with APITube News API: A Step-by-Step Guide"
description: "Learn how to use APITube News API to access real-time news data from over 500,000 verified sources worldwide. This guide covers everything from registration to advanced filtering options."
source: https://apitube.io/blog/post/how-to-get-started-with-apitube-news-api-a-step-by-step-guide
---

How to start with APITube News API: Step-by-Step Guide.

In the modern data-driven society, it is essential to access real-time news, which has credible sources, both to the existing business, researchers, and developers. Whatever you are creating, be it a news aggregator, market research or sentiment analysis, an influential news API may be the foundation of your application. One of the most solution-packed APITube News API is available with more than 500,000 checked news sources in 60 languages and 177 countries.

This tutorial is a step-by-step tutorial that will introduce you to all you need to know about using APITube News API, including registering your account, making your first API call, and using more complex filtering features.
What is APITube News API?

APITube is an effective real time news API, which offers easy and uniform access to a large body of news items across the globe to developers. The API will be user-friendly with such complex features as sentiment analysis, entity recognition, and multilingual.

APITube News API has several major characteristics such as:

    Live news on over 500,000 verifiable sources.
    The coverage is over 177 countries in 60 languages.
    Computer-generated analysis with sentiment analysis and entity recognition.
    Basic, RESTful API architecture and regular format of response.
    Customizable search features and numerous filtering features.
    Various export formats such as JSON, CSV, and XML amongst others.

The first step to follow is to Sign up and obtain your API Key.

To use the APITube News API, you are required to create an account and acquire an API key before being able to use it. The API key is also necessary when authenticating your requests and are granted the right to the data.

    Go to the APITube home page and press Sign up.
    Fill in your details in the registration process.
    Upon registration, you will be issued with your own API key.
    You should remember to save this key somewhere safe because it will be required whenever you make an API request.

Step 2: Knowledge of Authentication Methods.

The API administrator of APITube provides two authentication methods to your API requests:
Method 1 API Key in HTTP (Recommended)

We would advise doing this in any production setting and ensures the security of your API key:

```bash
curl -H "X-API-Key: YOUR_API_KEY" https://api.apitube.io/v1/news/everything?per_page=10
```

#### Method 2: API Key in Query String

While simpler, this method is not recommended for production as it exposes your API key in the URL:

```bash
curl https://api.apitube.io/v1/news/everything?per_page=10&api_key=YOUR_API_KEY
```

### Step 3: Exploring Available Endpoints

APITube News API provides several endpoints to access different types of news content:

| Endpoint | Description |
|----------|-------------|
| `/v1/news/everything` | Get all articles with flexible filtering |
| `/v1/news/top-headlines` | Get top headlines |
| `/v1/news/story` | Get a specific story by Article ID |
| `/v1/news/article` | Get a specific article by Article ID |
| `/v1/news/category` | Get articles by category |
| `/v1/news/topic` | Get articles by topic |
| `/v1/news/industry` | Get articles by industry |
| `/v1/news/entity` | Get articles by entity |

### Step 4: Making Your First API Request

Let's start with a simple request to get the latest news articles. This example retrieves 10 recent articles:

```bash
curl -H "X-API-Key: YOUR_API_KEY" https://api.apitube.io/v1/news/everything?per_page=10
```

The response will be in JSON format, containing the requested news articles along with metadata about the request.

### Step 5: Understanding the Response Structure

All APITube responses are returned in JSON format with a consistent structure:

```json
{
  "status": "ok",
  "limit": 2,
  "path": "https://api.apitube.io/v1/news/everything?language.code=en&per_page=2&page=1",
  "page": 1,
  "has_next_pages": true,
  "next_page": "https://api.apitube.io/v1/news/everything?language.code=en&per_page=2&page=2",
  "has_previous_page": false,
  "previous_page": "",
  "export": {
    "json": "https://api.apitube.io/v1/news/everything?language.code=en&per_page=2&page=1&export=json",
    "xlsx": "https://api.apitube.io/v1/news/everything?language.code=en&per_page=2&page=1&export=xlsx",
    "csv": "https://api.apitube.io/v1/news/everything?language.code=en&per_page=2&page=1&export=csv",
    "tsv": "https://api.apitube.io/v1/news/everything?language.code=en&per_page=2&page=1&export=tsv",
    "xml": "https://api.apitube.io/v1/news/everything?language.code=en&per_page=2&page=1&export=xml",
    "rss": "https://api.apitube.io/v1/news/everything?language.code=en&per_page=2&page=1&export=rss"
  },
  "request_id": "5978d89c-46f6-4ab4-b65c-8b4a6000d4ac",
  "results": [
    {
      "id": 12345678,
      "href": "https://example.com/tech/new-smartphone-release",
      "published_at": "2025-02-07T10:30:00Z",
      "title": "New XYZ Smartphone Makes Waves in the Market",
      "description": "XYZ Company has introduced a new flagship smartphone that significantly outperforms competitors in performance and camera quality.",
      "body": "Today, XYZ Company introduced its new flagship smartphone. The device is equipped with the latest generation processor and a revolutionary camera capable of professional quality photos even in low light.",
      "body_html": "<p>Today, XYZ Company introduced its new flagship smartphone. The device is equipped with the latest generation processor and a revolutionary camera capable of professional quality photos even in low light.</p>",
      "language": "en",
      "author": {
        "id": 5678,
        "name": "John Smith"
      },
      "image": "https://example.com/images/xyz-smartphone.jpg",
      "categories": [
        {
          "id": 199,
          "name": "economy, business and finance",
          "score": 0.6,
          "taxonomy": "iptc_mediatopics",
          "links": {
            "self": "https://api.apitube.io/v1/news/category/iptc_mediatopics/medtop:04000000"
          }
        }
      ],
      "topics": [
        {
          "id": "industry.financial_news",
          "name": "Finance Industry News",
          "score": 0.1,
          "links": {
            "self": "https://api.apitube.io/v1/news/topic/industry.financial_news"
          }
        }
      ],
      "industries": [
        {
          "id": 456,
          "name": "Consumer Electronics",
          "links": {
            "self": "https://api.apitube.io/v1/news/industry/456"
          }
        }
      ],
      "entities": [
        {
          "id": 789,
          "name": "XYZ Company",
          "type": "organization",
          "links": {
            "self": "https://api.apitube.io/v1/news/entity/789",
            "wikipedia": "https://en.wikipedia.org/wiki/XYZ_Company",
            "wikidata": "https://www.wikidata.org/wiki/Q12345"
          },
          "frequency": 3,
          "title": {
            "pos": [
              {"start": 4, "end": 15}
            ]
          },
          "body": {
            "pos": [
              {"start": 6, "end": 17},
              {"start": 122, "end": 133}
            ]
          },
          "metadata": {
            "name": "XYZ Company",
            "type": "business",
            "country": {"code": "US", "name": "United States"},
            "description": "Technology company"
          }
        }
      ],
      "source": {
        "id": 123,
        "domain": "example.com",
        "home_page_url": "https://example.com",
        "type": "news",
        "bias": "center",
        "rankings": {
          "opr": 8
        },
        "location": {
          "country_name": "United States",
          "country_code": "us"
        },
        "favicon": "https://example.com/favicon.ico"
      },
      "sentiment": {
        "overall": {"score": 0.45, "polarity": "positive"},
        "title": {"score": 0.3, "polarity": "positive"},
        "body": {"score": 0.6, "polarity": "positive"}
      },
      "summary": [
        {
          "sentence": "Today, XYZ Company introduced its new flagship smartphone.",
          "sentiment": {"score": 0.2, "polarity": "positive"}
        },
        {
          "sentence": "Industry experts have already highly rated the novelty, noting its excellent performance and innovative features.",
          "sentiment": {"score": 0.8, "polarity": "positive"}
        }
      ],
      "keywords": ["smartphone", "XYZ", "technology"],
      "links": [
        {"url": "https://example.com/related/xyz-previous-model", "type": "link"}
      ],
      "media": [
        {"url": "https://example.com/images/xyz-smartphone.jpg", "type": "image"},
        {"url": "https://example.com/videos/xyz-smartphone-preview.mp4", "type": "video"}
      ],
      "story": {
        "id": 3019419820,
        "uri": "https://api.apitube.io/v1/news/story/3019419820"
      },
      "shares": {
        "total": 288,
        "facebook": 149,
        "twitter": 74,
        "reddit": 65
      },
      "is_duplicate": false,
      "is_free": true,
      "is_breaking": false,
      "read_time": 2,
      "sentences_count": 3,
      "paragraphs_count": 1,
      "words_count": 60,
      "characters_count": 354
    }
  ]
}
```

Each article in the response contains detailed information including title, content, source, publication date, and more.

### Step 6: Filtering News with Parameters

One of the most powerful features of APITube News API is its extensive filtering capabilities. Here are some common parameters you can use:

#### Title-Based Filtering

```bash
# Get articles with "technology" in the title
curl -X GET "https://api.apitube.io/v1/news/everything?title=technology&api_key=YOUR_API_KEY"

# Get articles with either "AI" or "innovation" in the title
curl -X GET "https://api.apitube.io/v1/news/everything?title=AI,innovation&api_key=YOUR_API_KEY"

# Exclude articles with "celebrity" in the title
curl -X GET "https://api.apitube.io/v1/news/everything?ignore.title=celebrity&api_key=YOUR_API_KEY"
```

#### Language and Country Filtering

```bash
# Get English language articles
curl -H "X-API-Key: YOUR_API_KEY" https://api.apitube.io/v1/news/everything?language.code=en

# Get articles from the United States
curl -H "X-API-Key: YOUR_API_KEY" https://api.apitube.io/v1/news/everything?source.country.code=us
```

#### Date Range Filtering

```bash
# Get articles published after a specific date
curl -H "X-API-Key: YOUR_API_KEY" https://api.apitube.io/v1/news/everything?published_at.start=2025-01-01T00:00:00Z

# Get articles published within a date range
curl -H "X-API-Key: YOUR_API_KEY" https://api.apitube.io/v1/news/everything?published_at.start=2025-01-01T00:00:00Z&published_at.end=2025-01-31T23:59:59Z
```

#### Sentiment Analysis Filtering

```bash
# Get positive news about technology
curl -H "X-API-Key: YOUR_API_KEY" https://api.apitube.io/v1/news/everything?title=technology&sentiment.overall.polarity=positive
```

### Step 7: Implementing Pagination

When working with large datasets, pagination is essential. APITube makes this easy with the `page` and `per_page` parameters:

```bash
# Get the first page with 20 results per page
curl -H "X-API-Key: YOUR_API_KEY" https://api.apitube.io/v1/news/everything?per_page=20&page=1
```

The response includes helpful pagination links:
- `next_page`: URL for the next page of results
- `previous_page`: URL for the previous page of results

### Step 8: Implementing in Your Programming Language

While the examples above use curl for simplicity, you can implement APITube News API in any programming language. Here are examples in popular languages:

#### Python Implementation

```python
import requests

api_key = "YOUR_API_KEY"
url = "https://api.apitube.io/v1/news/everything"

# Set up parameters
params = {
    "title": "technology",
    "language.code": "en",
    "per_page": 10
}

# Set up headers with API key
headers = {
    "X-API-Key": api_key
}

# Make the request
response = requests.get(url, params=params, headers=headers)

# Check if request was successful
if response.status_code == 200:
    data = response.json()
    articles = data["results"]
    
    # Process the articles
    for article in articles:
        print(f"Title: {article['title']}")
        print(f"Source: {article['source']['domain']}")
        print(f"Published: {article['published_at']}")
        print(f"URL: {article['href']}")
        print("---")
else:
    print(f"Error: {response.status_code}")
    print(response.text)
```

#### JavaScript Implementation

```javascript
const fetchNews = async () => {
  const apiKey = 'YOUR_API_KEY';
  const url = 'https://api.apitube.io/v1/news/everything';
  
  const params = new URLSearchParams({
    'title': 'technology',
    'language.code': 'en',
    'per_page': 10
  });
  
  try {
    const response = await fetch(`${url}?${params}`, {
      headers: {
        'X-API-Key': apiKey
      }
    });
    
    if (!response.ok) {
      throw new Error(`HTTP error! Status: ${response.status}`);
    }
    
    const data = await response.json();
    
    // Process the articles
    data.results.forEach(article => {
      console.log(`Title: ${article.title}`);
      console.log(`Source: ${article.source.domain}`);
      console.log(`Published: ${article.published_at}`);
      console.log(`URL: ${article.href}`);
      console.log('---');
    });
    
  } catch (error) {
    console.error('Error fetching news:', error);
  }
};

fetchNews();
```

### Step 9: Advanced Features and Use Cases

APITube News API offers several advanced features that can enhance your applications:

#### Sentiment Analysis

Track public opinion and sentiment trends:

```bash
curl -H "X-API-Key: YOUR_API_KEY" https://api.apitube.io/v1/news/everything?title=bitcoin&sentiment.overall.polarity=positive
```

#### Entity Recognition

Find articles mentioning specific entities:

```bash
curl -H "X-API-Key: YOUR_API_KEY" https://api.apitube.io/v1/news/everything?organization.name=Apple
```

#### Industry Monitoring

Track news related to specific industries:

```bash
curl -H "X-API-Key: YOUR_API_KEY" https://api.apitube.io/v1/news/everything?industry.id=88
```

#### Content Export

Export data in various formats for analysis:

```bash
curl -H "X-API-Key: YOUR_API_KEY" https://api.apitube.io/v1/news/everything?title=technology&export=csv
```

Step 10: Optimization and Best Practices.

The best practices to receive the maximum of APITube News API are as follows:

    Filter results: Use narrow down parameters to be able to reduce data transfer and processing time.
    Adopt caching: Store the responses in cases where it is suitable to minimize API calls.
    Limit rates: Take note of the rate limits of your plan and build the correct retry policies.
    Use pagination: Pagination should always be always used on large sets of results.
    Get your API key: Incorporate the use of the header method of authentication and do not reveal your API key to your client-side code.
    Keep track of your API usage: To prevent unpleasant surprises and/or reaching limits, track your usage.

### Additional Resources

- [APITube Documentation](https://docs.apitube.io)
- [Postman Collection](https://docs.apitube.io/platform/news-api/postman-collection)
- [Rate Limits and Quotas](https://docs.apitube.io/platform/news-api/rate-limits)
- [List of Countries](https://docs.apitube.io/platform/news-api/list-of-countries)
- [List of Languages](https://docs.apitube.io/platform/news-api/list-of-languages)
- [List of Categories](https://docs.apitube.io/platform/news-api/list-of-categories)


