Documentation

Guides and reference materials to help you get started, integrate, optimize and troubleshoot your use of the Newsdata.io Platform.

Introduction

This is the documentation page intended to demonstrate various API endpoints that you can use and the parameters that are available when calling them. Different API endpoints are grouped by topic in the left side menu. For most endpoints, you can also check multiple code examples that demonstrate its use using your preferred programming language.

Authentication

The NewsData.io API uses API keys to authenticate requests. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

To obtain an API key you have to create an account. You get a free API key while you are in development. When making REST API requests, your API key has to be provided as a parameter in the URL (e.g. apikey=YOUR_API_KEY).

HTTP Response Code

These error codes are produced on their given conditions

200 = Successful operation
400 = Parameter missing
401 = Unauthorized
403 = CORS policy failed. IP/Domain restricted
409 = Parameter duplicate
415 = Unsupported type
422 = Unprocessable entity
429 = Too many requests
500 = Internal server error

Get Latest News

The latest news endpoint provides access to the latest and breaking news for a country, for a specific category in a country, or for a single or multiple domains. The news articles are sorted by the publish date.

Retrieving the latest news allows you to build experience such as showcasing the latest news, breaking news tickers and analyzing News to better understand their content.

Request Parameters

apikey
required
string
Your Newsdata.io API Key. Alternatively you can provide this via the X-ACCESS-KEY HTTP header.
country string
A comma separated string of 2-letter ISO 3166-1 countries (maximum 5) to restrict the search to.
  • Afghanistan - af
  • Algeria - dz
  • Angola - ao
  • Argentina - ar
  • Australia - au
  • Austria - at
  • Azerbaijan - az
  • Bahrain - bh
  • Bangladesh - bd
  • Belarus - by
  • Belgium - be
  • Bolivia - bo
  • Bosnia And Herzegovina - ba
  • Brazil - br
  • Bulgaria - bg
  • Burkina fasco - bf
  • Cambodia - kh
  • Cameroon - cm
  • Canada - ca
  • Chile - cl
  • China - cn
  • Colombia - co
  • Costa Rica - cr
  • Côte d'Ivoire - ci
  • Croatia - hr
  • Cuba - cu
  • Cyprus - cy
  • Czech republic - cz
  • Denmark - dk
  • Dominican republic - do
  • DR Congo - cd
  • Ecuador - ec
  • Egypt - eg
  • El Salvador - sv
  • Estonia - ee
  • Ethiopia - et
  • Finland - fi
  • France - fr
  • Georgia - ge
  • Germany - de
  • Ghana - gh
  • Greece - gr
  • Guatemala - gt
  • Honduras - hn
  • Hong kong - hk
  • Hungary - hu
  • Iceland - is
  • India - in
  • Indonesia - id
  • Iraq - iq
  • Ireland - ie
  • Israel - il
  • Italy - it
  • Japan - jp
  • Jordan - jo
  • Kazakhstan - kz
  • Kenya - ke
  • Kuwait - kw
  • Latvia - lv
  • Lebanon - lb
  • Libya - ly
  • Lithuania - lt
  • Luxembourg - lu
  • Macau - mo
  • Madagascar - mg
  • Malawi - mw
  • Malaysia - my
  • Mali - ml
  • Mauritania - mr
  • Mexico - mx
  • Montenegro - me
  • Morocco - ma
  • Mozambique - mz
  • Myanmar - mm
  • Nepal - np
  • Netherland - nl
  • New zealand - nz
  • Nigeria - ng
  • North korea - kp
  • Norway - no
  • Oman - om
  • Pakistan - pk
  • Panama - pa
  • Paraguay - py
  • Peru - pe
  • Philippines - ph
  • Poland - pl
  • Portugal - pt
  • Puerto rico - pr
  • Romania - ro
  • Russia - ru
  • Saudi arabia - sa
  • Senegal - sn
  • Serbia - rs
  • Singapore - sg
  • Slovakia - sk
  • Slovenia - si
  • Somalia - so
  • South africa - za
  • South korea - kr
  • Spain - es
  • Sri Lanka - lk
  • Sudan - sd
  • Sweden - se
  • Switzerland - ch
  • Taiwan - tw
  • Tajikistan - tj
  • Tanzania - tz
  • Thailand - th
  • Tunisia - tn
  • Turkey - tr
  • Turkmenistan - tm
  • Uganda - ug
  • Ukraine - ua
  • United arab emirates - ae
  • United kingdom - gb
  • United states of america - us
  • Uruguay - uy
  • Uzbekistan - uz
  • Venezuela - ve
  • Vietnam - vi
  • Yemen - ye
  • Zambia - zm
  • Zimbabwe - zw

