API Documentation Changes

my import·io hackathon participation

Description

This hack will automatically find changes in the documentation of thousands of different APIs and generate alerts of those changes as they happen.

How does it work?

The Mashape API Marketplace Public API Directory is periodically crawled by two import·io crawlers:

  1. the first crawler grabs the URL of each API available on the list;
  2. the second crawler reads each API page and grabs the following information:
    • the API title;
    • the API logo;
    • the API description;
    • the API documentation URL.

Then, a nodejs script iterates through the results of the first crawler and, for each API found, it calls the second crawler.

It then makes a GET HTTP request to the obtained API documentation URL, hashes the result using the SHA1 algorithm and stores the result on a file.

The second time the script runs, it compares the generated hash with the one saved previously. If both hashes are different it means that the documentation changed and an alert is emitted.

Why did I do it?

Because I'd like to see how API documentation changes over time and I figured that monitoring a large number of sources would give me a pretty good idea.

Disclaimer

The author of this project does not accept any liability for your use, interpretation or misinterpretation of the information contained on this website.

For the avoidance of confusion, the author will not be liable for any damages arising as a result of your use of this website, or any loss caused as a result of your doing, or not doing, anything as a result of viewing or reading the material or any part of it.

The author is not affiliated with, endorsed or sponsored by import·io.

License

The MIT License (MIT)

Copyright (c) 2014 Bruno Pedro

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.