Skip to Content
Code Fundi for VS Code · Cursor: install the extension →

V2 Search

POST https://api.codefundi.app/v2/search

There is no separate /v2/research route. Research is this endpoint with chat: true.

ModechatContent-TypeHistory category
Searchfalse (default)application/jsonsearch
Researchtrueapplication/x-ndjsonresearch

Credits: 5 credits per search. Research adds model usage on top. See Credits and tiers.

Product: Search, Research.

Request body

FieldRequiredTypeDescription
queryyesstringSearch text (2–1000 characters).
scopenoenumall (default), repos, files, code, functions.
scan_modenoenumsemantic (default), grep_docs, grep_code.
repo_idsnouuid[]Restrict to indexed repository IDs.
repo_urlsnostring[]Clone URLs; merged with repo_ids, max 25 combined.
filtersnoobjectfile_types, file_paths, dependencies, function_names, has_functions, min_lines, max_lines, visibility.
similarity_thresholdnonumber0–1 optional floor for semantic matches.
fieldsnoenumDocumentation depth on hits: basic, summary, or full.
chatnobooleanDefault false. true enables NDJSON research.
modelnostringModel id when chat is true.

Responses: 200; 400, 401, 402, 500.

Search example (chat: false)

search.sh
curl -sS -X POST "https://api.codefundi.app/v2/search" \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d "{\"query\":\"authentication middleware\",\"scope\":\"all\",\"scan_mode\":\"semantic\",\"chat\":false,\"fields\":\"summary\"}"

Research example (chat: true)

NDJSON lines: objects of type search (results, total, meta), then chunk (text), then done (model, context_files) or error (message).

research.sh
curl -sS -N -X POST "https://api.codefundi.app/v2/search" \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Accept: application/x-ndjson" \ -d "{\"query\":\"How is auth enforced?\",\"scope\":\"all\",\"scan_mode\":\"semantic\",\"chat\":true,\"model\":\"gpt-4o-mini\"}"

For chat: true, send Accept: application/x-ndjson, read line-by-line, and parse each JSON object (type discriminates rows).

Last updated on