API URL: https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&country=au,ca
category string
A comma separated string of categories (maximum 5) to restrict the search to.
  • business
  • entertainment
  • environment
  • food
  • health
  • politics
  • science
  • sports
  • technology
  • top
  • tourism
  • world

API URL: https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&category=sports,health
language string
A comma separated string of languages (maximum 5) to restrict the search to.
  • Belarusian - be
  • Afrikaans - af
  • Amharic - am
  • Arabic - ar
  • Azerbaijani - az
  • Bengali - bn
  • Bosnian - bs
  • Bulgarian - bg
  • Burmese - my
  • Central Kurdish - ckb
  • Chinese - zh
  • Croatian - hr
  • Czech - cs
  • Danish - da
  • Dutch - nl
  • English - en
  • Estonian - et
  • Filipino - pi
  • Finnish - fi
  • French - fr
  • Georgian - ka
  • German - de
  • Greek - el
  • Hebrew - he
  • Hindi - hi
  • Hungarian - hu
  • Icelandic - is
  • Indonesian - in
  • Italian - it
  • Japanese - jp
  • Khmer - kh
  • Korean - ko
  • Latvian - lv
  • Lithuanian - lt
  • Luxembourgish - lb
  • Malay - ms
  • Nepali - ne
  • Norwegian - no
  • Pashto - ps
  • Persian - fa
  • Polish - pl
  • Portuguese - pt
  • Romanian - ro
  • Russian - ru
  • Serbian - sr
  • Shona - sn
  • Sinhala - si
  • Slovak - sk
  • Slovenian - sl
  • Somali - so
  • Spanish - es
  • Swahili - sw
  • Swedish - sv
  • Tajik - tg
  • Tamil - ta
  • Thai - th
  • Turkish - tr
  • Turkmen - tk
  • Ukrainian - uk
  • Urdu - ur
  • Uzbek - uz
  • Vietnamese - vi

API URL: https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&language=fr,en
domain string
A comma separated string of domains (maximum 5) to restrict the search to. Use the /domains endpoint to find top sources id.
API URL: https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&domain=ctvnews_london
q string
Keywords or phrases to search for in the news title and content. The value must be URL-encoded
Advance search options:
  • Search Social.
    API URL:https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&q=social
  • Search Social Pizza.
    API URL: https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&q=social%20pizza
  • Search Social but not with pizza. social NOT pizza
    API URL: https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&q=social%20NOT%20pizza
  • Search Social but not with pizza and wildfire. social NOT (pizza AND wildfire)
    API URL: https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&q=social%20NOT%20%28pizza%20AND%20wildfire%29
  • Search multiple keyword with AND operator. Search pizza and Social. social AND pizza
    API URL: https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&q=social%20AND%20pizza
  • Search multiple keywords with multiple AND operator. Search pizza and Social and pasta. social AND pizza AND pasta
    API URL: https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&q=social%20AND%20pizza%20AND%20pasta
  • Search multiple keyword with OR operator. Search pizza or Social. pizaa OR social
    API URL: https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&q=social%20OR%20pizza
  • Search pizza or Social but not pasta. (pizza OR social) NOT pasta
    API URL: https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&q=%28pizza%20OR%20social%29%20NOT%20pasta
  • Search multiple keyword with multiple OR operator. Search pizza or Social or pasta. social OR pizza OR pasta
    API URL: https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&q=social%20OR%20pizza%20OR%20pasta
qInTitle string
Keywords or phrases to search for in the news title only.

Please note: This parameter can't be used with q parameter in the same query.
page string
Use this to page through the results if the total results found is greater than the page size.
get https://newsdata.io/api/1/news?apikey=YOUR_API_KEY
Sample Response

