Articles

Search articles by keywords

Returns the articles matching a keyword query. See https://docs.gnews.io/endpoints/search-endpoint

get/search

Request

  • Base URL: https://gnews.io/api/v4
  • URL: https://gnews.io/api/v4/search
  • Auth: one of:
    • API key in header X-Api-Key
    • API key in query parameter apikey

Query parameters

qstring required

Keywords to search for, 200 characters at most. Supports exact phrases in quotes, AND, OR, NOT and parentheses; OR takes precedence over AND. Special characters must be inside quotes. See https://docs.gnews.io/query-syntax

lang'ar' | 'bn' | 'zh' | 'nl' | 'en' | 'fr' | 'de' | 'el' | 'he' | 'hi' | 'id' | 'it' | 'ja' | 'ml' | 'mr' | 'no' | 'pt' | 'pa' | 'ro' | 'ru' | 'es' | 'sv' | 'ta' | 'te' | 'tr' | 'uk'

2-letter code of the language of the articles. Supported values: ar (Arabic), bn (Bengali), zh (Chinese), nl (Dutch), en (English), fr (French), de (German), el (Greek), he (Hebrew), hi (Hindi), id (Indonesian), it (Italian), ja (Japanese), ml (Malayalam), mr (Marathi), no (Norwegian), pt (Portuguese), pa (Punjabi), ro (Romanian), ru (Russian), es (Spanish), sv (Swedish), ta (Tamil), te (Telugu), tr (Turkish), uk (Ukrainian).

country'ar' | 'au' | 'bd' | 'br' | 'ca' | 'cn' | 'co' | 'eg' | 'fr' | 'de' | 'gr' | 'hk' | 'in' | 'id' | 'ie' | 'il' | 'it' | 'jp' | 'my' | 'mx' | 'nl' | 'no' | 'pk' | 'pe' | 'ph' | 'pt' | 'ro' | 'ru' | 'sg' | 'es' | 'se' | 'ch' | 'tw' | 'tr' | 'ua' | 'gb' | 'us'

2-letter code of the country where the source is based. The content of the articles is not necessarily related to that country. Supported values: ar (Argentina), au (Australia), bd (Bangladesh), br (Brazil), ca (Canada), cn (China), co (Colombia), eg (Egypt), fr (France), de (Germany), gr (Greece), hk (Hong Kong), in (India), id (Indonesia), ie (Ireland), il (Israel), it (Italy), jp (Japan), my (Malaysia), mx (Mexico), nl (Netherlands), no (Norway), pk (Pakistan), pe (Peru), ph (Philippines), pt (Portugal), ro (Romania), ru (Russia), sg (Singapore), es (Spain), se (Sweden), ch (Switzerland), tw (Taiwan), tr (Turkey), ua (Ukraine), gb (United Kingdom), us (United States).

maxinteger

Number of articles returned, from 1 to 100. The maximum depends on your plan (10 on the Free plan).

instring

Article attributes the keywords are searched in, comma-separated: title, description, content.

nullablestring

Attributes allowed to be null, comma-separated: description, content, image. By default these attributes are never null.

fromstring date-time

Minimum publication date (included), ISO 8601, e.g. 2025-07-18T21:32:58.500Z. Bounded by your plan, see https://docs.gnews.io/article-availability

tostring date-time

Maximum publication date (included), ISO 8601, e.g. 2025-07-18T21:32:58.500Z. Bounded by your plan, see https://docs.gnews.io/article-availability

sortby'publishedAt' | 'relevance'

publishedAt: most recent first. relevance: best match first.

pageinteger

Page number, starting at 1. Pages hold max articles each, and pagination stops at the first 1,000 articles.

truncate'content'

Set to content to truncate the content attribute. Content is always truncated on the Free plan.

Response

Articles matching the query.

totalArticlesinteger required

Total number of articles matching the request, not the number returned.

Changes

No recorded changes to this operation across all 1 revision of this API.