# Citiview GitHub Code Search

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

Search code across all public GitHub repositories and return matching file paths, links, and code fragments, filterable by language, repo, org, or filename.

## Facts

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

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 citiview-github-code-search-1492f579
```

Example prompt: Search public GitHub repos for real usage examples of the `useEffect` hook in JavaScript files — show me file paths, links, and the matching code fragments, limit to 10 results.

## When to prefer this

Use this endpoint when you need to find real-world usage examples of a function, API method, configuration key, or code pattern across public GitHub repositories, especially when you want to filter by language, organization, or specific filename. Prefer this over web search when you need actual code fragments with direct file links rather than documentation or blog posts.

## Known failure modes

- Empty results if query is too specific or obscure and no public repos match
- Rate limiting or errors if GitHub's underlying search API is unavailable
- Invalid repo format (must be owner/name) causes query failure
- Very broad queries may return noisy or irrelevant results
- Query parameter `q` is required — missing it returns an error

## 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 matching code results from public GitHub repositories, each including the file path, a link to the file on GitHub, and the matching code fragment(s) that satisfy the query. Results can be filtered by programming language, specific repository (owner/name), 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/citiview-github-code-search-1492f579/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.citiviewgroup.com](https://www.zero.xyz/host/agents.citiviewgroup.com/llms.txt)