Response Object

status string
Status shows the status of your request. If the request was successful then it shows success, in case of error it shows error. In the case of error a code and message property will be displayed.
totalResults int
The total number of results available for your request.
results array
The results of the request
title string
Title of the article.
link string
The direct URL to the article.
source_id string
The name of the source this article came from.
keywords array
The list of keywords related to the article
creator array
The author(s) of the news article.
image_url string
Relevant image url for the news article.
video_url string
Relevant video url for the news article.
description string
A description of the news article.
pubDate string
The article publish date and time in UTC.
content string
A Full Content if available of the news article.
country array
The list of countries related to the news article
category array
The list of categories of the news article
language string
The language in which news article has been created
nextPage string
page parameter value for next request.
SUCCESS
get https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&language=fr
Sample Response
ERROR
get https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&language=arabic
Sample Response

News Archive

The news archive endpoint provides access to the old news data for a country, for a specific category in a country, or for a single or multiple domains.

Retrieving a piece of old news allows you to get the past news data for research and analysis purposes.

Request Parameters

apikey
required
string
Your Newsdata.io API Key. Alternatively you can provide this via the X-ACCESS-KEY HTTP header.
country string
A comma separated string of 2-letter ISO 3166-1 countries (maximum 5) to restrict the search to.
  • Afghanistan - af
  • Algeria - dz
  • Angola - ao
  • Argentina - ar
  • Australia - au
  • Austria - at
  • Azerbaijan - az
  • Bahrain - bh
  • Bangladesh - bd
  • Belarus - by
  • Belgium - be
  • Bolivia - bo
  • Bosnia And Herzegovina - ba
  • Brazil - br
  • Bulgaria - bg
  • Burkina fasco - bf
  • Cambodia - kh
  • Cameroon - cm
  • Canada - ca
  • Chile - cl
  • China - cn
  • Colombia - co
  • Costa Rica - cr
  • Côte d'Ivoire - ci
  • Croatia - hr
  • Cuba - cu
  • Cyprus - cy
  • Czech republic - cz
  • Denmark - dk
  • Dominican republic - do
  • DR Congo - cd
  • Ecuador - ec
  • Egypt - eg
  • El Salvador - sv
  • Estonia - ee
  • Ethiopia - et
  • Finland - fi
  • France - fr
  • Georgia - ge
  • Germany - de
  • Ghana - gh
  • Greece - gr
  • Guatemala - gt
  • Honduras - hn
  • Hong kong - hk
  • Hungary - hu
  • Iceland - is
  • India - in
  • Indonesia - id
  • Iraq - iq
  • Ireland - ie
  • Israel - il
  • Italy - it
  • Japan - jp
  • Jordan - jo
  • Kazakhstan - kz
  • Kenya - ke
  • Kuwait - kw
  • Latvia - lv
  • Lebanon - lb
  • Libya - ly
  • Lithuania - lt
  • Luxembourg - lu
  • Macau - mo
  • Madagascar - mg
  • Malawi - mw
  • Malaysia - my
  • Mali - ml
  • Mauritania - mr
  • Mexico - mx
  • Montenegro - me
  • Morocco - ma
  • Mozambique - mz
  • Myanmar - mm
  • Nepal - np
  • Netherland - nl
  • New zealand - nz
  • Nigeria - ng
  • North korea - kp
  • Norway - no
  • Oman - om
  • Pakistan - pk
  • Panama - pa
  • Paraguay - py
  • Peru - pe
  • Philippines - ph
  • Poland - pl
  • Portugal - pt
  • Puerto rico - pr
  • Romania - ro
  • Russia - ru
  • Saudi arabia - sa
  • Senegal - sn
  • Serbia - rs
  • Singapore - sg
  • Slovakia - sk
  • Slovenia - si
  • Somalia - so
  • South africa - za
  • South korea - kr
  • Spain - es
  • Sri Lanka - lk
  • Sudan - sd
  • Sweden - se
  • Switzerland - ch
  • Taiwan - tw
  • Tajikistan - tj
  • Tanzania - tz
  • Thailand - th
  • Tunisia - tn
  • Turkey - tr
  • Turkmenistan - tm
  • Uganda - ug
  • Ukraine - ua
  • United arab emirates - ae
  • United kingdom - gb
  • United states of america - us
  • Uruguay - uy
  • Uzbekistan - uz
  • Venezuela - ve
  • Vietnam - vi
  • Yemen - ye
  • Zambia - zm
  • Zimbabwe - zw

