← Open Source
Junyi-99

ChatGPT-API-Scanner

Scan GitHub for available OpenAI API Keys.

MiscPython
Open on GitHub
Momentum
+2stars in 24 hours+0.2%
1.14k
Stars
217
Forks
+5
This week
3
Contributors
Created 2024-02-21 · Updated 2026-10-15 · #3948 today
Top developers
Junyi-99yslinearjestyf

Junyi-99/ChatGPT-API-Scanner is ranked 3,948 with 1,138 stars.

Same-category comparison

Junyi-99/ChatGPT-API-Scanner is ranked 3,948 among these 8 peers; semgrep/semgrep-rules is ranked 3,914.

Same-category comparison
NameRankMetrics
anthropics/claudes-c-compiler3,612
Language:
Rust
Stars:
2,818
Forks:
254
Description:
Claude Opus 4.6 wrote a dependency-free C compiler in Rust, with backends targeting x86 (64- and 32-bit), ARM, and RISC-V, capable of compiling a booting Linux kernel.
openai/NavierStokesAndEuler3,722
Language:
Lean
Stars:
2,098
Forks:
221
Description:
Lean certificates accompanying Navier-Stokes and Euler results.
YanCchen/YCursor3,813
Stars:
1,635
Forks:
101
semgrep/semgrep-rules3,914
Language:
HCL
Stars:
1,275
Forks:
601
Description:
Semgrep Community Edition rules, maintained by Semgrep and the community. Free to use under the Semgrep Rules License.
LottieFiles/dotlottie-web4,050
Language:
TypeScript
Stars:
914
Forks:
56
Description:
High-performance Lottie & dotLottie web player powered by Rust + WASM, with React, Vue, Svelte, Solid & Web Components.
SillyTavern/SillyTavern-Launcher4,241
Language:
Batchfile
Stars:
588
Forks:
128
Description:
Launcher scripts for SillyTavern and ST-Extras.
Kong/insomnia4,330
Language:
TypeScript
Stars:
40,049
Forks:
2,384
Description:
The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
puaclaw/PUAClaw4,969
Language:
HTML
Stars:
2,699
Forks:
242
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryMisc
KeywordsFree AI credits
Stars1,138
Forks217
Contributors3
Created date2024-02-21
Updated date2026-10-15
Stars in 1 day2
Stars in 7 days5
Rank3,948
Previous rank4,113
Rank change165
7-day stars rank5,621
Previous 7-day stars rank5,636
7-day stars rank change15
Total stars rank10,100
Previous total stars rank10,102
Total stars rank change2
CountrySingapore
README summary

ChatGPT-API-Scanner This tool scans GitHub for available OpenAI API Keys. WARNING] **⚠️ DISCLAIMER** THIS PROJECT IS ONLY FOR ***SECURITY RESEARCH*** AND REMINDS OTHERS TO PROTECT THEIR PROPERTY, DO NOT USE IT ILLEGALLY! The project authors are not responsible for any consequences resulting from misuse. NOTE] As of , GitHub has enabled push protection to prevent API key leakage, which could significantly impact this repository. NOTE] As of , secret scanning and push protection will be enabled by default for all new

user-owned public repositories that you create. Keeping Your API Key Safe It's important to keep it safe to prevent unauthorized access. Here are some useful resources: Best Practices for API Key Safety My API is getting leaked. Prerequisites This project has been tested and works perfectly on macOS, Windows and WSL2 (see Run Linux GUI apps on the Windows Subsystem for Linux) Ensure you have the following installed on your system: Google Chrome uv (Python package manager; handles Python

install automatically) Installation 1. Install dependencies (uv reads / and provisions the matching Python version from ): Usage 1. You will be prompted to log in to your GitHub account in the browser. The script will now scan GitHub for available OpenAI API Keys. You can view the contents of this database using any SQLite database browser of your choice. FAQ **Q: Why are you using Selenium instead of the GitHub Search API? ** A: We use regex search to have the best

search results. However, the official GitHub search API does not support regex search, only web-based search does. **Q: Why are you limiting the programming language in the search instead of searching all languages? ** A: There are many API keys available. However, the web-based search only provides the first 5 pages of results. By limiting the language, we can break down the search results and obtain more keys. ** A: Because GitHub searches and OpenAI are rate-limited. Using multithreading

