Posts

Showing posts with the label APIs

Where to Watch a Movie - A Barebones Web App Using the TMDB API

Image
You want to watch a movie, but you're not sure which OTT subscription has it available. Wouldn't it be nice if we had info about ratings & availability readily available? I discovered that sites like The Movie Database (TMDB) ,  MovieOfTheNight or Watchmode have streaming availability APIs to check for availability of movies on popular streaming services in different countries . Having used TMDB in the past, I created a barebones code sample using the TMDB API to verify the streaming availability of movies on popular Indian OTT platforms like Netflix, Prime Video, SonyLIV, Hotstar, and Zee5. 

Microsoft Traffic - Bing Maps - Azure Maps

Image
The Lock Screen on my Windows PC has started showing notifications with weather, air quality, stock information and today, Traffic status. Clicking on the notification led me to the Bing Maps Traffic page. I was pleasantly surprised to see a new service name - Microsoft Traffic and within the Traffic portal, the Insights tab contained useful local information that seemed better than what's on Google Maps. I was curious about how this is built and after exploring a bit, I found that there are Bing API endpoints that are available for anyone interested in customizing this traffic information for their own applications.  Going by the documentation, the geographic coverage for India is relatively better than for most countries with coverage for Road Data/Routing, Traffic & Geocoding though not for Truck Routing. The Bing Maps API which powers this Traffic status feature will be replaced by Azure Maps .  Azure Maps is expected to bring many of the Azure security and comp...

Zomato Weather Union: Real-Time Weather Data for 60 Indian Cities via Public API

Image
As extreme weather events become more frequent and unpredictable, nowcasts are becoming more crucial than traditional forecasts, especially with phenomena like urban heat islands. These days, even the best-laid plans can fall apart if weather isn't factored in. Zomato is offering real-time weather data from 60 Indian cities through a free public API called Weather Union , gathered via a crowd-supported weather infrastructure. I've extracted the latitude and longitude of the weather stations that Zomato has provided in PDF format and shared the CSV file on GitHub . About half of these locations use an Automated Weather System, while the rest have Rain Gauge Systems that only track rainfall.  For stations with rain gauges, the API provides data only on rainfall, and fields like temperature, humidity, and wind speed return null values. I’ve created a simple code sample using Zomato's public API, which you can check on GitHub .  The sample also includes an external link that d...

Trackers

Some of these trackers even come with APIs that can be customized for your own use - Ships/Vessels Flights Satellites Wind Weather - IMD , Skymet , AccuWeather Traffic - Google Maps , Bing Maps , MapMyIndia Trains in India -  National Train Enquiry System , RailYatri.in Buses in India - for tickets purchased through Redbus W.I.P

Microsoft Cognitive Services - powerful algorithms to build custom apps with just a few lines of code

Microsoft Cognitive Services  is a collection of the following APIs: Academic Knowledge API  helps to interpret user queries for academic intent and retrieve rich information from the Microsoft Academic Graph (MAG). The MAG knowledge base is a web-scale heterogeneous entity graph comprised of entities that model scholarly activities: field of study, author, institution, paper, venue, and event. The MAG data is mined from the Bing web index as well as an in-house knowledge base from Bing. Bing Autosuggest API lets partners send a partial search query to Bing and get back a list of suggested queries that other users have searched on  Bing Image Search API provides a similar (but not exact) experience to Bing.com/Images  Bing News Search API provides a similar (but not exact) experience to Bing.com/News  Bing Speech API is a cloud-based API that provides advanced algorithms to process spoken language. With this API, developers can add speech driven actions to...

HOW TO use Bing Search v5 API with JavaScript

Taking off from the single basic JavaScript sample on the newly minted  version 5 of Bing Search API, I put together a couple of samples of my own. You'll have to sign-up for a free key  from Microsoft Cognitive Services to replace in the code samples to try them & also experiment with all the other APIs that are available Bing Search API gets not just web search results but also image, news, & videos results for a given query and allows up to 1,000 free transactions per month across all Bing Search APIs Google Custom Search API has a few additional steps & provides 100 search queries per day for free This comparison of version 2 and 5 highlights the improvements - Category Feature v2 v5 Web Search REST API x x Related searches x x Ranked Answers (image, video, news, math, time) x Deep links (for first web page result) x Adult intent signal x Image Search REST API x x Enhanced filters: image size, license...

This Week I Learned - Week #134

