Skip to main content

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:

  1. Sign up for free - no credit card required
  2. Verify your email address
  3. 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

Learn more

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

Learn more

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.

Get Your API Key