API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&country=au,jp
category string
A comma separated string of categories (maximum 5) to restrict the search to.
  • business
  • entertainment
  • environment
  • food
  • health
  • politics
  • science
  • sports
  • technology
  • top
  • tourism
  • world

API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&category=sports,top
language string
A comma separated string of languages (maximum 5) to restrict the search to.
  • Belarusian - be
  • Afrikaans - af
  • Amharic - am
  • Arabic - ar
  • Azerbaijani - az
  • Bengali - bn
  • Bosnian - bs
  • Bulgarian - bg
  • Burmese - my
  • Central Kurdish - ckb
  • Chinese - zh
  • Croatian - hr
  • Czech - cs
  • Danish - da
  • Dutch - nl
  • English - en
  • Estonian - et
  • Filipino - pi
  • Finnish - fi
  • French - fr
  • Georgian - ka
  • German - de
  • Greek - el
  • Hebrew - he
  • Hindi - hi
  • Hungarian - hu
  • Icelandic - is
  • Indonesian - in
  • Italian - it
  • Japanese - jp
  • Khmer - kh
  • Korean - ko
  • Latvian - lv
  • Lithuanian - lt
  • Luxembourgish - lb
  • Malay - ms
  • Nepali - ne
  • Norwegian - no
  • Pashto - ps
  • Persian - fa
  • Polish - pl
  • Portuguese - pt
  • Romanian - ro
  • Russian - ru
  • Serbian - sr
  • Shona - sn
  • Sinhala - si
  • Slovak - sk
  • Slovenian - sl
  • Somali - so
  • Spanish - es
  • Swahili - sw
  • Swedish - sv
  • Tajik - tg
  • Tamil - ta
  • Thai - th
  • Turkish - tr
  • Turkmen - tk
  • Ukrainian - uk
  • Urdu - ur
  • Uzbek - uz
  • Vietnamese - vi

API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&language=fr,es
domain string
A comma separated string of domains (maximum 5) to restrict the search to. Use the /domains endpoint to find top sources id.
API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&domain=ctvnews_london
from_date string
A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. 2021-04-18 or 2021-04-18T04:04:34)
API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&from_date=2021-04-18
to_date string
A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. 2021-04-18 or 2021-04-18T04:04:34)
API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&to_date=2021-04-18
q string
Keywords or phrases to search for in the news title and content. The value must be URL-encoded
Advance search options:
  • Search Social.
    API URL:https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&q=social
  • Search Social Pizza.
    API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&q=social%20pizza
  • Search Social but not with pizza. social NOT pizza
    API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&q=social%20NOT%20pizza
  • Search Social but not with pizza and wildfire. social NOT (pizza AND wildfire)
    API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&q=social%20NOT%20%28pizza%20AND%20wildfire%29
  • Search multiple keyword with AND operator. Search pizza and Social. social AND pizza
    API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&q=social%20AND%20pizza
  • Search multiple keywords with multiple AND operator. Search pizza and Social and pasta. social AND pizza AND pasta
    API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&q=social%20AND%20pizza%20AND%20pasta
  • Search multiple keyword with OR operator. Search pizza or Social. pizaa OR social
    API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&q=social%20OR%20pizza
  • Search pizza or Social but not pasta. (pizza OR social) NOT pasta
    API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&q=%28social%20OR%20pizza%29%20NOT%20pasta
  • Search multiple keyword with multiple OR operator. Search pizza or Social or pasta. social OR pizza OR pasta
    API URL: https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&q=social%20OR%20pizza%20OR%20pasta
qInTitle string
Keywords or phrases to search for in the news title only.

Please note: This parameter can't be used with q parameter in the same query.
page string
Use this to page through the results if the total results found is greater than the page size.
get https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY
Sample Response

Response Object

