What is it?

The Neil deGrasse Tyson Quote API offers JSON formatted quotes for your consumption. Currently there is no rate limit on the API

How to use it

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>