Get Latest News By City, State, Country

Get near real time news articles published in local newspapers and other media outlets by specifying a region (city, state) and country.

This API endpoint is excellent for fetching local and regional news.

Fetch local news using city, state, country as input

Input

import requests

url = "https://specrom-news-api.p.rapidapi.com/"

payload = {
  "api_type": "news_by_city_country",
  "country": "US",
  "region": "Atlanta, GA"
}
headers = {
  "content-type": "application/json",
  "X-RapidAPI-Key": "API_key",
  "X-RapidAPI-Host": "specrom-news-api.p.rapidapi.com"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)
	
	POST / HTTP/1.1
Content-Type: application/json
X-Rapidapi-Key: API_key
X-Rapidapi-Host: specrom-news-api.p.rapidapi.com
Host: specrom-news-api.p.rapidapi.com
Content-Length: 96

{
    "api_type": "news_by_city_country",
    "country": "US",
    "region": "Atlanta, GA"
}
	
	
Parameter Description
api_type news_by_city_country
country two digit country code
region city name followed by state code

A list of country codes are below


Country Country Code
USA US
Japan JP
United Kingdom UK
Spain ES
Canada CA
Deutschland DE
Italia IT
France FR
Australia AU
Taiwan TW
Nederland NL
Brasil BR
Turkey TR
Belgium BE
Greece GR
India IN
Mexico MX
Denmark DK
Argentina AR
Switzerland CH
Chile CL
Austria AT
Korea KR
Ireland IE
Colombia CO
Poland PL
Portugal PT
Pakistan PK

Output


{
  "article_list": [
    {
      "source url": "https://www.wsbtv.com",
      "source name": "WSB Atlanta",
      "published_date": "Fri, 07 Apr 2023 00:49:00 GMT",
      "title": "Credit union members say their money being held hostage, can’t access funds - WSB Atlanta",
      "url_id": "O8sAqcnybFac+cCXoC/TYt4Wwn5V+FmLjbXhqb98G0qrCZdRnAYHraHKEITnpaXK0J9+5t++Ccd0ddV8HIed/rayUGYk3zqWEHocNJuTD23tEwEhz1td+LENnUbwNS+0xPYlHTgC0p/AT3cU0KqcX+aAIRI8iSwgYj/ChiW31+Vlh1qFp4RFejj8SoGj1lD20vx9redXFlhKj7m/rIkSfTVHbOq+DpmapNZdNjB3lvgAn7DVwNcA5g+gbt0WvHLc4gVRfkjHu3+QjaimG6QPwk4fhJpZWPPR/r8kxMxSkjNbkFvxpgsitCAhc+ryo/wZAahCVR9n0Z9B6MtCN42XcHzuh2JhHZz7twcg0uSFcYXZDsDWtRUxZ4NMddEvOonxMLEOx+6dYS0MSadPK65iHDpVUcGkUHD+O+Nl9b12/1EUGNF6rQ8GPH3GuVu90ky4KJV5DbiH8oPm1+3C7JOa+FiqmB86zP5k9cZ2QyrGexKcOym7ywneq6PSo9hPJS0cvVCY/jilk4r01mT22Tdf9HrlbPvYkbYBbhePiIadMDPAdYDK1GJncq208uSOh+Sf2O+iAIIdSjEXGatgRNYSZTc7*f8QvuCUSqeMUelzr87slBA==*cnjF1ZxjpZgeXTHFwVsazQ==*MkCp3nEWhsKyC4fFJU9XjQ=="
    },
    {
      "source url": "https://www.wsbtv.com",
      "source name": "WSB Atlanta",
      "published_date": "Fri, 07 Apr 2023 02:59:00 GMT",
      "title": "Training facility back in compliance after stop work order issued, order to be lifted Friday morning - WSB Atlanta",
      "url_id": "NjEV3/1FQf8ffd3Ey5AtAYDsZ2I7X4qmI+hVWNX9asd4xPf8ARn3VowPd6A4WQHhrjTO+etcIqKlAjN9sCQQWAImueJVxzPWl69eBaeS2VlpmJ6GcaJlrpCGlj8wJYLwXg2JsvjU6mJnYYF4NCY6dV+Rl+Ng/ilfGCKoe+FBCAbnMpFbX+vOw3bxp7VwnndM+0J5DGZVfO4U/Npu9eX25E8uGVawfctsbBB11p72+0pqQjsYPFBani+ioiR+Xnq7srLMZ8ta5U0lvkAJ3Ya4bc8aMDlb+GAww2zWvugMRH14npLO8SNMY1GbA6cMhtEMbXCLsLALqXotRMFIt3pr67EJ5CMEINdSn3To7lMId9y1vSRfHvtvqNktlXFs+Y3a6QSmq4/8RJE2Zd+m5MNkPGc3b5YtsXab53ohf2fxILlePq7oPqdJWsQ4/gp/z5gsvvwRzdcdDnkc8NJBYn4ZjS1hA1P3CCZHdkFtcOx/J8n+vGHygkgoXW6VvmC3r8SyKvvvN4PmCZyH8z7suLGbPToQviPIAwp94HRkb1bOINAUdxbOEtKoF5MgOLsF7lI8ClW7IJ4Ge3Dz5jCKLQVbzwHyAmcZdnYsEuVdDYjb5LgpORCWSh+xhw==*LgI2UsNQctdt3mLM4TFArg==*6kVcegsMBPGdTGK0X7YHAg==*Gm1QJtk0CUrYnX97xKY0mw=="
    },
    .
	.
	.
	(Output Truncated)
	
	
    }
  ]
}
Parameter Description
article_list A list of dictionaries containing individual news articles
source url web domain of the media outlet
source name name of the media outlet
publishedAt date of the news article
title title of the news article
url_id unique url_id of the news article. Use our separate endpoint called fetch news article by url_id to fetch complete details such as full_text, author, url etc. of the news article