Skip to content

Pagination Query Examples

Basic pagination

This query retrieves the first 10 news articles (first page with 10 articles per page).

python
params = {
    "per_page": "10",
    "page": "1",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?per_page=10&page=1&api_key=YOUR_API_KEY"

Retrieving specific pages

This query retrieves the third page of results with 20 articles per page.

python
params = {
    "per_page": "20",
    "page": "3",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?per_page=20&page=3&api_key=YOUR_API_KEY"

Efficient large dataset retrieval

This query efficiently retrieves technology news from 2023 with 100 articles per page.

python
params = {
    "category.id": "4",
    "published_at.start": "2023-01-01",
    "published_at.end": "2023-12-31",
    "per_page": "100",
    "page": "1",
    "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=4&published_at.start=2023-01-01&published_at.end=2023-12-31&per_page=100&page=1&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"

This query applies pagination to a complex search for positive Amazon news.

python
params = {
    "organization.name": "Amazon",
    "sentiment.overall.polarity": "positive",
    "per_page": "25",
    "page": "3",
    "sort.by": "published_at",
    "sort.order": "desc",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?organization.name=Amazon&sentiment.overall.polarity=positive&per_page=25&page=3&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"

Sequential data collection

This query is designed for collecting a large dataset sequentially.

python
params = {
    "topic.id": "artificial_intelligence",
    "published_at.start": "2023-01-01",
    "published_at.end": "2023-12-31",
    "per_page": "100",
    "page": "2",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?topic.id=artificial_intelligence&published_at.start=2023-01-01&published_at.end=2023-12-31&per_page=100&page=2&api_key=YOUR_API_KEY"

Paginated research analysis

This query supports paginated research of environmental topics.

python
params = {
    "topic.id": "climate_change",
    "source.rank.opr.min": "0.8",
    "published_at.start": "2023-01-01",
    "per_page": "50",
    "page": "1",
    "sort.by": "sentiment.overall.score",
    "sort.order": "desc",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?topic.id=climate_change&source.rank.opr.min=0.8&published_at.start=2023-01-01&per_page=50&page=1&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"

Exploring historical archives

This query supports exploration of historical news archives with pagination.

python
params = {
    "category.id": "3",
    "published_at.start": "2024-01-01",
    "published_at.end": "2024-12-31",
    "per_page": "30",
    "page": "5",
    "sort.by": "published_at",
    "sort.order": "asc",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=3&published_at.start=2024-01-01&published_at.end=2024-12-31&per_page=30&page=5&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"

Cross-category comparative analysis with structured pagination

This query implements pagination for a comprehensive cross-category analysis with controlled sample sizes for statistical comparison.

python
params = {
    "category.id": "2,3,4,6,11",
    "source.rank.opr.min": "0.7",
    "published_at.start": "2023-01-01",
    "published_at.end": "2023-12-31",
    "per_page": "50",
    "page": "1",
    "sort.by": "category.id,published_at",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=2,3,4,6,11&source.rank.opr.min=0.7&published_at.start=2023-01-01&published_at.end=2023-12-31&per_page=50&page=1&sort.by=category.id,published_at&api_key=YOUR_API_KEY"

Multi-market sentiment monitoring with pagination

This query enables paginated analysis of sentiment trends across different geographic markets with consistent sampling methodology.

python
params = {
    "source.country.code": "us,jp,de,br,in",
    "category.id": "2",
    "title": "inflation,economy,recession,growth",
    "per_page": "20",
    "page": "1",
    "sort.by": "source.country.code,sentiment.overall.score",
    "published_at.start": "2023-01-01",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?source.country.code=us,jp,de,br,in&category.id=2&title=inflation,economy,recession,growth&per_page=20&page=1&sort.by=source.country.code,sentiment.overall.score&published_at.start=2023-01-01&api_key=YOUR_API_KEY"