Originally published on my blog GitHub Gist Logo ( ) https://github.com/logos While working on my side-projects ( and ), I had to get data from GitHub Gists. Here are the three ways to do it: UnMarkDocs Webslides 1. The JS way This is the way to do it, the one that is . It consists on adding and including it in an script tag: official mentioned in the GitHub Documentation .js 2. The JSON way Adding to the end of the Gist URL returns something like this: .json This is very useful when working with Gists server-side 3. GitHub API Of course, you can use the GitHub API to get this content. According to the , you have to make a request to where Gist ID is the part of the URL that appears after your username. API documentation GET https://api.github.com/gists/$GIST_ID Here’s an example response: About the Author 👋 Hi! I’m Miguel Piedrafita, a 15-year-old PHP artisan and open-source lover. How about ? connecting on Twitter Originally published at dev.to .