status string
Status shows the status of your request. If the request was successful then it shows success, in case of error it shows error. In the case of error a code and message property will be displayed.
totalResults int
The total number of results available for your request.
results array
The results of the request
title string
Title of the article.
link string
The direct URL to the article.
source_id string
The name of the source this article came from.
keywords array
The list of keywords related to the article
creator array
The author(s) of the news article.
image_url string
Relevant image url for the news article.
video_url string
Relevant video url for the news article.
description string
A description of the news article.
pubDate string
The article publish date and time in UTC.
content string
A Full Content if available of the news article.
country array
The list of countries related to the news article
category array
The list of categories of the news article
language string
The language in which news article has been created
nextPage string
page parameter value for next request.
SUCCESS
get https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&language=fr
Sample Response
ERROR
get https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&language=arabic
Sample Response

News Sources

News sources endpoint provides access to the subsets of news publishers that the latest news is available from.

It's mainly a convenience endpoint that you can use to keep track of the publishers available on the API, and you can pipe it straight through to your users

Request Parameters

apikey
required
string
Your Newsdata.io API Key. Alternatively you can provide this via the X-ACCESS-KEY HTTP header.
country string
Find sources that display news in a specific country.
  • Afghanistan - af
  • Algeria - dz
  • Angola - ao
  • Argentina - ar
  • Australia - au
  • Austria - at
  • Azerbaijan - az
  • Bahrain - bh
  • Bangladesh - bd
  • Belarus - by
  • Belgium - be
  • Bolivia - bo
  • Bosnia And Herzegovina - ba
  • Brazil - br
  • Bulgaria - bg
  • Burkina fasco - bf
  • Cambodia - kh
  • Cameroon - cm
  • Canada - ca
  • Chile - cl
  • China - cn
  • Colombia - co
  • Costa Rica - cr
  • Côte d'Ivoire - ci
  • Croatia - hr
  • Cuba - cu
  • Cyprus - cy
  • Czech republic - cz
  • Denmark - dk
  • Dominican republic - do
  • DR Congo - cd
  • Ecuador - ec
  • Egypt - eg
  • El Salvador - sv
  • Estonia - ee
  • Ethiopia - et
  • Finland - fi
  • France - fr
  • Georgia - ge
  • Germany - de
  • Ghana - gh
  • Greece - gr
  • Guatemala - gt
  • Honduras - hn
  • Hong kong - hk
  • Hungary - hu
  • Iceland - is
  • India - in
  • Indonesia - id
  • Iraq - iq
  • Ireland - ie
  • Israel - il
  • Italy - it
  • Japan - jp
  • Jordan - jo
  • Kazakhstan - kz
  • Kenya - ke
  • Kuwait - kw
  • Latvia - lv
  • Lebanon - lb
  • Libya - ly
  • Lithuania - lt
  • Luxembourg - lu
  • Macau - mo
  • Madagascar - mg
  • Malawi - mw
  • Malaysia - my
  • Mali - ml
  • Mauritania - mr
  • Mexico - mx
  • Montenegro - me
  • Morocco - ma
  • Mozambique - mz
  • Myanmar - mm
  • Nepal - np
  • Netherland - nl
  • New zealand - nz
  • Nigeria - ng
  • North korea - kp
  • Norway - no
  • Oman - om
  • Pakistan - pk
  • Panama - pa
  • Paraguay - py
  • Peru - pe
  • Philippines - ph
  • Poland - pl
  • Portugal - pt
  • Puerto rico - pr
  • Romania - ro
  • Russia - ru
  • Saudi arabia - sa
  • Senegal - sn
  • Serbia - rs
  • Singapore - sg
  • Slovakia - sk
  • Slovenia - si
  • Somalia - so
  • South africa - za
  • South korea - kr
  • Spain - es
  • Sri Lanka - lk
  • Sudan - sd
  • Sweden - se
  • Switzerland - ch
  • Taiwan - tw
  • Tajikistan - tj
  • Tanzania - tz
  • Thailand - th
  • Tunisia - tn
  • Turkey - tr
  • Turkmenistan - tm
  • Uganda - ug
  • Ukraine - ua
  • United arab emirates - ae
  • United kingdom - gb
  • United states of america - us
  • Uruguay - uy
  • Uzbekistan - uz
  • Venezuela - ve
  • Vietnam - vi
  • Yemen - ye
  • Zambia - zm
  • Zimbabwe - zw

