🌐
GitHub
github.com › public-apis › public-apis
GitHub - public-apis/public-apis: A collective list of free APIs · GitHub
1 week ago - A collective list of free APIs. Contribute to public-apis/public-apis development by creating an account on GitHub.
🌐
GitHub
docs.github.com › en › rest
GitHub REST API documentation - GitHub Docs
You can authenticate to the REST API to access more endpoints and have a higher rate limit. ... The GitHub REST API is fully described in an OpenAPI compliant document.
Discussions

How to get a file via GitHub APIs - Stack Overflow
I need to get the contents of a file hosted in a GitHub repo. I'd prefer to get a JSON response with metadata along with it. I've tried numerous URLs with cURL with to only get a response of {"mess... More on stackoverflow.com
🌐 stackoverflow.com
How do you utilize GitHub's API to enhance your workflows or integrate with other tools?
Create a Linux package repository for softwares that doesn't have their own https://github.com/xlionjuan/rustdesk-apt-repo-latest/blob/main/rustdesk_latest.sh (The API part you said) More on reddit.com
🌐 r/github
6
0
February 11, 2026
GitHub API - how to retrieve repos relevant for me? - Stack Overflow
I work in a large organization where we use GitHub. We would like to make an API call (REST or GraphQL) to GitHub to retrieve repos that are interesting to a specific logged in user - me for examp... More on stackoverflow.com
🌐 stackoverflow.com
Looking for github links or something that has some rest api scripts I can review and try to learn from
https://github.com/tableau/rest-api-samples/tree/master/python This isn't my repo but I've worked with the Tableau REST api before and it looks sort of similar. For some advice I would highly recommend using PostMan to set up the request and then use their built in ability to directly generate python code. After you have the generated code you can slightly modify / clean it up if you want a function to pass parameters or something. More on reddit.com
🌐 r/learnpython
8
19
August 31, 2021
🌐
GitHub
github.com › topics › github-api
github-api · GitHub Topics · GitHub
The GitHub API provides endpoints for users to consume GitHub data as well as make changes on a user’s behalf. The latest version is v4, the GraphQL API.
🌐
Free APIs
free-apis.github.io
Free APIs
An open-source collection of free APIs for web developers.
🌐
LoginRadius
loginradius.com › home
Introduction to Github APIs
February 17, 2026 - Request type: POST API endpoint: /user/{repos} Required data: name · Example :- curl -H "Authorization: token ${token}" -d '{"name":"Github API Testing"}' https://api.github.com/user/repos
🌐
OpenClassrooms
openclassrooms.com › us › courses › 7646551-build-your-web-projects-with-rest-apis › 7739275-learn-how-to-use-the-github-api
Learn How to Use the GitHub API - OpenClassrooms
Go to GitHub's documentation to see the correct endpoint: POST user/repos. Add your authentication token to your header parameters using Postman. Add your repository details into your message body in JSON using Postman. See that once you make a successful request with your API, the repo shows up on your GitHub profile UI!
🌐
GitHub
docs.github.com › rest › guides › getting-started-with-the-rest-api
Getting started with the REST API - GitHub Docs
Some common HTTP methods are GET, POST, DELETE, and PATCH. The REST API reference documentation provides the HTTP method for every endpoint. For example, the HTTP method for the "List repository issues" endpoint is GET." Where possible, the GitHub REST API strives to use an appropriate HTTP method for each action.
🌐
GitHub Developer
octokit.github.io › routes › cache › api.github.com › v3 › index.html
GitHub API v3 | GitHub Developer Guide
If you have any problems or requests, please contact GitHub Support or GitHub Premium Support. ... By default, all requests to https://api.github.com receive the v3 version of the REST API.
Find elsewhere
🌐
GitHub
github.com › services › api-training
GitHub API Training | Expert Services | GitHub · GitHub
Explore ways to leverage GitHub’s REST v3 or GraphQL v4 APIs in this hands-on session covering API examples, webhook use cases and troubleshooting, authentication mechanisms, and best practices.
🌐
GitHub
docs.github.com › en › rest › repos › contents
REST API endpoints for repository contents - GitHub Docs
curl -L \ -X PUT \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/repos/OWNER/REPO/contents/PATH \ -d '{"message":"my commit message","committer":{"name":"Monalisa Octocat","email":"octocat@github.com"},"content":"bXkgbmV3IGZpbGUgY29udGVudHM="}'
🌐
GitHub
docs.github.com › en › rest › repos › repos
REST API endpoints for repositories - GitHub Docs
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/orgs/ORG/repos
🌐
GitHub
github.com › hub4j › github-api
GitHub - hub4j/github-api: Java API for GitHub · GitHub
Java API for GitHub. Contribute to hub4j/github-api development by creating an account on GitHub.
Top answer
1 of 3
42

As the description (located at http://developer.github.com/v3/repos/contents/) says:

/repos/:owner/:repo/contents/:path

An ajax code will be:

$.ajax({
    url: readme_uri,
    dataType: 'jsonp',
    success: function(results)
    {
        var content = results.data.content;
    });

Replace the readme_uri by the proper /repos/:owner/:repo/contents/:path.

2 of 3
40

This GitHub API page provides the full reference. The API endpoint for reading a file:

https://api.github.com/repos/{username}/{repository_name}/contents/{file_path}
{
  "encoding": "base64",
  "size": 5362,
  "name": "README.md",
  "content": "encoded content ...",
  "sha": "3d21ec53a331a6f037a91c368710b99387d012c1",
  ...
}
  • Consider using a personal access token
    • Rate-limits (up to 60 per-hour for anonymous, up to 5,000 per-hour for authenticated) read more
    • Enable accessing files in private repos
  • The file content in the response is base64 encoded string

Using curl

Reading https://github.com/airbnb/javascript/blob/master/package.json using GitHub's API via curl:

curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/airbnb/javascript/contents/package.json
  • Make sure to pass header Accept: application/vnd.github.v3.raw to get raw file response (thanks jakub.g)

Using Python

Reading https://github.com/airbnb/javascript/blob/master/package.json using GitHub's API in Python:

import base64
import json
import requests
import os


def github_read_file(username, repository_name, file_path, github_token=None):
    headers = {}
    if github_token:
        headers['Authorization'] = f"token {github_token}"
        
    url = f'https://api.github.com/repos/{username}/{repository_name}/contents/{file_path}'
    r = requests.get(url, headers=headers)
    r.raise_for_status()
    data = r.json()
    file_content = data['content']
    file_content_encoding = data.get('encoding')
    if file_content_encoding == 'base64':
        file_content = base64.b64decode(file_content).decode()

    return file_content


def main():
    github_token = os.environ['GITHUB_TOKEN']
    username = 'airbnb'
    repository_name = 'javascript'
    file_path = 'package.json'
    file_content = github_read_file(username, repository_name, file_path, github_token=github_token)
    data = json.loads(file_content)
    print(data['name'])


if __name__ == '__main__':
    main()
  • Define an environment variable GITHUB_TOKEN before running
🌐
YouTube
youtube.com › watch
GitHub API Tutorial | 2023 - YouTube
In this GitHub API Tutorial, I show you step by step how to make API calls to the GitHub API!Download GitHub API Postman Collection for Free: https://andyste...
Published: September 23, 2023
Views: 4K
🌐
GitHub
github.com › topics › api
api · GitHub Topics · GitHub
1 month ago - By extracting the implementation and relinquishing data into objects, an API simplifies programming.
🌐
Reddit
reddit.com › r/github › how do you utilize github's api to enhance your workflows or integrate with other tools?
r/github on Reddit: How do you utilize GitHub's API to enhance your workflows or integrate with other tools?
February 11, 2026 -

I've been exploring the capabilities of GitHub's API and how it can streamline various workflows. From automating tasks to integrating with other applications, the API offers a wealth of possibilities for enhancing productivity. I'm particularly interested in hearing how others have leveraged the API in their projects.

What are some specific use cases you've implemented?
For instance, have you created custom scripts to manage issues, pull requests, or even automate deployment processes?
Additionally, what challenges did you face while working with the API, and how did you overcome them?

Sharing insights and experiences can help us all better utilize GitHub's powerful features and improve our development processes. Let's discuss!

Top answer
1 of 1
1

I cross posted the question on the GitHub community after I quickly got a -1 vote for some unknown reason here. For anyone who has the same issue, here is a useful answer: https://github.com/orgs/community/discussions/151261 (and I suggest using the community, as the response was quick and impressive)

The following is a copy & paste of that answer:
-- start copy & paste --

Fetching all repositories a user has contributed to within a large organization in a single API call is quite challenging due to GitHub's current API limitations. However, here are some approaches that might help:

Using GraphQL API (Efficient Querying)

GitHub's GraphQL API provides a way to query user contributions without looping over repositories manually.

Using contributionsCollection to Fetch Contributed Repos The following query retrieves repositories where a user has made commit contributions:

{
  user(login: "YourGitHubUsername") {
    contributionsCollection {
      commitContributionsByRepository(maxRepositories: 100) {
        repository {
          name
          owner {
            login
          }
        }
      }
    }
  }
}

🔹 To include pull request contributions, extend the query:

{
  user(login: "YourGitHubUsername") {
    contributionsCollection {
      pullRequestContributionsByRepository(maxRepositories: 100) {
        repository {
          name
          owner {
            login
          }
        }
      }
    }
  }
}

Using GitHub Search API (REST Alternative)

The Search API supports finding repositories where a user is a contributor:

GET https://api.github.com/search/repositories?q=user:YourGitHubUsername

Consider OctoKit for Optimization

Using OctoKit can streamline GraphQL requests with better pagination handling and performance.

Conclusion

There’s no single API call that directly fetches all contributed repositories across an organization, but the GraphQL contributionsCollection is the closest built-in solution. If you need a broader dataset, batching API calls and caching results daily may still be required.

-- end of copy & paste --

In addition, on the company slack channel someone suggested looking into viewer.topRepositories, as the documentation for it says

Repositories the user has contributed to, ordered by contribution rank, plus repositories the user has created.

We didn't get around to testing this as we ended up using the GraphQL query above.

🌐
AI Tinkerers
nyc.aitinkerers.org › technologies › github-api
GitHub API Projects
September 12, 2026 - Programmatically access and automate GitHub features: manage repositories, issues, pull requests, and CI/CD workflows via REST and GraphQL endpoints.
🌐
GitHub
docs.github.com › en › rest › releases › releases
REST API endpoints for releases - GitHub Docs
For more information, see "Getting started with the REST API." This endpoint works with the following fine-grained token types: ... This endpoint can be used without authentication or the aforementioned permissions if only public resources are requested. ... curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/repos/OWNER/REPO/releases/RELEASE_ID
🌐
GitHub
github.com › topics › apis
apis · GitHub Topics · GitHub
A curated list of free public APIs — searchable, community-maintained, with a free JSON API.