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 with 100 articles per page.

python
params = {
    "category.id": "medtop:13000000",
    "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=medtop:13000000&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": "1",
    "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=1&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": "industry.ai_news",
    "per_page": "100",
    "page": "2",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?topic.id=industry.ai_news&per_page=100&page=2&api_key=YOUR_API_KEY"

Paginated research analysis

This query supports paginated research of green energy topics.

python
params = {
    "topic.id": "industry.green_energy_news",
    "per_page": "10",
    "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=industry.green_energy_news&per_page=10&page=1&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"

Exploring news archives

This query supports exploration of political news archives with pagination.

python
params = {
    "category.id": "medtop:11000000",
    "per_page": "30",
    "page": "1",
    "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=medtop:11000000&per_page=30&page=1&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": "medtop:04000000",
    "per_page": "10",
    "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=medtop:04000000&per_page=10&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.

python
params = {
    "source.country.code": "us,de,gb,fr",
    "category.id": "medtop:04000000",
    "title": "economy,market,trade",
    "per_page": "20",
    "page": "1",
    "sort.by": "source.country.code,sentiment.overall.score",
    "api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?source.country.code=us,de,gb,fr&category.id=medtop:04000000&title=economy,market,trade&per_page=20&page=1&sort.by=source.country.code,sentiment.overall.score&api_key=YOUR_API_KEY"