API URL: https://newsdata.io/api/1/sources?apikey=YOUR_API_KEY&country=jp
category string
Find sources that display news of this category.
  • business
  • entertainment
  • environment
  • food
  • health
  • politics
  • science
  • sports
  • technology
  • top
  • tourism
  • world

API URL: https://newsdata.io/api/1/sources?apikey=YOUR_API_KEY&category=sports
language string
Find sources that display news in a specific language.
  • Belarusian - be
  • Afrikaans - af
  • Amharic - am
  • Arabic - ar
  • Azerbaijani - az
  • Bengali - bn
  • Bosnian - bs
  • Bulgarian - bg
  • Burmese - my
  • Central Kurdish - ckb
  • Chinese - zh
  • Croatian - hr
  • Czech - cs
  • Danish - da
  • Dutch - nl
  • English - en
  • Estonian - et
  • Filipino - pi
  • Finnish - fi
  • French - fr
  • Georgian - ka
  • German - de
  • Greek - el
  • Hebrew - he
  • Hindi - hi
  • Hungarian - hu
  • Icelandic - is
  • Indonesian - in
  • Italian - it
  • Japanese - jp
  • Khmer - kh
  • Korean - ko
  • Latvian - lv
  • Lithuanian - lt
  • Luxembourgish - lb
  • Malay - ms
  • Nepali - ne
  • Norwegian - no
  • Pashto - ps
  • Persian - fa
  • Polish - pl
  • Portuguese - pt
  • Romanian - ro
  • Russian - ru
  • Serbian - sr
  • Shona - sn
  • Sinhala - si
  • Slovak - sk
  • Slovenian - sl
  • Somali - so
  • Spanish - es
  • Swahili - sw
  • Swedish - sv
  • Tajik - tg
  • Tamil - ta
  • Thai - th
  • Turkish - tr
  • Turkmen - tk
  • Ukrainian - uk
  • Urdu - ur
  • Uzbek - uz
  • Vietnamese - vi

API URL: https://newsdata.io/api/1/sources?apikey=YOUR_API_KEY&language=en
get https://newsdata.io/api/1/sources?apikey=YOUR_API_KEY
Sample Response

Response Object

status string
Status shows the status of your request. If the request was successful then it shows success, in case of error it shows error. In the case of error a code and message property will be displayed.
results array
The results of the request
id string
The identifier of the news source. You can use this with our other endpoints.
name string
The name of the news source.
url string
The URL of the homepage.
category array
The type of news to expect from this news source.
language array
The language that this news source writes in.
country array
The country this news source is based in (and primarily writes about).
SUCCESS
get https://newsdata.io/api/1/sources?apikey=YOUR_API_KEY&language=ar
Sample Response
ERROR
get https://newsdata.io/api/1/sources?apikey=YOUR_API_KEY&language=arabic
Sample Response

Get Crypto News

Search and Monitor Worldwide Cryptocurrency-related news and blog data from the most reliable News and Blog Websites

Retrieving the latest news allows you to build experience such as showcasing the latest news, breaking news tickers and analyzing News to better understand their content.

Request Parameters

