{
  "openapi": "3.0.1",
  "info": {
    "title": "Gitleaks Cloud - GitHub API Key Hunter & Secret Scanner",
    "description": "Hunt leaked API keys across GitHub. Pick a known platform (36 services: Razorpay, Stripe, AWS, OpenAI, Anthropic, Cashfree, PayU, Surepass, Decentro, Karza, Attestr, Tartan +24 more), a keyword (auto-expanded), or a regex. Scan a repo, org, or all of GitHub. PAT unlocks fast Code Search.",
    "version": "0.9",
    "x-build-id": "Ix6K6OyZ6xMn8hlLk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/anshumanatrey~gitleaks-github-secret-scanner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-anshumanatrey-gitleaks-github-secret-scanner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/anshumanatrey~gitleaks-github-secret-scanner/runs": {
      "post": {
        "operationId": "runs-sync-anshumanatrey-gitleaks-github-secret-scanner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/anshumanatrey~gitleaks-github-secret-scanner/run-sync": {
      "post": {
        "operationId": "run-sync-anshumanatrey-gitleaks-github-secret-scanner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "search_for",
          "scope"
        ],
        "properties": {
          "search_for": {
            "title": "What are you hunting for?",
            "enum": [
              "platform",
              "keyword",
              "regex"
            ],
            "type": "string",
            "description": "Pick how you want to define the secret. 'Known platform' = use our hand-tuned rules (best accuracy). 'Keyword' = just type a word like 'anthropic', we auto-generate UPPER/snake/camel variants for you (no regex needed). 'Custom regex' = power user, paste your own pattern.",
            "default": "platform"
          },
          "platform": {
            "title": "Platform",
            "enum": [
              "razorpay",
              "stripe",
              "aws",
              "gcp-api-key",
              "gcp-service-account",
              "openai",
              "anthropic",
              "groq",
              "gemini",
              "github-pat",
              "supabase",
              "firebase",
              "clerk",
              "sendgrid",
              "mailgun",
              "postmark",
              "twilio",
              "slack-bot",
              "slack-webhook",
              "discord-bot",
              "datadog",
              "pagerduty",
              "mongodb-uri",
              "postgres-uri",
              "redis-uri",
              "payu",
              "cashfree",
              "surepass",
              "decentro",
              "karza",
              "attestr",
              "tartan",
              "firecrawl",
              "trigger-dev",
              "jwt-generic",
              "rsa-private-key",
              "custom"
            ],
            "type": "string",
            "description": "Used only when 'What are you hunting for?' = 'A known platform'. Pick the service whose credentials you want to find. 'Other' falls back to broad detection across all 30 services.",
            "default": "razorpay"
          },
          "platform_custom": {
            "title": "Custom platform name (only if you picked 'Other' above)",
            "type": "string",
            "description": "Free-text label for unlisted services. Used as the display name in your output. Detection falls back to all 30 ruleset patterns merged together — gives broad coverage when we don't have a hand-tuned rule."
          },
          "additional_platforms": {
            "title": "Also scan for these platforms (optional, multi-select)",
            "uniqueItems": true,
            "type": "array",
            "description": "Used only in 'A known platform' mode. Pick more services to scan alongside the primary platform — useful for one-pass org audits. Each is still priced as one repo, not one per platform.",
            "items": {
              "type": "string",
              "enum": [
                "razorpay",
                "stripe",
                "aws",
                "gcp-api-key",
                "gcp-service-account",
                "openai",
                "anthropic",
                "groq",
                "gemini",
                "github-pat",
                "supabase",
                "firebase",
                "clerk",
                "sendgrid",
                "mailgun",
                "postmark",
                "twilio",
                "slack-bot",
                "slack-webhook",
                "discord-bot",
                "datadog",
                "pagerduty",
                "mongodb-uri",
                "postgres-uri",
                "redis-uri",
                "payu",
                "cashfree",
                "surepass",
                "decentro",
                "karza",
                "attestr",
                "tartan",
                "firecrawl",
                "trigger-dev",
                "jwt-generic",
                "rsa-private-key"
              ],
              "enumTitles": [
                "Razorpay",
                "Stripe",
                "AWS",
                "GCP API key",
                "GCP service account",
                "OpenAI",
                "Anthropic Claude",
                "Groq",
                "Gemini",
                "GitHub PAT",
                "Supabase",
                "Firebase",
                "Clerk",
                "SendGrid",
                "Mailgun",
                "Postmark",
                "Twilio",
                "Slack bot",
                "Slack webhook",
                "Discord bot",
                "Datadog",
                "PagerDuty",
                "MongoDB URI",
                "Postgres URI",
                "Redis URI",
                "PayU",
                "Cashfree",
                "Surepass",
                "Decentro",
                "Karza/Perfios",
                "Attestr",
                "Tartan",
                "Firecrawl",
                "Trigger.dev",
                "Generic JWT",
                "RSA private key"
              ]
            }
          },
          "keyword": {
            "title": "Keyword (only if you picked 'A keyword' above)",
            "type": "string",
            "description": "Type one word — usually a service name or variable name. We auto-generate ~15 common patterns from it: ANTHROPIC_API_KEY, anthropic_api_key, anthropicApiKey, ANTHROPIC_SECRET, ANTHROPIC_TOKEN, etc. No regex knowledge required."
          },
          "regex_pattern": {
            "title": "Custom regex (only if you picked 'A custom regex' above)",
            "type": "string",
            "description": "Power-user mode. Provide a regex that matches the secret value. The literal/fixed portion is used as the GitHub Code Search query; the full regex extracts the actual secret value from matching files. Examples: rzp_live_[A-Za-z0-9]{14} or sk-ant-api03-[A-Za-z0-9_-]{93}"
          },
          "scope": {
            "title": "Where on GitHub to search",
            "enum": [
              "all_github",
              "user_or_org",
              "single_repo"
            ],
            "type": "string",
            "description": "All of GitHub = search across every public repo (fast Code Search if you provide a PAT below, otherwise we search and clone top matches). User or organization = scan every repo owned by a user/org (deep, scans full git history). Single repo = scan one specific repo (deep, scans full git history).",
            "default": "all_github"
          },
          "target": {
            "title": "Target (user, organization, or repo URL)",
            "type": "string",
            "description": "Only used if 'Where on GitHub to search' is 'A user/org' or 'A single repo'. Accepts: a username like 'octocat', an org name like 'microsoft', or a full repo URL like 'https://github.com/owner/name'. Leave blank for 'All of GitHub' mode."
          },
          "github_pat": {
            "title": "GitHub Personal Access Token (highly recommended)",
            "type": "string",
            "description": "Optional, but recommended. Without a PAT: GitHub gives ~10 search requests/minute, no Code Search, and no private repos. With a PAT: 30 search/min + 5000 core/hour, Code Search unlocks (10× faster, 50× more coverage), private repos accessible. Generate one at https://github.com/settings/tokens — 'public_repo' scope is enough for public scans, 'repo' for private. Stored encrypted by Apify, never logged."
          },
          "max_results": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on output. In fast Code Search mode = max findings to return (1-1000, GitHub's limit). In clone mode = max repos to scan. Higher = more coverage but slower and costs more. 100 is a good starting point.",
            "default": 100
          },
          "pushed_after": {
            "title": "Only repos pushed AFTER this date (optional)",
            "type": "string",
            "description": "Date filter for repo discovery. Only include repos with last push on or after this date. Format: YYYY-MM-DD. Use to focus on fresh leaks."
          },
          "pushed_before": {
            "title": "Only repos pushed BEFORE this date (optional, goldmine filter)",
            "type": "string",
            "description": "The goldmine filter. Set this to 1-2 years ago + Maximum stars = 5 → catches forgotten amateur repos where keys were never rotated and nobody else is looking. Format: YYYY-MM-DD."
          },
          "language": {
            "title": "Programming language (optional)",
            "type": "string",
            "description": "Narrow to repos primarily in this language. Leave blank for all languages. Common values: javascript, typescript, python, go, php, java, ruby."
          },
          "min_stars": {
            "title": "Minimum stars (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Only consider repos with at least N stars. Use min_stars=100 to focus on prominent production repos."
          },
          "max_stars": {
            "title": "Maximum stars (optional, pair with pushed_before for the goldmine play)",
            "minimum": 0,
            "type": "integer",
            "description": "Only consider repos with at most N stars. Use max_stars=5 with pushed_before=2 years ago to target low-attention forgotten repos — much higher hit rate of unrotated keys than scanning popular repos."
          },
          "include_extensions": {
            "title": "Only scan these file types (optional)",
            "uniqueItems": true,
            "type": "array",
            "description": "Whitelist of file extensions or filenames. Examples: .env, .yml, .json, Dockerfile. When set, findings in other files are filtered out. Empty = scan everything.",
            "items": {
              "type": "string"
            }
          },
          "include_test_keys": {
            "title": "Include test/sandbox keys in output",
            "type": "boolean",
            "description": "Test-mode keys (rzp_test_*, sk_test_*, pk_test_*) are public by design and harmless if leaked. Default ON for completeness. Uncheck to filter them out and only show real (live) keys.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}