This Week I Learned - *  You can use Windows Server 2012 Standard for the SQL server nodes-unlike in previous Windows releases, you can enable the failover cluster feature in the Standard edition of Windows Server 2012 as well as Windows Server 2012 Datacenter. SQL Server 2012 does require the Enterprise edition of SQL Server 2012 to use the AlwaysOn feature *  SQL Server AlwaysOn Availability Groups are supported between Microsoft Azure Regions * There is a web application with code on Github that can detect a user's location and find the latency of various Azure data centers  with respect to the user. For Amazon Web Services timings, there is CloudPing.info * The whitepaper " On Designing and Deploying Internet-Scale Services " [PDF] by James Hamilton summarizes the best practices accumulated over many years in scaling some of the largest services at MSN and Windows Live * The game The Walking Dead: No Man’s Land which currently occupies #1 spot (over 1,000,0...

YouTube API Quick Reference

The YouTube API has comprehensive documentation. I wish more API providers had such detailed docs. It is a pity though that many of the Google APIs have got deprecated or removed all together. I think we should still exploit them while they are there. I compiled the parameters for YouTube API v2 Search for quick reference. Parameter Value alt atom , rss, json, json-in-script, jsonc author uploader max-results default is 25, maximum value is 50 start-index first result is 1, needed for paging caption true/false d...

Free Image Generation and Manipulation Web Services

Image
Images make content more interesting. There are many websites that offer free photos and images under liberal licensing terms. There are also many web services that can generate & manipulate images on the fly by altering values within their URLs - * Placeholder images - useful for web developers & designers when they don't have actual images yet. This link has a bunch of such image generation services which can create images of specified dimensions with color or celebrities or kittens  in them. Right click on the image, choose the option to open it in a new tab from the context menu & inspect how the URL is constructed * Google Chart API can generate dynamic Icons, Bubbles, Pins, Fun Style Notes, Weather Forecast Notes, Outlined Font Text Blocks, Contextual Icons, Flags & miscellaneous images of short sizes. You just have to specify some querystring parameters within the URL to get different types of images. * Update on 4/Sep/2015 - This f...

Publish Blog Posts by Email feature provides extensibility

