Get Started with GNews API
What is GNews API?
GNews API is a REST API service to search articles from 60,000+ worldwide sources. The API provides access to real-time news and historical data, as well as top headlines based on Google News rankings.
This documentation covers how to use the API with examples in JavaScript, Python, C#, PHP, and Bash to help you integrate news data into your applications.
Quick Start Guide
1. Create Your Account
Get started in seconds:
- Sign up for free - no credit card required
- Verify your email address
- Access your dashboard to get your API key
2. Make Your First API Call
All API requests follow this simple pattern:
https://gnews.io/api/v4/{endpoint}?{parameters}&apikey=YOUR_API_KEY
Try this example in your browser or terminal:
https://gnews.io/api/v4/search?q=Google&lang=en&max=5&apikey=YOUR_API_KEY
3. Choose Your Endpoint
Want to search for specific news? Start with the Search Endpoint to find articles matching keywords.
Need the top headlines? Explore the Top Headlines Endpoint based on Google News rankings.
Two Powerful Endpoints
Search Endpoint
Perfect for finding specific news stories with advanced filtering options.
Use cases:
- Keyword-based news search
- Date range filtering
- Language and country targeting
- Boolean search operators
Top Headlines Endpoint
Get trending articles based on Google News rankings across 9 categories.
Categories available:
- General
- World
- Nation
- Business
- Technology
- Entertainment
- Sports
- Science
- Health
Next Steps
Community & Support
- GitHub - Sample projects and integrations
- Email Support - Get help from our team
- FAQ - Common questions answered
Ready to Build?
Your journey starts here. Create your free account and make your first API call in under 2 minutes.