# Aayat AI GitHub Repository Code Search

> Aayat AI GitHub Repository Code Search is a paid API for AI agents from aayatai.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-01).

Search for any word or code snippet across all source files in a public GitHub repository, returning matching lines with file paths, line numbers, and direct links.

## Facts

- Endpoint: GET https://aayatai.com/repo/search?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aayat-ai-github-repository-code-search-2574f7c8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XwINvPxuEH8F9wJa6NRNK

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 aayat-ai-github-repository-code-search-2574f7c8
```

Example prompt: Search the honojs/hono GitHub repo for every line that uses getCookie — show me the file paths, line numbers, and links, and only look inside the src/ folder with .ts files.

## When to prefer this

Use this endpoint when you need to search inside a specific public GitHub repository for exact text matches across source files, and you know the owner and repo name. It is faster and cheaper than cloning the repo and running grep locally. Prefer it over general web search when you need line-level precision with file paths and links. Best suited for code auditing, dependency tracing, and API usage discovery within a single known repo. Not suited for fuzzy/regex search, private repos, or cross-repository searches.

## Known failure modes

- Repository not found or is private — returns an error with no results
- Query string too short (under 2 characters) — rejected by schema validation
- Branch/ref does not exist — falls back to 'master' if 'main' not found, otherwise errors
- Repo too large — only up to 120 files scanned, coverage may be incomplete
- Index lag — results may be up to 12 hours behind the latest GitHub commit
- No matches found — returns empty results with files-scanned count
- Invalid owner or repo name format — returns validation error

## How this service works

Search inside one public GitHub repository: every line where a word or code snippet appears, with file, line number and a link. Reads up to 120 likely source files per call (skips vendored, built and lock files) and says how many it covered; may lag GitHub by up to 12 hours; narrow big repos with path=src/ or ext=ts. Pass ?owner=honojs&repo=hono&q=getCookie. Then read a file with /repo/file.

## Output

Returns a list of matching lines (up to the specified limit), each with the file path, line number, the matched line content, and a direct GitHub link. Also includes a summary of how many files were scanned and whether coverage was partial (up to 120 source files per call). Vendored, built, and lock files are excluded from the scan.

## 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": [
      "owner",
      "repo",
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "maxLength": 200,
       "minLength": 2,
       "description": "Text to find (exact text, not a pattern), e.g. getCookie."
      },
      "ext": {
       "type": "string",
       "maxLength": 60,
       "description": "Only these file extensions, comma-separated, e.g. ts,tsx."
      },
      "ref": {
       "type": "string",
       "default": "main",
       "maxLength": 100,
       "description": "Branch, tag or commit (default main; master is tried if main doesn't exist)."
      },
      "path": {
       "type": "string",
       "maxLength": 300,
       "description": "Only files under this folder, e.g. src/."
      },
      "repo": {
       "type": "string",
       "maxLength": 100,
       "description": "Repository name, e.g. hono."
      },
      "limit": {
       "type": "integer",
       "default": 30,
       "maximum": 100,
       "minimum": 1,
       "description": "Most matching lines to return."
      },
      "owner": {
       "type": "string",
       "maxLength": 39,
       "description": "GitHub user or organisation, e.g. honojs."
      },
      "detail": {
       "enum": [
        "full",
        "brief"
       ],
       "type": "string",
       "default": "full",
       "description": "brief = key fields only (same price)"
      },
      "case_sensitive": {
       "type": "boolean",
       "default": false,
       "description": "Match upper/lower case exactly."
      }
     }
    }
   },
   "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/aayat-ai-github-repository-code-search-2574f7c8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from aayatai.com](https://www.zero.xyz/host/aayatai.com/llms.txt)
