VOOZH about

URL: https://apify.com/automly/github-code-search-api

โ‡ฑ GitHub Code Search API | Export code-hit records ยท Apify


Pricing

$1.00 / 1,000 code hit produceds

Go to Apify Store

GitHub Code Search API

Search public GitHub code and export structured code-hit records for developer research, package discovery, code intelligence, and technical lead generation.

Pricing

$1.00 / 1,000 code hit produceds

Rating

0.0

(0)

Developer

๐Ÿ‘ Automly

Automly

Maintained by Community

Actor stats

0

Bookmarked

5

Total users

3

Monthly active users

25 days ago

Last modified

Share

GitHub Code Search API helps you find public code snippets, files, and repository context from GitHub code search results. Use it for dependency discovery, implementation research, package intelligence, security review, and technical lead generation.

Why use this actor?

This actor turns GitHub code search into structured dataset rows you can filter, enrich, and route into AI workflows. It is useful when you need to discover how a library is used, find examples across repos, or identify code patterns in public projects.

Features

  • Search public GitHub code with flexible search queries
  • Filter by repository, language, filename, and path
  • Return repository context alongside each code hit
  • Capture text-match snippets when GitHub provides them
  • Optional token input for higher API limits and more reliable repeat runs
  • Pay-per-event pricing aligned to successful code-hit records only

Input

Simple code search

{
"query":"requests language:Python",
"maxResults":20
}

Search inside a specific repository

{
"query":"api key",
"repo":"psf/requests",
"filename":"README.md",
"maxResults":10
}

Input fields

  • query (string, required): GitHub code search query.
  • maxResults (integer): maximum code hits to return, capped at 100.
  • language (string): optional language qualifier appended to the search query.
  • repo (string): optional repository filter in owner/name format.
  • filename (string): optional filename filter.
  • path (string): optional path filter.
  • token (string): optional GitHub token stored as a secret when used.

Output

Sample record:

{
"recordType":"code-hit",
"query":"requests language:Python",
"repositoryFullName":"psf/requests",
"repositoryUrl":"https://github.com/psf/requests",
"repositoryDescription":"Python HTTP for Humans.",
"repositoryStars":53500,
"repositoryForks":9700,
"repositoryOwnerLogin":"psf",
"repositoryOwnerType":"Organization",
"fileName":"__init__.py",
"filePath":"requests/__init__.py",
"htmlUrl":"https://github.com/psf/requests/blob/main/requests/__init__.py",
"gitUrl":"https://api.github.com/repos/psf/requests/git/blobs/...",
"apiUrl":"https://api.github.com/repos/psf/requests/contents/requests/__init__.py",
"score":1,
"language":"Python",
"matchedText":"..."
}

Use cases

  • Find real examples of how a library or API is used
  • Build developer prospecting lists from public code context
  • Research competitors, patterns, and implementation styles
  • Enrich AI prompts with source code examples
  • Monitor new code mentions of your product or package

Limits and caveats

  • GitHub search has public API limits, and unauthenticated requests are more constrained.
  • The actor returns public code search results only.
  • Very broad queries can return many matches; narrow the query for the best signal.

Pricing

This actor uses pay-per-event pricing:

EventPriceWhen it's charged
code-hit-produced$0.001 / itemPer code hit successfully produced

You pay only for results returned by the actor.

FAQ

Do I need a GitHub token?

No, but using a token improves reliability and rate limits for repeated runs.

Can I search a single repository?

Yes. Use repo:owner/name or the repo input field.

What if my run charge limit is reached?

The actor stops gracefully after the last chargeable result and keeps already produced items.

You might also like

Github Code Auditor

devwithbobby/github-code-auditor

GitHub Code Auditor is an AI-powered Apify Actor that analyzes GitHub repositories.

๐Ÿ‘ User avatar

Dev with Bobby

21

Developer Tools Scraper

datapilot/developer-tools-scraper

Package & Developer Ecosystem Scraper collects package, extension, and repository data from PyPI, npm, VS Code Marketplace, and GitHub. Extracts names, versions, descriptions, authors, licenses, downloads, ratings, keywords, and URLs. Ideal for developer research, trend analysis, lead generation

AI Code Reviewer - Analyze, Explain & Improve Code

ntriqpro/code-review-intelligence-mcp

Get AI-powered feedback on code quality, security issues, and improvement suggestions. Explain complex code in plain English.

๐Ÿ™ GitHub MCP โ€” AI Code & Repo Analytics

nexgendata/github-mcp-server

๐Ÿ™ GitHub repos, code search, issues, PRs, commits MCP server for AI agents (Claude Desktop, Cursor, OpenAI Agents SDK, Vercel AI SDK). Search repos + read code + issues + PRs + releases + user profiles via MCP โ€” built for code-aware AI workflows. Free tier available.

Github Search Scraper

saswave/github-search-scraper

Github search scraper. Get all data from search results list