does not significantly increase efficiency. **Q: Why is the API Key provided in your repository not working? ** A: The screenshots in this repo demonstrate the tool's ability to scan for available API keys. However, these keys may expire within hours or days. Please use the tool to scan for your own keys instead of relying on the provided examples. ** A: Push protection is a feature provided by GitHub to prevent users from accidentally pushing sensitive information, such as API keys

, to their repositories. When push protection is enabled, GitHub scans the code being pushed for known patterns of sensitive information and blocks the push if any are found.

Frequently asked questions

How many stars and forks are recorded?

Junyi-99/ChatGPT-API-Scanner has 1,138 stars and 217 forks.

What is the repository rank?

Junyi-99/ChatGPT-API-Scanner is ranked 3,948.

What language and category are recorded?

Junyi-99/ChatGPT-API-Scanner has 1,138 stars, uses Python and belongs to Misc.

Which repository is closest in rank?

Junyi-99/ChatGPT-API-Scanner is compared with semgrep/semgrep-rules, ranked 3,914 with 1,275 stars.

README

ChatGPT-API-Scanner

This tool scans GitHub for available OpenAI API Keys.

[!WARNING] ⚠️ DISCLAIMER

THIS PROJECT IS ONLY FOR SECURITY RESEARCH AND REMINDS OTHERS TO PROTECT THEIR PROPERTY, DO NOT USE IT ILLEGALLY!!

The project authors are not responsible for any consequences resulting from misuse.

[!NOTE] As of August 21, 2024, GitHub has enabled push protection to prevent API key leakage, which could significantly impact this repository.

[!NOTE] As of March 11, 2024, secret scanning and push protection will be enabled by default for all new user-owned public repositories that you create. Check this announcement here.

Keeping Your API Key Safe

It's important to keep it safe to prevent unauthorized access. Here are some useful resources:

Prerequisites

This project has been tested and works perfectly on macOS, Windows and WSL2 (see Run Linux GUI apps on the Windows Subsystem for Linux)

Ensure you have the following installed on your system:

  • Google Chrome
  • uv (Python package manager; handles Python install automatically)

Installation

  1. Clone the repository:

    git clone https://github.com/Junyi-99/ChatGPT-API-Scanner
    
    cd ChatGPT-API-Scanner
    
  2. Install dependencies (uv reads pyproject.toml / uv.lock and provisions the matching Python version from .python-version):

    uv sync
    

    To include dev tools (pylint, flake8, ruff):

    uv sync --all-groups
    

Usage

  1. Run the main script:

    uv run main.py
    
  2. You will be prompted to log in to your GitHub account in the browser. Please do so.

That's it! The script will now scan GitHub for available OpenAI API Keys.

Command Line Arguments

The script supports several command line arguments for customization:

Parameter Description Default
--from-iter Start scanning from a specific iteration None
--debug Enable debug mode for detailed logging False
-ceko, --check-existed-keys-only Only check existing keys in the database False
-k, --keywords Specify a list of search keywords Default keyword list
-l, --languages Specify a list of programming languages to search Default language list

Examples:

# Start scanning from iteration 100
uv run main.py --from-iter 100

# Only check existing keys
uv run main.py --check-existed-keys-only

# Use custom keywords and languages
uv run main.py -k "openai" "chatgpt" -l python javascript

Results

The results are stored in the github.db SQLite database, which is created in the same directory as the script.

You can view the contents of this database using any SQLite database browser of your choice.

Running Demo

Result stored in SQLite (different API Key status)

FAQ

Q: Why are you using Selenium instead of the GitHub Search API?

A: We use regex search to have the best search results. However, the official GitHub search API does not support regex search, only web-based search does.

Q: Why are you limiting the programming language in the search instead of searching all languages?

A: There are many API keys available. However, the web-based search only provides the first 5 pages of results. By limiting the language, we can break down the search results and obtain more keys.

Q: Why don't you use multithreading?

A: Because GitHub searches and OpenAI are rate-limited. Using multithreading does not significantly increase efficiency.

Q: Why is the API Key provided in your repository not working?

A: The screenshots in this repo demonstrate the tool's ability to scan for available API keys. However, these keys may expire within hours or days. Please use the tool to scan for your own keys instead of relying on the provided examples.

Q: What's the push protection?

A: Push protection is a feature provided by GitHub to prevent users from accidentally pushing sensitive information, such as API keys, to their repositories. When push protection is enabled, GitHub scans the code being pushed for known patterns of sensitive information and blocks the push if any are found. (see picture below)

 ![GitHub Push Protection](pics/warning1.png)  
Nearby in the ranking
Similar items