Skip to main content
The Search API provides powerful search capabilities across the helpdesk system. Perform a global search across tickets, articles, and other doctypes.
helpdesk.api.search.search(
    doctype: str,
    query: str,
    filters: dict = None
)
From helpdesk/api/search.py - Uses Frappe’s full-text search with custom relevance ranking.

Parameters

doctype
string
required
DocType to search (e.g., “HD Ticket”, “HD Article”)
query
string
required
Search query string
filters
object
Additional filters to apply to search results

Response

Returns array of matching documents with relevance scores:
[
  {
    "name": "HD-00042",
    "subject": "Cannot login to account",
    "status": "Open",
    "_score": 0.95
  }
]

Example

import requests

response = requests.post(
    "https://your-site.frappe.cloud/api/method/helpdesk.api.search.search",
    headers={"Authorization": f"token {api_key}:{api_secret}"},
    json={
        "doctype": "HD Ticket",
        "query": "login issue",
        "filters": {"status": "Open"}
    }
)

results = response.json()["message"]

Get Filter Options

Retrieve available filter options for a doctype.
helpdesk.api.search.get_filter_options(
    doctype: str
)

Parameters

doctype
string
required
DocType to get filter options for

Response

Returns available filters with their options:
{
  "status": ["Open", "Replied", "Resolved", "Closed"],
  "priority": ["Low", "Medium", "High", "Urgent"],
  "ticket_type": ["Question", "Issue", "Feature Request"]
}

Article Search

Search knowledge base articles with NLP-powered relevance.
helpdesk.api.article.search(
    query: str,
    category: str = None
)
From helpdesk/api/article.py - Uses advanced search with article content indexing.

Parameters

query
string
required
Search query for articles
category
string
Optional category filter

Response

Returns matching articles with snippets:
[
  {
    "name": "ART-00015",
    "title": "How to Reset Your Password",
    "snippet": "...click the forgot password link...",
    "category": "Account Management",
    "views": 1234
  }
]

Example

import requests

response = requests.post(
    "https://your-site.frappe.cloud/api/method/helpdesk.api.article.search",
    headers={"Authorization": f"token {api_key}:{api_secret}"},
    json={
        "query": "reset password",
        "category": "Account Management"
    }
)

articles = response.json()["message"]

Search Features

Frappe Helpdesk uses MariaDB full-text indexing for fast search across:
  • Ticket subjects and descriptions
  • Article titles and content
  • Contact names and emails
  • Comment text

NLP Search for Articles

Article search includes:
  • Stemming and lemmatization
  • Relevance ranking
  • Content snippet extraction
  • View count boosting

Permissions

Search respects DocType permissions:
  • Customers see only their own tickets
  • Agents see all assigned or team tickets
  • Public articles visible to all
  • Draft articles only visible to agents

Performance

Search queries are optimized with:
  • Database indexes on searchable fields
  • Query result caching
  • Pagination support
  • Configurable result limits

Articles API

Detailed article operations

Tickets API

Ticket-specific queries

Build docs developers (and LLMs) love