If you have a product or service and offer academic discounts, there's a good chance there's some manual component to the approval process. Perhaps .edu email addresses are automatically approved because, for the most part at least, they're associated with American post-secondary educational institutions. Perhaps .ac.uk email addresses are automatically approved because they're guaranteed to belong to British universities and colleges. Unfortunately, not every country has an education-specific TLD (Top Level Domain) and plenty of schools use .com or .net.
Swot is a community-driven or crowdsourced library for verifying that domain names and email addresses are tied to a legitimate university of college - more specifically, an academic institution providing higher education in tertiary, quaternary or any other kind of post-secondary education in any country in the world.
Pop quiz: Which of the following domain names should be eligible for an academic discount? stanford.edu, america.edu, duep.edu, gla.ac.uk, wunizar.es, usask.ca, hil.no, unze.ba, fu-berlin.de, ecla.de, bvb.de, lsmu.com. Answers at the foot of the page.
Swot is a Ruby gem, so you'll need a little Ruby-fu to get it working. Simply
gem install swot
Or add this to your Gemfile before doing a bundle install:
gem 'swot'
Swot::is_academic? 'lreilly@stanford.edu' # true
Swot::is_academic? 'lreilly@strath.ac.uk' # true
Swot::is_academic? 'lreilly@soft-eng.strath.ac.uk' # true
Swot::is_academic? 'pedro@ugr.es' # true
Swot::is_academic? 'lee@uottawa.ca' # true
Swot::is_academic? 'lee@leerilly.net' # false