# AgentRXI GitHub Code Search

> AgentRXI GitHub Code Search is a paid API for AI agents from agentrxi.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-15).

Search public GitHub repositories for real code usage examples matching a query, with file paths, links, and matching code fragments, filterable by language, repo, org, or filename.

## Facts

- Endpoint: GET https://agentrxi.com/v1/github/code?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentrxi-github-code-search-d4952d7e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_k3Uz9SyTseJjHsJzuqqrA

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentrxi-github-code-search-d4952d7e
```

Example prompt: Search GitHub for real code examples of how developers use the `boto3 s3.upload_file()` function in Python — show me up to 10 results with file paths and links.

## When to prefer this

Choose this endpoint when you need real-world, production code examples from public GitHub repositories — not documentation or tutorials. Ideal for discovering how developers actually use a function, API, library, or config key in practice, with the ability to scope results to a specific language, organization, or repository. Prefer this over web search when you want structured results with file paths and direct GitHub links rather than prose explanations.

## Known failure modes

- No results found for an overly specific or rare query
- Rate limiting from GitHub's underlying search API causing empty results
- Query too broad returning noisy or irrelevant snippets
- Invalid repository format (must be owner/name) causing parameter error
- Language filter not matching GitHub's accepted language names

## How this service works

Search code across all public GitHub repositories: find real usage examples of a function, API or config key, with file paths, links and the matching code fragments. Filter by language, repo, org or filename.

## Output

Returns a list of code search results from public GitHub repositories, each containing the matching code fragment, the file path within the repository, a link to the file on GitHub, the repository name, and contextual lines around the match. Results can be filtered by programming language, specific repository, organization, or filename.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "description": "Code to find"
      },
      "org": {
       "type": "string"
      },
      "repo": {
       "type": "string",
       "description": "owner/name"
      },
      "limit": {
       "type": "integer"
      },
      "filename": {
       "type": "string"
      },
      "language": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentrxi-github-code-search-d4952d7e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentrxi.com](https://www.zero.xyz/host/agentrxi.com/llms.txt)
