Get today's breaking news from Libya
GET https://api.worldnewsapi.com/top-news?source-country=ly&language=en See the full documentation of how to get news headlines.
News sources by country · Africa
World News API is a Libyan news API: it monitors 6 news sources in Libya and returns over 13 articles a day from them as JSON.
The country code for Libya is ly. For every API endpoint that asks for source-country, just put ly to retrieve news from Libya. The main language code of Libya is en; use this two-letter code for the language parameter. Historically, you can search news from Libya starting January 1, 2022.
Free news API key with 50 points a day. No credit card required.
API examples
Here are some examples of how you can get breaking news and search by category for Libya. Be sure to check out the in-depth documentation, as each API offers many different parameters to explore.
GET https://api.worldnewsapi.com/top-news?source-country=ly&language=en See the full documentation of how to get news headlines.
GET https://api.worldnewsapi.com/search-news?source-country=ly See the full documentation of how to search news.
GET https://api.worldnewsapi.com/search-news?source-country=ly&categories=politics See the full documentation of how to search news by category.
Ask for ten articles from sources in Libya, in its main language, and print the publish date, title and URL of each. The same request works from any language.
source-countryly, outlets based in Libyalanguageen, articles in that languagenumber10 articles per requestimport requests response = requests.get( "https://api.worldnewsapi.com/search-news", params={"source-country": "ly", "language": "en", "number": 10}, headers={"x-api-key": "YOUR_API_KEY"}, ) for article in response.json()["news"]: print(article["publish_date"], article["title"], article["url"])
curl "https://api.worldnewsapi.com/search-news?source-country=ly&language=en&number=10" \ -H "x-api-key: YOUR_API_KEY"
const url = "https://api.worldnewsapi.com/search-news" + "?source-country=ly&language=en&number=10"; const res = await fetch(url, { headers: { "x-api-key": "YOUR_API_KEY" }, }); for (const article of (await res.json()).news) { console.log(article.publish_date, article.title, article.url); }
Live from the API
Here are the top headlines from Libya of the last full day, fetched by the breaking news API and ranked by how many sources covered each story.
No headlines from Libya could be loaded right now. The request on the right shows how to get them.
{
"top_news": [
{ "news": [
{ "title": "...",
"url": "..." },
... more articles on this story
] },
... more stories
],
"language": "en",
"country": "ly"
} If a news media outlet from Libya is missing, please reach out via our Discord or by email.
Suggest a news sourceWorld News API currently monitors 6 news sources from Libya, adding over 13 news articles daily. Sources include major national outlets, regional newspapers, and online news media.
You can use the Top News endpoint for breaking headlines and the Search News endpoint to search by keyword or category. Use the country code ly with the source-country parameter.
Yes, World News API stores news from Libya starting from January 1, 2022. Use the earliest-publish-date and latest-publish-date parameters in the Search News endpoint to query historical articles. The Free and Starter plans cover the last month; Reporter and higher plans cover the whole history.
News from Libya is primarily available in the language code en. You can filter by language using the language parameter on any search endpoint. World News API supports 86+ languages across all its sources.
Yes. Add categories=business to a Search News request with source-country=ly. The category filter can leave out news, especially in non-English languages; if too few results come back, search with the text parameter instead.
Yes. World News API offers a free plan with 50 daily API points, enough to start building and testing with Libyan news data. Sign up for a free API key to get started. Paid plans start at $39/month for higher volume needs.
Countries near Libya or with the same language:
Create a free key, add source-country=ly to your request and read the results as JSON.