Image
WordPress , Tumblr , Blogger allow you to publish blog posts by email. This extensible feature makes it possible to post even programmatically. Considering you can send emails programmatically , content can be posted through custom web interfaces or scripts without writing complicated code. I tweaked my  World Citizen News app to curate pictures on Flickr related to India & publish them to the my Bharat Darshan Tumblr blog I changed the layout of the default Tumblr template in the Settings to Grid to get the Pinterest style look. [Update - 21/Oct/2015]: Tumblr now lets you prefix a tag word with a pound-sign (“#”) in your message, and it will be removed from the text and set as a tag for the post . Sometimes email programs append text to the bottom of each sent message; to make sure this cruft doesn't get posted to your blog, put #end at the end of your Blogger post This interesting article on Digital Inspiration lists services which accept submissions via email...

TWIL - Week #32

This Week I Learned: APIs The World Bank offers free and open access to data about development in countries around the globe via multiple APIs . Many data series date back 50 years, and can be used to create interesting applications. It provides a useful API Query Builder .  World Data Test Drive is an interesting mashup referenced on the IE Blog that uses this API along with  JavaScript ECMAScript Internationalization APIs Browsers In Windows 8+, F12 developer tools is only accessible while browsing a website in Internet Explorer for the desktop. It is not available if you're browsing in the Internet Explorer in the Windows UI (earlier called Metro mode) India Education is the most favored philanthropic cause in India receiving 80% of the cumulative contributions, followed by health care sectors. HDFC Top 200 is the biggest fund in the country with a size of around Rs 9,765 crore as of August 2013... the largest fund is less than 0.2 percent o...

Free APIs, online services to generate screenshots of web pages

I've graded the answers to this StackOverflow question about APIs & online services to generate screenshots of web pages based on whether the service can be used directly without any API key or require a key: No key required: immediatenet.com kwout   API (generating screenshots is not the primary intent of kwout so it doesn't directly give you an image to save) Requires (free) API access key: URL2PNG Browshot   API GrabzIt thumbalizr   API  (Simple syntax to use the API: http://api.thumbalizr.com/?url=http://mvark.blogspot.in&width=250 ) ConvertAPI  ( Free 500 one-time credits ) There are also online tools can generate screenshots of websites: Browsershots.org WebShots Pro ShrinkTheWeb Amit Agarwal's Screen Capture tool GrabzIt

Self-awareness software

Image
A proponent of the Quantified Self movement and the co-founder of Foursquare, Naveen Selvadurai, has published a " personal API " consisting of his day-to-day personal details (related to his sleep, weight, steps, fuel/activity and checkins) as a step towards building self-awareness software. He calls it api.naveen . The data therein has been normalized from various sources: manual capture, nike fuelband, jawbone up, withings, fitbit, foursquare and various apps . Image from the Human API website The Quantified Self movement is based on the premise that by measuring and analyzing behavior, one can improve it . You’re less likely to splurge on french fries, say, if life is a game of improving your fitness and all the apps on your homescreen are keeping score . This GigaOm article informs that there are projects like the Human API ("all human data streams in one open API") which help people find value in their personal data.

HOW TO show local time for a location based on its latitude and longitude

Here is a GitHub Gist snippet that shows how to get local time for a location based on its latitude and longitude using World Weather Online's Time Zone API & jQuery - This can be useful in scenarios where you have to display time for a location relative to another.

The World Citizen News mash-up

Image
Our latest app, World Citizen News gets you: the Twitter buzz weather forecast, local time & map for popular cities around the world images of selected location from flickr news based on the trending Twitter topics It makes use of the following APIs: Twitter Trends flickr World Weather Online for the local time MapQuest  Yahoo Weather via YQL Google News Whether you're a world citizen or a geography buff, try the World Citizen News mash-up to see what's happening around the world. The following links explain how different features of the mash-up were built: Weather information for a place based on its WOEID using YQL & jQuery Finding the latitude, longitude of a location based on WOEID Local time for a location based on its latitude and longitude Display book titles in Amazon ads dynamically based on context or custom keywords

Yahoo! Weather report for India

Image
In my last post I showed  how to find weather information for a place based on its WOEID using YQL & Yahoo! Weather API . The Yahoo! API will get you weather info for ANY place that has a WOEID - including a country. How do you generalize weather conditions for a country as big and diverse as India? The current conditions description (Smoke!) made me chuckle. Also see: JavaScript: The Good Parts - photo gag "Had to scramble to get dressed when someone wanted video on a call." The trouble with Kindle is...

HOW TO find weather information for a place based on its WOEID using YQL & jQuery

There are many free Weather APIs that can fetch your weather details for a location but if you had to fetch it based on WOEID , you can turn to  YQL or the Yahoo! Query Language & Yahoo! Weather API . Interestingly, unlike other free Weather APIs, YQL can also return JSONP results over HTTPS. Here's the code (from  my first GitHub Gist ) - The default unit of measurement of the temperature in the results returned by the API, is Fahrenheit. You can specify "c" or "f" for the unit parameter to get results in Centigrade and Fahrenheit respectively. Note that lower-case "c" or "f" has to be used. Also see: Screen scrape with jQuery, AJAX, JSONP & YQL How can I bulk query the Yahoo Weather API for more than one location at a time? StackOverflow Yahoo Weather API, YQL Q & A

HOW TO find the latitude, longitude of a location based on WOEID

Yahoo! has devised a unique identifier called the Where on Earth ID, or WOEID - for almost any named place on the Earth. This is used by APIs like Twitter Trends , flickr etc. However, a majority of geo-location related APIs require latitude, longitude of a place to provide their services. So if you're building a mash-up that has to deal with latitude, longitude and WOEID, you can resolve a WOEID to a place with this call: http://where.yahooapis.com/v1/place/2507854?appid=[YourYahooAppidHere] Replace, 2507854 in the above example with the WOEID of the location whose co-ordinates you want to find. The results can be requested in XML or JSON format.

Search for free eBooks from the Google Books collection

Image
I have a fascination for public Web APIs that return results in JSON or JSONP format. I wrote a web app that simplifies the process of downloading ebooks from the Google Books collection that are free using the  Google Books API  after noticing that Google Books doesn't readily show if an out of copyright book is available for free download in PDF or EPUB format. You have to go through multiple steps using Advanced Search to find this. Luckily, Google provides a Google Books API that exposes this information and it returns the results in JSON format so that anyone can build an interface to access just filtered details. Though the books are free & old, they are invaluable, especially if you love books. You may not be able to get a physical copy of some of them even if you wanted to. Here is a list of books that I found and liked. The H5BP template's view for Mobile The app uses a responsive HTML5 Boilerplate template generated using  Initializr . Some...

Firebug simplifies programming with JSON

Image
The Developer Tools (F12 keyboard shortcut) of popular browsers show the JSON output returned by an API, like this - Firefox add-on Firebug's JSON tab within the Net tab, presents it neatly like this - This makes it easy to extract the specific details that you are after.  The above view helps to visualize how to get to a flickr photo's id on making a call using the jQuery getJSON method to one of the flickr API services - data.photos.photo[i].id