apikey
required
string
Your Newsdata.io API Key. Alternatively you can provide this via the X-ACCESS-KEY HTTP header.
country string
A comma separated string of 2-letter ISO 3166-1 countries (maximum 5) to restrict the search to.
  • Afghanistan - af
  • Algeria - dz
  • Angola - ao
  • Argentina - ar
  • Australia - au
  • Austria - at
  • Azerbaijan - az
  • Bahrain - bh
  • Bangladesh - bd
  • Belarus - by
  • Belgium - be
  • Bolivia - bo
  • Bosnia And Herzegovina - ba
  • Brazil - br
  • Bulgaria - bg
  • Burkina fasco - bf
  • Cambodia - kh
  • Cameroon - cm
  • Canada - ca
  • Chile - cl
  • China - cn
  • Colombia - co
  • Costa Rica - cr
  • Côte d'Ivoire - ci
  • Croatia - hr
  • Cuba - cu
  • Cyprus - cy
  • Czech republic - cz
  • Denmark - dk
  • Dominican republic - do
  • DR Congo - cd
  • Ecuador - ec
  • Egypt - eg
  • El Salvador - sv
  • Estonia - ee
  • Ethiopia - et
  • Finland - fi
  • France - fr
  • Georgia - ge
  • Germany - de
  • Ghana - gh
  • Greece - gr
  • Guatemala - gt
  • Honduras - hn
  • Hong kong - hk
  • Hungary - hu
  • Iceland - is
  • India - in
  • Indonesia - id
  • Iraq - iq
  • Ireland - ie
  • Israel - il
  • Italy - it
  • Japan - jp
  • Jordan - jo
  • Kazakhstan - kz
  • Kenya - ke
  • Kuwait - kw
  • Latvia - lv
  • Lebanon - lb
  • Libya - ly
  • Lithuania - lt
  • Luxembourg - lu
  • Macau - mo
  • Madagascar - mg
  • Malawi - mw
  • Malaysia - my
  • Mali - ml
  • Mauritania - mr
  • Mexico - mx
  • Montenegro - me
  • Morocco - ma
  • Mozambique - mz
  • Myanmar - mm
  • Nepal - np
  • Netherland - nl
  • New zealand - nz
  • Nigeria - ng
  • North korea - kp
  • Norway - no
  • Oman - om
  • Pakistan - pk
  • Panama - pa
  • Paraguay - py
  • Peru - pe
  • Philippines - ph
  • Poland - pl
  • Portugal - pt
  • Puerto rico - pr
  • Romania - ro
  • Russia - ru
  • Saudi arabia - sa
  • Senegal - sn
  • Serbia - rs
  • Singapore - sg
  • Slovakia - sk
  • Slovenia - si
  • Somalia - so
  • South africa - za
  • South korea - kr
  • Spain - es
  • Sri Lanka - lk
  • Sudan - sd
  • Sweden - se
  • Switzerland - ch
  • Taiwan - tw
  • Tajikistan - tj
  • Tanzania - tz
  • Thailand - th
  • Tunisia - tn
  • Turkey - tr
  • Turkmenistan - tm
  • Uganda - ug
  • Ukraine - ua
  • United arab emirates - ae
  • United kingdom - gb
  • United states of america - us
  • Uruguay - uy
  • Uzbekistan - uz
  • Venezuela - ve
  • Vietnam - vi
  • Yemen - ye
  • Zambia - zm
  • Zimbabwe - zw

API URL: https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&country=au,ca
language string
A comma separated string of languages (maximum 5) to restrict the search to.
  • Belarusian - be
  • Afrikaans - af
  • Amharic - am
  • Arabic - ar
  • Azerbaijani - az
  • Bengali - bn
  • Bosnian - bs
  • Bulgarian - bg
  • Burmese - my
  • Central Kurdish - ckb
  • Chinese - zh
  • Croatian - hr
  • Czech - cs
  • Danish - da
  • Dutch - nl
  • English - en
  • Estonian - et
  • Filipino - pi
  • Finnish - fi
  • French - fr
  • Georgian - ka
  • German - de
  • Greek - el
  • Hebrew - he
  • Hindi - hi
  • Hungarian - hu
  • Icelandic - is
  • Indonesian - in
  • Italian - it
  • Japanese - jp
  • Khmer - kh
  • Korean - ko
  • Latvian - lv
  • Lithuanian - lt
  • Luxembourgish - lb
  • Malay - ms
  • Nepali - ne
  • Norwegian - no
  • Pashto - ps
  • Persian - fa
  • Polish - pl
  • Portuguese - pt
  • Romanian - ro
  • Russian - ru
  • Serbian - sr
  • Shona - sn
  • Sinhala - si
  • Slovak - sk
  • Slovenian - sl
  • Somali - so
  • Spanish - es
  • Swahili - sw
  • Swedish - sv
  • Tajik - tg
  • Tamil - ta
  • Thai - th
  • Turkish - tr
  • Turkmen - tk
  • Ukrainian - uk
  • Urdu - ur
  • Uzbek - uz
  • Vietnamese - vi

