Wiki Search
Semantic search across wiki knowledge items. Uses hybrid ranking (vector cosine similarity + tsvector lexical matching, RRF fusion) to return the most relevant results.
Cost: 1 credit per call
Query limit: 2,000 characters max
Endpoint
POST https://api.llmquantdata.com/api/wiki/search
Authentication
Include a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Request Body
Search query string (e.g. momentum factor, Black-Scholes, pairs trading). Max 2,000 characters.
Maximum number of results to return.
Response
The response follows the standard {data, meta} envelope.
Array of wiki items ranked by relevance. Unique identifier for this wiki item.
Title of the wiki article.
LLM-generated 2–3 sentence summary. Use this to decide whether to read the full article.
Tags associated with the item.
Type of wiki item (e.g. concept, formula, strategy, factor).
URL to the original article.
The topK value used for this request.
Credits consumed by this call. Always 1 for wiki search.
Credits remaining on your account after this call.
Code Examples
import requests
url = "https://api.llmquantdata.com/api/wiki/search"
headers = {
"Authorization" : "Bearer YOUR_API_KEY" ,
"Content-Type" : "application/json" ,
}
response = requests.post(url, headers = headers, json = {
"query" : "momentum factor" ,
"topK" : 5 ,
})
result = response.json()
for item in result[ "data" ]:
print (item[ "title" ], "-" , item[ "summary" ])
print ( f "Credits remaining: { result[ 'meta' ][ 'remainingCredits' ] } " )
Wiki Read
Read the full content of a single wiki item by ID. Use this after search to retrieve the complete article.
Endpoint
GET https://api.llmquantdata.com/api/wiki/items/{id}
Authentication
Include a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Path Parameters
The knowledge_item_id of the wiki item to read.
Query Parameters
Maximum character length for the body_markdown field. Use this to preview content before deciding to read the full article.
Response
Unique identifier for this wiki item.
Title of the wiki article.
Brief summary of the concept.
Full content in Markdown format. Truncated if max_length is specified.
Tags associated with the item.
URL to the original article.
Last updated timestamp (ISO 8601).
Credits remaining on your account.
Code Examples
import requests
item_id = "abc123"
url = f "https://api.llmquantdata.com/api/wiki/items/ { item_id } "
headers = { "Authorization" : "Bearer YOUR_API_KEY" }
# Preview first 500 characters
response = requests.get(url, headers = headers, params = { "max_length" : 500 })
item = response.json()[ "data" ]
print (item[ "title" ])
print (item[ "body_markdown" ])
# Read full article (omit max_length)
response = requests.get(url, headers = headers)
item = response.json()[ "data" ]
print (item[ "body_markdown" ])