Here you have detailed documentation of all available API functions. To get started, you can make the sample request for each endpoint, download an SDK, or run in Postman (see bottom of left navigation).
Search and filter news.
{
"offset": 0,
"number": 10,
"available": 83,
"news": [
{
"id": 28,
"title": "Tesla to Release a Four-Motor Version of Cybertruck",
"text": "Tesla CEO Elon Musk has revealed new details about the upcoming Cybertruck electric pickup truck, the mass production of which was delayed until 2023 because of the lack of components and a lot of complex technologies that need to be scaled up. According to Musk, the initial production of the electric pickup truck will begin with a four-motor variant with “independent, ultra fast response torque control of each wheel,” the tweet reads. In response, Twitter users asked if the Cybertruck could turn like a tank. Musk said that thanks to both the rear and front wheel steer, the electric truck will not only be able to turn like a tank, but also drive diagonally like a crab. According to Electrek, this change could be Tesla's reaction to what its competitors do. Since the introduction of Tesla’s novelty, the market for electric pickup trucks has significantly evolved. Currently, one electric pickup on the market can turn like a tank – the Rivian R1T, while GMC's Hummer EV can drive diagonally. Following the announcement of Tesla Cybertruck in 2019, the company announced three configurations of the pickup truck: the entry-level model with one motor, the one with two motors, and the one with three. Rumor has it that the company intends to abandon the single-motor version altogether. In this case, Tesla Cybertruck will be sold with two, three, and four motors. Musk has promised to provide an update on the pickup's roadmap on the next earnings call. The production of Tesla Cybertruck is expected to begin at the end of 2022, and its mass production is slated to start in 2023.",
"summary": "Tesla CEO Elon Musk has revealed new details about the upcoming Cybertruck electric pickup truck. According to Musk, its initial production will begin with a four-motor variant.",
"url": "https://internetprotocol.co/hitech/2021/12/07/tesla-to-release-a-four-motor-cybertruck/",
"image": "https://internetprotocol.co/content/images/2021/12/Tesla-to-Release-a-Four-Motor-Version-of-Cybertruck.png",
"author": "Kay Lee",
"language": "en",
"source_country": "co",
"sentiment": 0.712523
},...
]
}
Extract a news article from a website to a well structure JSON object.
{
"title": "Tesla to Release a Four-Motor Version of Cybertruck",
"text": "Tesla CEO Elon Musk has revealed new details about the upcoming Cybertruck electric pickup truck, the mass production of which was delayed until 2023 because of the lack of components and a lot of complex technologies that need to be scaled up. According to Musk, the initial production of the electric pickup truck will begin with a four-motor variant with “independent, ultra fast response torque control of each wheel,” the tweet reads. In response, Twitter users asked if the Cybertruck could turn like a tank. Musk said that thanks to both the rear and front wheel steer, the electric truck will not only be able to turn like a tank, but also drive diagonally like a crab. According to Electrek, this change could be Tesla's reaction to what its competitors do. Since the introduction of Tesla’s novelty, the market for electric pickup trucks has significantly evolved. Currently, one electric pickup on the market can turn like a tank – the Rivian R1T, while GMC's Hummer EV can drive diagonally. Following the announcement of Tesla Cybertruck in 2019, the company announced three configurations of the pickup truck: the entry-level model with one motor, the one with two motors, and the one with three. Rumor has it that the company intends to abandon the single-motor version altogether. In this case, Tesla Cybertruck will be sold with two, three, and four motors. Musk has promised to provide an update on the pickup's roadmap on the next earnings call. The production of Tesla Cybertruck is expected to begin at the end of 2022, and its mass production is slated to start in 2023.",
"url": "https://internetprotocol.co/hitech/2021/12/07/tesla-to-release-a-four-motor-cybertruck/",
"image": "https://internetprotocol.co/content/images/2021/12/Tesla-to-Release-a-Four-Motor-Version-of-Cybertruck.png",
"author": "Kay Lee",
"language": "en",
"source_country": "co",
"sentiment": 0.712523
}
Retrieve the latitude and longitude of a location name. Given this information you can fill the location-filter
parameter in the news search endpoint.
{
"latitude": 35.652832,
"longitude": 139.839478,
"city": "Tokyo"
}
The news search API allows you to filter and search for semantic entities. Entities are concepts that share a specific meaning but can be addressed with different names. For example, the entity "USA" has alternative names such as "US" or "United States of America" but they all refer to the same country.
When filtering for news by a certain entity, you don't have to worry about the synonym to use as the API will normalize it and find all instances of the concept regardless of the synonym you use. For example, it makes no difference whether you search for LOC:USA
or LOC:United States of America
The following table shows all supported types with examples of how to use them in the entities
filter in the news search endpoint.
Type | Code | Example |
---|---|---|
Location | LOC | LOC:Ireland |
Person | PER | PER:Michael Jordan |
Organization | ORG | ORG:Tesla |
Language | Code (ISO 6391) |
---|---|
Afar | aa |
Amharic | am |
Arabic | ar |
Bengali | bn |
Bosnian | bs |
Bulgarian | bg |
Burmese | my |
Chinese | zh |
Croatian | hr |
Czech | cs |
Danish | da |
Dutch | nl |
English | en |
Estonian | et |
Finnish | fi |
French | fr |
German | de |
Greek | el |
Hebrew | he |
Hindi | hi |
Hungarian | hu |
Icelandic | is |
Indonesian | id |
Italian | it |
Japanese | ja |
Korean | ko |
Lao | lo |
Latvian | lv |
Lithuanian | lt |
Macedonian | mk |
Malay | ms |
Maltese | mt |
Marathi | mr |
Māori | mi |
Nepali | ne |
Norwegian | nb |
Norwegian | no |
Persian | fa |
Polish | pl |
Portuguese | pt |
Romanian | ro |
Russian | ru |
Serbian | sr |
Sinhalese | si |
Slovak | sk |
Slovene | sl |
Somali | so |
Spanish | es |
Swedish | sv |
Tajik | tg |
Tamil | ta |
Telugu | te |
Thai | th |
Ukrainian | uk |
Urdu | ur |
Vietnamese | vi |
Country | Code (ISO 3166) |
---|---|
Afghanistan | af |
Albania | al |
Algeria | dz |
American Samoa | as |
Anguilla | ai |
Australia | au |
Austria | at |
Bahamas | bs |
Bahrain | bh |
Bangladesh | bd |
Barbados | bb |
Belarus | by |
Belgium | be |
Belize | bz |
Benin | bj |
Bermuda | bm |
Bhutan | bt |
Bosnia And Herzegovina | ba |
Bouvet Island | bv |
Brazil | br |
British Indian Ocean Territory | io |
Brunei Darussalam | bn |
Bulgaria | bg |
Burkina Faso | bf |
Burundi | bi |
Cambodia | kh |
Cameroon | cm |
Canada | ca |
Cape Verde | cv |
Central African Republic | cf |
Chile | cl |
China | cn |
Colombia | co |
Comoros | km |
Congo, Democratic Republic Of The | cd |
Congo, Republic Of The | cg |
Costa Rica | cr |
Cote D'ivoire | ci |
Croatia | hr |
Cuba | cu |
Cyprus | cy |
Czech Republic | cz |
Denmark | dk |
Djibouti | dj |
Dominican Republic | do |
Ecuador | ec |
Egypt | eg |
El Salvador | sv |
Eritrea | er |
Ethiopia | et |
Europe | eu |
Fiji | fj |
Finland | fi |
France | fr |
French Guiana | gf |
French Polynesia | pf |
Gambia | gm |
Germany | de |
Ghana | gh |
Greece | gr |
Guatemala | gt |
Guinea | gn |
Guyana | gy |
Honduras | hn |
Hong Kong | hk |
Hungary | hu |
Iceland | is |
India | in |
Indonesia | id |
Iran | ir |
Iraq | iq |
Ireland | ie |
Israel | il |
Italy | it |
Japan | jp |
Jordan | jo |
Kazakhstan | kz |
Kenya | ke |
Kuwait | kw |
Laos | la |
Latvia | lv |
Lebanon | lb |
Lesotho | ls |
Liberia | lr |
Liechtenstein | li |
Lithuania | lt |
Luxembourg | lu |
Macedonia | mk |
Madagascar | mg |
Malawi | mw |
Malaysia | my |
Maldives | mv |
Mali | ml |
Malta | mt |
Mauritania | mr |
Mauritius | mu |
Mexico | mx |
Micronesia, Federated States Of | fm |
Moldova | md |
Monaco | mc |
Montenegro | me |
Montserrat | ms |
Morocco | ma |
Myanmar | mm |
Namibia | na |
Nepal | np |
Netherlands | nl |
New Zealand | nz |
Niger | ne |
Nigeria | ng |
North Korea | kp |
Norway | no |
Oman | om |
Pakistan | pk |
Palestinian Territory | ps |
Paraguay | py |
Peru | pe |
Philippines | ph |
Poland | pl |
Portugal | pt |
Qatar | qa |
Romania | ro |
Russia | ru |
Rwanda | rw |
Saint Kitts And Nevis | kn |
Saint Vincent And The Grenadines | vc |
San Marino | sm |
Saudi Arabia | sa |
Senegal | sn |
Serbia | rs |
Seychelles | sc |
Sierra Leone | sl |
Singapore | sg |
Slovakia | sk |
Slovenia | si |
Solomon Islands | sb |
Somalia | so |
South Africa | za |
South Korea | kr |
Spain | es |
Sri Lanka | lk |
Suriname | sr |
Swaziland | sz |
Sweden | se |
Switzerland | ch |
Syria | sy |
Taiwan | tw |
Tajikistan | tj |
Thailand | th |
Timor-leste | tl |
Togo | tg |
Tonga | to |
Trinidad And Tobago | tt |
Tuvalu | tv |
Uganda | ug |
United Arab Emirates | ae |
United Kingdom | uk |
United States Of America | us |
Uruguay | uy |
Uzbekistan | uz |
Vanuatu | vu |
Zambia | zm |
When you are on the free plan and your daily quota is used up, the API will respond with the error code 402 and no more calls can be made until your quota resets.
You have complete control over your quota by looking at your console dashboard and checking the API response headers that appear with every answer from the API. These response headers are:
X-API-Quota-Request
: The number of points used by the request.X-API-Quota-Used
: The number of points used in total today. This number resets to zero at midnight UTC (click here to compare to your local time zone).X-API-Quota-Left
: The number of points left today (depends on your plan).There is a limit of how many requests you can make per second. The limits depend on the plan you are on. If you try making more requests you will receive a 429 error.
To use the API you need an API key. You can get a free one by simply signing up here.
Once you have your API key, you have to put it in the request URL for every request you make like so ?api-key=YOUR-API-KEY.
Attention: Only the first query parameter is prefixed with a ? (question mark), all subsequent ones will be prefixed with a & (ampersand). That is how URLs work and nothing related to our API. Here's a full example with two parameters api-key
and text
: https://api.worldnewsapi.com/search-news?api-key=YOUR-API-KEY&text=tesla.
Alternatively, you can put the API key in the request header as x-api-key
.