Libraries & SDKs
Speed up your integration with our official libraries. These SDKs provide convenient wrappers around the GNews API, handling authentication, error management, and response parsing for you.
Official Libraries
JavaScript, TypeScript, and Node.js
gnews-io-js - Official JavaScript SDK
Features:
- Promise-based API
- Built-in error handling
- Automatic request throttling
- TypeScript support included
Installation & Documentation: www.npmjs.com/package/@gnews-io/gnews-io-js
GitHub repository: github.com/gnews-io/gnews-io-js
PHP
gnews-php-client - Official PHP SDK
Features:
- PSR-4 autoloading
- Guzzle HTTP client integration
- Exception handling
- PHP 7.4+ support
Installation & Documentation: packagist.org/packages/gnews-io/gnews-io-php
GitHub repository: github.com/gnews-io/gnews-io-php
Community Libraries
We welcome community contributions! If you've created a library for GNews API, let us know and we'll feature it here.
Want to Create a Library?
Here's what makes a great GNews API library:
Essential Features:
- API key authentication
- Support for both endpoints (
/search
and/top-headlines
) - Error handling with meaningful messages
- Response parsing and validation
Nice to Have:
- Caching mechanisms
- Pagination helpers
- Comprehensive documentation
- Unit tests
Need a Different Language?
Don't see a library for your preferred programming language? You can:
- Use the REST API directly - it works with any HTTP client
- Contribute a community library and get it featured here
Support
Each library has its own GitHub repository with:
- Installation instructions
- Usage examples
- API documentation
- Issue tracking
- Community discussions