Search articles
Example request
Generated- cURL
- JavaScript
- TypeScript
- Python
- PHP
- Go
- Java
- Ruby
- C#
Responses
Full-text search across the account’s published articles, honouring the caller’s permission groups. Results are returned unwrapped, not under an envelope key.
Authentication
-
-
ApiKeyBearerhttpbearerAn API key sent as
Authorization: Bearer <key>. A key holds scopes, the same ones OAuth uses, and an operation needs the scope listed for it under OAuth2. A key may also expire, or be revoked or rotated in Settings > API, after which it is refused with a 401.
-
-
-
OAuth2oauth2An OAuth 2.0 access token for an app acting on behalf of a HelpDocs user, sent as
Authorization: Bearer <token>. The authorization code flow requires PKCE (S256). Each operation names the one scope it needs.
-
-
-
ContentJWTapiKeyquery: hd_jwtA help-center content JWT, for accounts using JWT auth. Accepted as the
hd_jwtquery parameter or as thehd_jwtcookie, and only on the read operations that declare it. A content JWT does not say which knowledge base it is for, so sendaccount_domainwith it: the knowledge base’s HelpDocs subdomain, its custom domain, or its slug.
-
Query parameters
-
querystringThe search terms.
-
language_codestringSearch within this translation.
-
strict_languagebooleanRefuse a language_code the account does not have with a 400, instead of answering in the default language. GET /v1/languages lists the codes the account has. Defaults to false.
-
limitintegerMaximum number of results. Defaults to 10.
-
category_idstringRestrict results to this category.
See more 3
-
include_descendant_categoriesbooleanWith category_id, also search its descendants.
-
include_privatebooleanInclude private articles the caller may see.
-
include_draftbooleanInclude unpublished drafts.
Responses
The matching articles
application/json
SearchResult
-
querystring Required -
max_scorenumber Required -
stemmed_querystring Required -
total_hitsinteger Required -
stemmedQuerystring -
totalHitsinteger
strict_language is true and language_code names a language the account does not have. The message lists the languages it does have.
text/plain
The failure, as a human-readable message.
-
string
The failure, as a human-readable message.
Authentication failed or no API key was supplied.
application/json
Error
An error response.
-
codeinteger RequiredThe HTTP status code.
-
errstring RequiredA human-readable description of the failure.
The key lacks read permission, or the account’s plan does not include API access.
application/json
Error
An error response.
-
codeinteger RequiredThe HTTP status code.
-
errstring RequiredA human-readable description of the failure.
Rate limited. Wait the number of seconds in Retry-After before trying again. X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset say which allowance was spent and when it refills.
-
Retry-Afterinteger -
X-RateLimit-Limitinteger -
X-RateLimit-Remaininginteger -
X-RateLimit-Resetinteger
application/json
Error
An error response.
-
codeinteger RequiredThe HTTP status code.
-
errstring RequiredA human-readable description of the failure.