6.7. API based Web Programming¶
A growing trend among web based services is to provide application programming interface (API). This allows programmers to write applications that work with the service by issuing simple HTTP requests. The returned data from the requests is usually an XML document. This is much preferred to scrapping and parsing HTML because changes to a web page, do not break the program that you write.
A couple simple examples of this are The US Postal Service (also pyusps ) and Twitter. Note that the page referenced here for the Postal Service is just for the zip code database. They also have APIs for other services, such as tracking packages.