Search GitHub

Search repositories across GitHub with optional translation

Search Counts

Count results across all GitHub search types

Describe Repository

Full repository metadata and links

List Files

List all files in a repository

Grep Repository

Search patterns inside repository files

Ask AI

Ask questions with optional RAG context from a repository

Explain Code

Get detailed explanation of a function or class

Translate Text

Free instant translation via Google Translate / Lingva

Translate Repository Docs

Translate markdown and text files from a repository

Runtime Statistics

Monitor system performance and cache usage

API Reference

Complete REST API documentation. All endpoints accept both GET and POST.

Base URL: / Format: JSON Auth: None CORS: Enabled
GET POST /cerca Search GitHub repositories
Parameters
NameTypeRequiredDescription
sourcestringrequiredSearch query, URL, or owner/repo
repobooleanfalseIf true, describe the repo instead of searching
grepbooleanfalseEnable grep mode (requires source to be a repo)
greptextstringnullText pattern to grep for
regexbooleanfalseTreat greptext as regex
extstring / string[]nullGET: comma-separated ".py,.js" / POST: array [".py",".js"]
contextinteger0Lines of context around grep matches
path_filterstringnullRegex to filter file paths
max_resultsinteger300Maximum results (1-1000)
enrichbooleantrueEnrich results with API metadata
translatebooleantrueTranslate descriptions to Italian
ai_summarybooleanfalseGenerate AI summary of grep results
GET Example
GET /cerca?source=machine+learning&max_results=20&translate=true
POST Example
POST /cerca Content-Type: application/json { "source": "owner/repo", "grep": true, "greptext": "def authenticate", "ext": [".py"], "ai_summary": true }
cURL
curl "https://elmarcito-ghkit.hf.space//cerca?source=pytorch&max_results=5" curl -X POST https://elmarcito-ghkit.hf.space//cerca \ -H "Content-Type: application/json" \ -d '{"source":"fastapi/fastapi","grep":true,"greptext":"def","ext":[".py"]}'
GET POST /ask AI Q&A with optional RAG
NameTypeRequiredDescription
questionstringrequiredQuestion to ask (min 2 chars)
repostringnullRepository for RAG context (owner/repo)
categoryenumsmartfast | smart | reasoning | premium
GET
GET /ask?question=How+does+auth+work&repo=fastapi/fastapi&category=smart
POST
POST /ask { "question": "How does the routing system work?", "repo": "fastapi/fastapi", "category": "smart" }
Response
{ "question": "How does the routing system work?", "repo": "fastapi/fastapi", "answer": "Il sistema di routing in FastAPI..." }
GET POST /spiega Explain function/class from repo
NameTypeRequiredDescription
repostringrequiredRepository (owner/repo or URL)
targetstringrequiredFunction or class name to explain
GET
GET /spiega?repo=fastapi/fastapi&target=APIRouter
POST
POST /spiega {"repo": "owner/repo", "target": "authenticate_user"}
GET POST /translate Free instant text translation
NameTypeRequiredDescription
textstringrequiredText to translate
targetstringitTarget language code
sourcestringautoSource language code
GET
GET /translate?text=Hello+world&target=it
POST
POST /translate {"text": "Hello world", "target": "it", "source": "auto"}
Response
{"text": "Hello world", "translated": "Ciao mondo", "target": "it", "ms": 142.3}
GET POST /traduci Translate repo documentation files
NameTypeRequiredDescription
repostringrequiredRepository (owner/repo)
refstringmainBranch or tag
max_filesinteger50Max doc files to translate (1-500)
dry_runbooleanfalseList files without translating
cURL
curl "https://elmarcito-ghkit.hf.space//traduci?repo=owner/repo&max_files=10&dry_run=true" curl -X POST https://elmarcito-ghkit.hf.space//traduci \ -H "Content-Type: application/json" \ -d '{"repo":"owner/repo","ref":"main","max_files":20}'
GET POST /descrivi Full repository metadata
NameTypeRequiredDescription
sourcestringrequiredRepository or URL
translatebooleantrueTranslate description
GET
GET /descrivi?source=fastapi/fastapi
GET POST /listfiles List repository files
NameTypeRequiredDescription
sourcestringrequiredRepository (owner/repo)
refstringnullBranch/tag (auto-detected)
extstring / string[]nullFilter by extension
path_filterstringnullRegex path filter
include_dirsbooleanfalseInclude directory entries
GET
GET /listfiles?source=fastapi/fastapi&ext=.py,.md
GET POST /trending GitHub trending repositories
NameTypeRequiredDescription
langstringnullProgramming language filter
sinceenumdailydaily | weekly | monthly
translatebooleantrueTranslate descriptions
GET
GET /trending?lang=python&since=weekly
GET POST /conta Count search results per type
NameTypeRequiredDescription
querystringrequiredSearch query
GET
GET /conta?query=machine+learning
GET /stats Runtime statistics

No parameters. Returns GH engine stats, AI pool stats, translator stats, and cache info.

Response
{ "gh": {"req": 142, "ch": 38, "mh": 95, "byt": 2458301, "err": 0, "rl": 0}, "ai": {"req": 12, "ok": 11, "err": 1, "trunc": 0, "retry": 1, "ms": 14302.5}, "translator": {"ok": 85, "err": 0, "cache_hits": 22, "ms": 9840.2}, "cache": {"entries": 230, "size_mb": 4.82}, "ai_avg_ms": 1300.2, "translator_avg_ms": 115.8 }
GET /models AI model pool status

Returns all available AI models grouped by category with live performance metrics.

cURL
curl https://elmarcito-ghkit.hf.space//models
GET POST /cache/clear Clear disk cache

No parameters. Clears the SQLite disk cache.

Response
{"status": "cleared"}
GET /health Health check
{"status": "ok", "ts": 1719482400.123}