API URL: https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&language=fr,en
domain string
A comma separated string of domains (maximum 5) to restrict the search to. Use the /domains endpoint to find top sources id.
API URL: https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&domain=coinspeaker
q string
Keywords or phrases to search for in the news title and content. The value must be URL-encoded
Advance search options:
  • Search Bitcoin.
    API URL:https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&q=bitcoin
  • Search Bitcoin Ethereum.
    API URL: https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&q=bitcoin%20ethereum
  • Search Bitcoin but not with Ethereum. bitcoin NOT ethereum
    API URL: https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&q=bitcoin%20NOT%20ethereum
  • Search Bitcoin but not with Ethereum and Dogecoin. bitcoin NOT (ethereum AND dogecoin)
    API URL: https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&q=bitcoin%20NOT%20%28ethereum%20AND%20dogecoin%29
  • Search multiple keyword with AND operator. Search Bitcoin and Ethereum. bitcoin AND ethereum
    API URL: https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&q=bitcoin%20AND%20ethereum
  • Search multiple keywords with multiple AND operator. Search Bitcoin and Ethereum and Dogecoin. bitcoin AND ethereum AND dogecoin
    API URL: https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&q=bitcoin%20AND%20ethereum%20AND%20dogecoin
  • Search multiple keyword with OR operator. Search Bitcoin or Ethereum. bitcoin OR ethereum
    API URL: https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&q=bitcoin%20OR%20ethereum
  • Search Bitcoin or Ethereum but not Dogecoin. (bitcoin OR ethereum) NOT dogecoin
    API URL: https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&q=%28bitcoin%20OR%20ethereum%29%20NOT%20dogecoin
  • Search multiple keyword with multiple OR operator. Search Bitcoin or Ethereum or Dogecoin. bitcoin OR ethereum OR dogecoin
    API URL: https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&q=bitcoin%20OR%20ethereum%20OR%20dogecoin
qInTitle string
Keywords or phrases to search for in the news title only.

Please note: This parameter can't be used with q parameter in the same query.
page string
Use this to page through the results if the total results found is greater than the page size.
get https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY
Sample Response

Response Object

status string
Status shows the status of your request. If the request was successful then it shows success, in case of error it shows error. In the case of error a code and message property will be displayed.
totalResults int
The total number of results available for your request.
results array
The results of the request
title string
Title of the article.
link string
The direct URL to the article.
source_id string
The name of the source this article came from.
keywords array
The list of keywords related to the article
creator array
The author(s) of the news article.
image_url string
Relevant image url for the news article.
video_url string
Relevant video url for the news article.
description string
A description of the news article.
pubDate string
The article publish date and time in UTC.
content string
A Full Content if available of the news article.
country array
The list of countries related to the news article
category array
The list of categories of the news article
language string
The language in which news article has been created
nextPage string
page parameter value for next request.
SUCCESS
get https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&language=fr
Sample Response
ERROR
get https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&language=arabic
Sample Response

Client Libraries

Use a client library (SDK) to quickly and easily get started with Newsdata.io API without having to make HTTP requests directly.

We have libraries for the following languages:

Python

Use the Newsdata.io Python client library to integrate Newsdata.io API into your Python application without having to make HTTP requests directly.

Source: Newsdata.io Python Client

Installation:
$ pip install newsdataapi
Usage:

from newsdataapi import NewsDataApiClient

# API key authorization, Initialize the client with your API key

api = NewsDataApiClient(apikey="YOUR_API_KEY")

# You can pass empty or with request parameters {ex. (country = "us")}

response = api.news_api( q= "ronaldo" , country = "us")

PHP

Use the Newsdata.io PHP client library to integrate Newsdata API into your PHP application without having to make HTTP requests directly.

Source: Newsdata.io PHP bindings

Installation:
$ composer require newsdataio/newsdataapi
Usage:
<?php

require_once '../autoload.php';

use NewsdataIO\NewsdataApi;

$newsdataApiObj = new NewsdataApi("YOUR_API_KEY");

// Pass your desired strings in an array with unique key

$data = array("q" => "ronaldo", "country" => "ie");

$response = $newsdataApiObj->get_latest_news($data);

?>