Title Query Examples
Query news with a specific word in the title
This query retrieves news articles containing "technology" in the title.
python
params = {
"title": "technology",
"api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?title=technology&api_key=YOUR_API_KEY"
Query articles with multiple keywords
This query retrieves news articles containing "AI" or "innovation" in the title.
python
params = {
"title": "AI,innovation",
"api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?title=AI,innovation&api_key=YOUR_API_KEY"
Exclude specific words from the title
This query retrieves news articles that do not contain the word "celebrity" in the title.
python
params = {
"ignore.title": "celebrity",
"api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?ignore.title=celebrity&api_key=YOUR_API_KEY"
Using regular expressions for search
This query retrieves news articles with titles that match the specified regular expression.
python
params = {
"title_pattern": "^Breaking News: [A-Za-z]+",
"api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?title_pattern=^Breaking%20News:%20[A-Za-z]+&api_key=YOUR_API_KEY"
Combined title filters
This query combines multiple filters to search for articles about AI, but not about layoffs.
python
params = {
"title": "AI",
"ignore.title": "layoffs,job losses",
"title_starts_with": "Breaking",
"api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?title=AI&ignore.title=layoffs,job%20losses&title_starts_with=Breaking&api_key=YOUR_API_KEY"
Analyzing market trends by titles
This query allows you to analyze headlines mentioning bull or bear markets.
python
params = {
"title_pattern": "(bull|bear) market",
"category.id": "2",
"published_at.start": "2023-01-01",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?title_pattern=(bull|bear)%20market&category.id=2&published_at.start=2023-01-01&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"
Tracking industry issues
This query searches for news about semiconductor shortages in the relevant industry.
python
params = {
"title": "semiconductor",
"title_ends_with": "shortage",
"industry.id": "246771",
"published_at.start": "2023-01-01",
"api_key": "YOUR_API_KEY"
}
shell
curl -X GET "https://api.apitube.io/v1/news/everything?title=semiconductor&title_ends_with=shortage&industry.id=246771&published_at.start=2023-01-01&api_key=YOUR_API_KEY"