Skip to main content

Search Endpoint

This endpoint allows you to search for news articles through a combination of keywords.

HTTP Request​

GEThttps://gnews.io/api/v4/search?q=example&apikey=YOUR_API_KEY

Query Parameters​

Parameter NameDefault ValueDescription
qNoneThis parameter is mandatory.
This parameter allows you to specify your search keywords to find the news articles you are looking for. The keywords will be used to return the most relevant articles. It is possible to use logical operators with keywords, see the section on query syntax. Maximum 200 characters.
langAnyThis parameter allows you to specify the language of the news articles returned by the API. You have to set as value the 2 letters code of the language you want to filter.
See the list of supported languages.
countryAnyThis parameter allows you to specify the country where the news articles returned by the API were published, the contents of the articles are not necessarily related to the specified country. You have to set as value the 2 letters code of the country you want to filter.
See the list of supported countries.
max10This parameter allows you to specify the number of news articles returned by the API. The minimum value of this parameter is 1 and the maximum value is 100. The value you can set depends on your subscription.
See the pricing for more information.
intitle,descriptionThis parameter allows you to choose in which attributes the keywords are searched. The attributes that can be set are title, description and content. It is possible to combine several attributes by separating them with a comma.
For example: title,description
nullableNoneThis parameter allows you to specify the attributes that you allow to return null values. The attributes that can be set are description, content and image. It is possible to combine several attributes by separating them with a comma.
For example: description,content
fromNoneThis parameter allows you to filter the articles that have a publication date greater than or equal to the specified value. The date must comply with ISO 8601 format.
For example: 2025-07-18T21:32:58.500Z
How far back you can go depends on your subscription, see article availability.
toNoneThis parameter allows you to filter the articles that have a publication date smaller than or equal to the specified value. The date must comply with ISO 8601 format.
For example: 2025-07-18T21:32:58.500Z
How recent an article can be depends on your subscription, see article availability.
sortbypublishedAtThis parameter allows you to choose with which type of sorting the articles should be returned. Two values are possible:
publishedAt = sort by publication date, the articles with the most recent publication date are returned first
relevance = sort by best match to keywords, the articles with the best match are returned first
page1This parameter allows you to control the pagination of the results returned by the API. The paging behavior is closely related to the value of the max parameter. The first page is page 1, then you have to increment by 1 to go to the next page. Let's say that the value of the max parameter is 10, then the first page will contain the first 10 articles returned by the API (articles 1 to 10), page 2 will return the next 10 articles (articles 11 to 20), etc.
For performance reasons, it is not possible to paginate more than 1000 articles.
truncateNoneThis parameter allows you to truncate the content attribute. To truncate the content attribute, the parameter must be set to content, as follows:
truncate=content
For users on the Free plan, the content attribute is automatically truncated.
If you need to access the full content, you can upgrade your plan here: https://gnews.io/change-plan

Query Syntax​

The q parameter supports exact phrase search and the logical operators AND, OR and NOT.

See Query Syntax for the full reference.

Code Examples​

curl --get "https://gnews.io/api/v4/search" \
--data-urlencode "q=example" \
--data-urlencode "lang=en" \
--data-urlencode "max=10" \
--data-urlencode "apikey=YOUR_API_KEY"

Alternatively, you can use our official libraries available at gnews.io/libraries.

Supported Languages​

NameCode
Arabicar
Bengalibn
Chinesezh
Dutchnl
Englishen
Frenchfr
Germande
Greekel
Hebrewhe
Hindihi
Indonesianid
Italianit
Japaneseja
Malayalamml
Marathimr
Norwegianno
Portuguesept
Punjabipa
Romanianro
Russianru
Spanishes
Swedishsv
Tamilta
Telugute
Turkishtr
Ukrainianuk

Supported Countries​

NameCode
Argentinaar
Australiaau
Bangladeshbd
Brazilbr
Canadaca
Chinacn
Colombiaco
Egypteg
Francefr
Germanyde
Greecegr
Hong Konghk
Indiain
Indonesiaid
Irelandie
Israelil
Italyit
Japanjp
Malaysiamy
Mexicomx
Netherlandsnl
Norwayno
Pakistanpk
Perupe
Philippinesph
Portugalpt
Romaniaro
Russiaru
Singaporesg
Spaines
Swedense
Switzerlandch
Taiwantw
Turkeytr
Ukraineua
United Kingdomgb
United Statesus