Skip to content

Date and Time Query Examples

Getting news in a specific date range

This query retrieves news articles published in a specific date range.

python
params = {
    "published_at.start": "2026-03-01",
    "published_at.end": "2026-03-08",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?published_at.start=2026-03-01&published_at.end=2026-03-08&api_key=YOUR_API_KEY"

Using relative time ranges

This query demonstrates using different date formats to retrieve news.

python
params = {
    "published_at.start": "2026-03-07",
    "published_at.end": "2026-03-08",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?published_at.start=2026-03-07&published_at.end=2026-03-08&api_key=YOUR_API_KEY"

Historical event coverage analysis

This query tracks the chronology of coverage of Donald Trump.

python
params = {
    "person.name": "Donald Trump",
    "category.id": "medtop:11000000",
    "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?person.name=Donald%20Trump&category.id=medtop:11000000&sort.by=published_at&sort.order=asc&per_page=100&api_key=YOUR_API_KEY"

Precise time analysis using timestamps

This query analyzes news about Google within a specific time window.

python
params = {
    "organization.name": "Google",
    "sort.by": "published_at",
    "sort.order": "asc",
    "per_page": "10",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?organization.name=Google&sort.by=published_at&sort.order=asc&per_page=10&api_key=YOUR_API_KEY"