Introduction
Search1API's News endpoint provides developers with a powerful way to access real-time news content from around the world. Whether you're building a news aggregator, monitoring trending topics, or feeding AI models with latest news data, our News API delivers comprehensive solutions.
Authentication
All Search1API endpoints require authentication using Bearer token. Include your API key in the Authorization header:
Authorization: Bearer your_api_key_here Basic News Search
Making Your First News Request
POST https://api.search1api.com/news
{
"query": "artificial intelligence",
"search_service": "bing",
"max_results": 5,
"language": "en-US",
"time_range": "month"
} The API will respond with the latest news:
{
"searchParameters": {
"query": "artificial intelligence",
"search_service": "bing",
"max_results": 5,
"language": "en-US",
"time_range": "month"
},
"results": [
{
"title": "Breaking: New AI Breakthrough Announced",
"link": "https://example.com/ai-news",
"snippet": "Scientists reveal groundbreaking advancement in AI technology..."
}
// Additional results...
]
} Query Parameters
query: Your news search termsearch_service: The news service to use (options: "google", "bing", "duckduckgo", "yahoo", "hackernews", default: "bing")max_results: Number of results to return (default: 5)language: Language preference for search results (e.g., "en", "en-US", "zh", "zh-CN")time_range: Time range for search results ("day", "month", "year" - representing the last day, month, or year)include_sites: List of sites to include in search results (optional)exclude_sites: List of sites to exclude from search results (optional)
Batch Processing
News API supports batch processing for improved efficiency. Send multiple queries in a single API call:
Batch News Request
POST https://api.search1api.com/news
[
{
"query": "bitcoin price",
"max_results": 3
},
{
"query": "startup funding",
"image": true,
"max_results": 2
},
{
"query": "technology trends",
"crawl_results": 1,
"max_results": 2
}
] Batch Response
[
{
"searchParameters": {
"query": "bitcoin price",
"max_results": 3
},
"results": [
{
"title": "Bitcoin Reaches New High",
"link": "https://example.com/crypto",
"snippet": "..."
}
]
},
{
"searchParameters": {
"query": "startup funding",
"max_results": 2,
"image": true
},
"results": [
{
"title": "Major VC Investment Round",
"link": "https://example.com/funding",
"snippet": "..."
}
],
"images": [
"https://example.com/funding1.jpg",
"https://example.com/funding2.jpg"
]
},
{
"searchParameters": {
"query": "technology trends",
"crawl_results": 1,
"max_results": 2
},
"results": [
{
"title": "Tech Trends 2024",
"link": "https://example.com/trends",
"snippet": "...",
"content": "Full article content here..."
}
]
}
]
Advanced Features
1. News with Images
Add image: true to get news-related images:
{
"query": "tech startup funding",
"search_service": "bing",
"image": true,
"max_results": 3
} Response includes both news and images:
{
"searchParameters": {
"query": "tech startup funding",
"search_service": "bing",
"max_results": 3,
"image": true
},
"results": [
{
"title": "Major Investment Round for Tech Startups",
"link": "https://example.com/startup-news",
"snippet": "Latest funding rounds in the tech industry..."
}
],
"images": [
"https://example.com/startup-image1.jpg",
"https://example.com/startup-image2.jpg",
"https://example.com/startup-image3.jpg"
]
} 2. Deep News Search
Enable crawl_results to get full article content:
{
"query": "global economy trends",
"search_service": "bing",
"max_results": 3,
"crawl_results": 1
} Response includes complete articles:
{
"searchParameters": {
"query": "global economy trends",
"search_service": "bing",
"max_results": 3,
"crawl_results": 1
},
"results": [
{
"title": "Global Economy: Latest Trends",
"link": "https://example.com/economy",
"snippet": "Economic experts analyze...",
"content": "Full article content here..."
},
{
"title": "Market Analysis 2024",
"link": "https://example.com/market",
"snippet": "Market overview..."
}
]
} Best Practices
Batch Processing
- Optimal batch size: 5-10 requests
- Implement proper error handling
- Handle rate limits appropriately
Authentication
- Secure API key storage
- Regular key rotation
- Environment variable usage
Data Handling
- Cache frequently accessed news
- Implement retry mechanisms
- Handle partial success scenarios
Use Cases
- News Monitoring
- Track breaking news
- Monitor industry-specific news
- Follow trending topics
- AI Applications
- Train models with news data
- Build news summarization systems
- Create sentiment analysis tools
- Content Platforms
- Build news aggregators
- Create news monitoring dashboards
- Develop media analysis tools
Why Choose Our News API?
- Real-time: Latest news as it happens
- Comprehensive: Full article content available
- Efficient: Powerful batch processing
- Economic: Starting From Free
- AI-Ready: Perfect for AI applications
Get Started
Visit our API documentation to start using Search1API's News endpoint today!
No comments yet