Improve your contact center performance. See how you can make a difference.
Watch Now
Engage and build your ICT audience with CIOL online advertising.
Know more
What about a site that doesn't have a good feed? Or doesn't have one at all? If you find yourself wanting to use content and functionality from a website that doesn't provide an API or a feed, or whose web services don't meet your needs, you still have some choices. First of all, many sites do have APIs that they do not expose except to their partners. There are others that provide them to affiliate networks, so joining such a network will give you access.
Parsing & Storing/Crawling APIs are accessed by programmatically calling a URL and downloading the results given back. Generally the returned content of an API is XML or JSON. RSS and Atom feeds are in XML. This allows you, as a developer, to easily parse the content and do what you want with it. Depending on your application, there are a few ways in which you can access and work with this structured content.
One common method is to access and parse the content on the fly as the result of a user action. For example, let's say you provide a feature that allows your users to search for hotels in a specific city. When the user provides the city and dates of interest, your code would access the APIs of one or more hotel sites, passing the city and dates, to get availability, parse the returned results, and display them to the user immediately. This approach is most useful when you need very fresh data and when you cannot anticipate the values your users are going to search for. The downsides to this method are that there is latency associated with accessing the API (ie, your user must wait) and your site causes a lot of traffic on the API of the remote website. Also, if the remote site goes down, your users will not have access to this feature.
To address the downsides of the on-the-fly method, as well as to allow greater flexibility with how you filter, sort, and modify the returned data, your code can access the content from an API 'offline.' This means that you have some process that runs regularly (not as a result of some user's action) to download the data from a website's API or feed and then store it for access later. The most common place to store such data is in a database (like MySQL) or a search engine (like Lucene/Solr), but you could even store the XML files directly on disk and access them locally.
Earning money Regardless of whether you choose to build your website as a business or just a personal project, it never hurts to earn a little revenue from your efforts. While you're unlikely to generate a lot of revenue unless your application is heavily used, it can still be valuable to integrate with 'affiliate programs' of websites whose content you are using. Most websites that sell directly to consumers participate in affiliate programs. These programs share revenue with application developers who send consumers to their site when those consumers make a purchase. So, for instance, if you incorporate a feature into your application that allows users to search for hotels and a user subsequently books a hotel that you sent them to, then you could receive a commission on the sale.
Affiliate networks work by providing you with an 'affiliate ID' which you then pass as an argument in the URL when you send a user to the website selling a product. The network tracks any sales from that user and associate the revenue share with your affiliate account. Revenue share can range from pennies to large sums depending on the type of item and size of sale.
Legal issues Whenever you work with someone else's content, you should be aware of any legal implications that your actions may have. Regardless of the method you use to obtain the content, make sure you refer to the website's terms of use. Unless explicitly stated otherwise in the terms of use, you will need the direct permission of the website owner to use his or her content.
Conclusion As a developer, you have the entire web at your disposal when building your applications. By harnessing the content and functionality already available on the web, you can focus on what you do best while still providing many rich features. The websites whose content you use will benefit by being exposed to a wider audience and your users' experience will be enriched.
Jon Aizen, co-founder and CTO, Dapper
<< PREVIOUS