Skip to content

Category Query Examples

Getting news from a specific category

This query retrieves news articles from the "business" category.

python
params = {
    "category.id": "medtop:04000000",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=medtop:04000000&api_key=YOUR_API_KEY"

Getting technology news

This query retrieves news articles from the "technology" category.

python
params = {
    "category.id": "medtop:13000000",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=medtop:13000000&api_key=YOUR_API_KEY"

Filtering news by category and language

This query retrieves political news in French.

python
params = {
    "category.id": "medtop:11000000",
    "language.code": "fr",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=medtop:11000000&language.code=fr&api_key=YOUR_API_KEY"

Time-based category analysis

This query allows for time-based analysis of articles in the "health" category.

python
params = {
    "category.id": "medtop:07000000",
    "sort.by": "published_at",
    "sort.order": "asc",
    "per_page": "100",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=medtop:07000000&sort.by=published_at&sort.order=asc&per_page=100&api_key=YOUR_API_KEY"

Category-based media analysis

This query analyzes sports news with images.

python
params = {
    "category.id": "medtop:15000000",
    "media.images.count": "1",
    "sort.by": "media.images.count",
    "sort.order": "desc",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=medtop:15000000&media.images.count=1&sort.by=media.images.count&sort.order=desc&api_key=YOUR_API_KEY"

Comparing sentiment across different categories

This query compares positive sentiment across multiple categories.

python
params = {
    "category.id": "medtop:04000000,medtop:13000000",
    "sentiment.overall.polarity": "positive",
    "sort.by": "category.id",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=medtop:04000000,medtop:13000000&sentiment.overall.polarity=positive&sort.by=category.id&api_key=YOUR_API_KEY"

Category and location correlation analysis

This query analyzes how entertainment news varies across different geographic regions.

python
params = {
    "category.id": "medtop:01000000",
    "language.code": "en",
    "sort.by": "published_at",
    "sort.order": "desc",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=medtop:01000000&language.code=en&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"

Multi-category emerging trend identification

This query identifies emerging trends in technology categories with positive sentiment.

python
params = {
    "category.id": "medtop:13000000",
    "title": "AI,innovation,breakthrough",
    "sentiment.overall.polarity": "positive",
    "sort.by": "published_at",
    "sort.order": "desc",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=medtop:13000000&title=AI,innovation,breakthrough&sentiment.overall.polarity=positive&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"