{"id":14976018,"url":"https://github.com/sodalabsio/github_scrape","last_synced_at":"2026-02-06T16:32:53.866Z","repository":{"id":190086141,"uuid":"627749409","full_name":"sodalabsio/github_scrape","owner":"sodalabsio","description":"Scraper for Github public user data across locations and time periods","archived":false,"fork":false,"pushed_at":"2023-08-23T03:32:34.000Z","size":26144,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-17T06:50:21.024Z","etag":null,"topics":["github","graphql-api","scraper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sodalabsio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-14T05:52:17.000Z","updated_at":"2023-12-21T17:04:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"08e46add-7644-4f40-9cee-532436cb97b8","html_url":"https://github.com/sodalabsio/github_scrape","commit_stats":null,"previous_names":["sodalabsio/github_scrape"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sodalabsio/github_scrape","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sodalabsio%2Fgithub_scrape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sodalabsio%2Fgithub_scrape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sodalabsio%2Fgithub_scrape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sodalabsio%2Fgithub_scrape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sodalabsio","download_url":"https://codeload.github.com/sodalabsio/github_scrape/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sodalabsio%2Fgithub_scrape/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29168496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T15:38:29.831Z","status":"ssl_error","status_checked_at":"2026-02-06T15:37:48.592Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","graphql-api","scraper"],"created_at":"2024-09-24T13:53:08.773Z","updated_at":"2026-02-06T16:32:53.847Z","avatar_url":"https://github.com/sodalabsio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Scraper\nSource code for scraping GitHub public user data across locations and time periods. We scrape the following attributes at user-level for a defined set of locations (`location`) and span of time-period (`createdAt`):\n\n1. `login`: The user's username.\n2. `name`: The user's full name.\n3. `location`: The user's location.\n4. `company`: The user's company name.\n5. `followers`: The number of followers the user has.\n6. `following`: The numbers of users the user is following.\n7. `repositories`: A list of user's repositories.\n8. `createdAt`: The date and time the user's account was created.\n9. `updatedAt`: The date and time the user's account was last updated. \n\nRead more on the user-level attributes in the official GitHub documentation here: https://docs.github.com/en/graphql/reference/objects#user\n\n\n## Run\n\n```\n# Clone the repo\ngit clone https://github.com/sodalabsio/github_scrape\n\ncd ./github_scrape\n\n# Set up conda env\nconda create -n github_scrape\nconda activate github_scrape\npip install -r requirements.txt\n\n# Define GITHUB_TOKEN environment variable\ntouch .env\ncat - \u003e .env\nGITHUB_TOKEN=\u003cpaste your github token\u003e\n\u003cPress Ctrl+d\u003e\n\n\n# Run the scraper\npython main.py\n\n# Post-processing script: remove duplicates and redundant column-headers\npython post_process.py\n```\n\n\n## Configure\n\nYou may want to modify the following arguments to adjust the locations and time-period of interest:\n- In the file `locations.py`, you can add the countries and their locations across which you want to scrape the user data in the following manner:\n    - `dict_of_locations`: \n    `{\"country_1\": [location1_1, location1_2, ..., location1_n], \n      \"country_2\": [location2_1, location2_2, ..., location2_n], ...}`\n- In the file `main.py`, you can modify the following arguments:\n    - `START_DATE`: The first date in `createdAt` defining the time-period of interest for scraping.\n    - `END_DATE`: The last date in `createdAt` defining the time-period of interest for scraping.\n    - `INTERVAL`: Number of days per query. We query users who belong to a location in a batch-wise fashion iteratively on a fixed time interval. Each query fetches users who created an account falling in the range of dates defined by `INTERVAL` (integer). Larger range (i.e. higher integer value for `INTERVAL`) would mean potentially fetching more users per query, risking hitting the rate limit (read about it [here](https://docs.github.com/en/rest/search?apiVersion=2022-11-28#about-the-search-api)).\n    - `PATH_DIR`: Folder where the output of the scraper (`.csv` file) would be stored. By default, it is `./data/`. Refer the directory tree of one example run in `./data/` in this repo.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsodalabsio%2Fgithub_scrape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsodalabsio%2Fgithub_scrape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsodalabsio%2Fgithub_scrape/lists"}