Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get current news for a location

Is it possible in an iOS application to get current news for a particular location ? Is there some api available where I can pass location as parameter and get news for that location ?

like image 282
Nitish Avatar asked Jun 03 '13 12:06

Nitish


People also ask

Can I get local news on Google?

You can change your settings on Google News to get local news about specific cities. Under 'Local', tap Add location or View all and manage.

How do I get local news notifications?

For Android: Google News If your handset doesn't, you can download it for free (it's also available for free on iOS). The app takes what the search engine knows about you—from past searches to your location—and uses that information to serve up story snippets and breaking news that may interest you.

How do I get Google to play the news?

On your Android phone or tablet, say "Hey Google, open Assistant settings." Or, go to Assistant settings. News. Add or remove news sources.


1 Answers

For local news in the US, you can use the Patch api, it allows you to get news for a zip code, state, or even down to a neighbourhood.

here are some examples from their API page:

News for a zip code

http://news-api.patch.com/v1.1/zipcodes/{ZIP}/stories?dev_key={key}&sig={signature}

News for a state

http://news-api.patch.com/v1.1/states/{state name}/stories?dev_key={key}&sig={signature}

News for a City

http://news-api.patch.com/v1.0/states/ca/cities/san%20francisco/stories?dev_key={key}&sig={signature}

News using GPS coordinates

http://news-api.patch.com/v1.1/nearby/{latitude},{longitude}/stories?dev_key={key}&sig={signature}

Response will contain lots of metadata, a title, a story, attachments, and even GPS coordinates of the location of the news items returned, with tons of other features

Now the down side this is US only, there are many other APIs out there that you can use for different countries, here's the BBC API for example Update:This is down now

You can grab news data from places, like this call http://api.bbcnews.appengine.co.uk/stories/uk Update: This is also down. You may use their RSS feeds instead.

Also CNN has it's news RSS feed Where you can fetch RSS data about news in many locations

  • World
  • Africa
  • Americas
  • Asia
  • Europe
  • Middle East
  • U.S.

I'm pretty sure there are tons of other APIs out there, one of my favorites is the Ushahidi network

They have a public API that also has location tags for news items, you can learn more here

I think this is quite enough to get you started and to show you the possibilities of open APIs, if you need more details please let me know, I'm pretty sure there's more out there if you search right !

like image 157
Mostafa Berg Avatar answered Oct 03 '22 02:10

Mostafa Berg