Code
content_type=codeSource files, repository content and code-bearing pages.
Pages whose substance is code rather than prose about code. Useful when an agent needs an actual implementation rather than a description of one.
What this covers
- source files
- gists
- example directories
Example
curl -H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/search?q=your+query&content_type[]=code&limit=10"Common questions
What is the code content type?
Source files, repository content and code-bearing pages.
How do I search only code?
Set content_type[]=code on any search request. Content type is assigned at index time from page structure and markup rather than guessed from the URL, so the filter is reliable.
Filter by what a page is
Content type is assigned at index time from structure, not guessed from the URL — so the filter does what it says.