Get quotes from one of the greatest science communicators of our time via API!
The Neil deGrasse Tyson Quote API offers JSON formatted quotes for your consumption. Currently there is no rate limit on the API
Grab a a random quote by going to /quote_api/random. Grab a specific quote by going to /quote/[id].json where [id] is the id of the quote you want. Such as /quotes/1.json
Want to embed a random quote in your website? Just paste in the snippet below:
<div id="ndgtQuote"></div>
<script type="text/javascript">
function ndgtParse(response) {
var div = document.getElementById('ndgtQuote');
div.innerHTML = response.quote + "<br />- Neil deGrasse Tyson";
}
var url = "http://www.neildegrassetysonquotes.com/quote_api/random.jsonp?callback=ndgtParse";
var script = document.createElement('script');
script.setAttribute('src', url);
document.getElementsByTagName('head')[0].appendChild(script);
</script>