Search Articles

GET {{baseUrl}}/api/v2/help_center/articles/search?query=<string>&category=<integer>&section=<integer>&label_names=<string>&locale=<string>&multibrand=<boolean>&brand_id=<integer>&created_before=<dateTime>&created_after=<dateTime>&created_at=<dateTime>&updated_before=<dateTime>&updated_after=<dateTime>&updated_at=<dateTime>&sort_by=<string>&sort_order=<string>

Returns a default number of 25 articles per page, up to a maximum of 1000 results. See Pagination. The per_page parameter, if provided, must be an integer between 1 and 100.

The page parameter, if provided, must be an integer greater than 0.

The results are sorted by relevance by default. You can also sort the results by created_at or updated_at.

The article objects returned by the search endpoint contain two additional properties:

NameTypeRead-onlyMandatoryComment
result_typestringyesnoFor articles, always the string article
snippetstringyesnoThe portion of an article that is relevant to the search query, with matching words or phrases delimited by <em></em> tags. Example: a query for carrot potato might return the snippet ...don't confuse ``carrots`` with ``potatoes``...

You must specify at least one of the following parameters in your request:

  • query
  • category
  • section
  • label_names

Pagination

  • Offset pagination only

See Pagination.

Returns a maximum of 100 articles per page.

Allowed for

  • Anonymous users

Request Params

KeyDatatypeRequiredDescription
querystringThe search text to be matched or a search string. Examples: "carrot potato", "'carrot potato'".
categorystringLimit the search to this category id. See Filtering by Category
sectionstringLimit the search to this section id. See Filtering by Section
label_namesstringA comma-separated list of label names. See Filtering by Labels
localestringSearch for articles in the specified locale. See Filtering by Locale
multibrandstringEnable search across all brands if true. Defaults to false if omitted.
brand_idstringSearch for articles in the specified brand.
created_beforestringLimit the search to articles created before a given date (format YYYY-MM-DD).
created_afterstringLimit the search to articles created after a given date (format YYYY-MM-DD).
created_atstringLimit the search to articles created on a given date (format YYYY-MM-DD).
updated_beforestringLimit the search to articles updated before a given date (format YYYY-MM-DD).
updated_afterstringLimit the search to articles updated after a given date (format YYYY-MM-DD).
updated_atstringLimit the search to articles updated on a given date (format YYYY-MM-DD).
sort_bystringOne of created_at or updated_at. Defaults to sorting by relevance
sort_orderstringOne of asc or desc. Defaults to desc

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;result_type&quot;:&quot;article&quot;,&quot;results&quot;:[{&quot;title&quot;:&quot;\u003cstring\u003e&quot;,&quot;locale&quot;:&quot;\u003cstring\u003e&quot;,&quot;user_segment_id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;permission_group_id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;author_id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;body&quot;:&quot;\u003cstring\u003e&quot;,&quot;comments_disabled&quot;:&quot;\u003cboolean\u003e&quot;,&quot;content_tag_ids&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;created_at&quot;:&quot;\u003cstring\u003e&quot;,&quot;draft&quot;:&quot;\u003cboolean\u003e&quot;,&quot;edited_at&quot;:&quot;\u003cstring\u003e&quot;,&quot;html_url&quot;:&quot;\u003cstring\u003e&quot;,&quot;id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;label_names&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;outdated&quot;:&quot;\u003cboolean\u003e&quot;,&quot;outdated_locales&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;position&quot;:&quot;\u003cinteger\u003e&quot;,&quot;promoted&quot;:&quot;\u003cboolean\u003e&quot;,&quot;section_id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;source_locale&quot;:&quot;\u003cstring\u003e&quot;,&quot;updated_at&quot;:&quot;\u003cstring\u003e&quot;,&quot;url&quot;:&quot;\u003cstring\u003e&quot;,&quot;vote_count&quot;:&quot;\u003cinteger\u003e&quot;,&quot;vote_sum&quot;:&quot;\u003cinteger\u003e&quot;},{&quot;title&quot;:&quot;\u003cstring\u003e&quot;,&quot;locale&quot;:&quot;\u003cstring\u003e&quot;,&quot;user_segment_id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;permission_group_id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;author_id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;body&quot;:&quot;\u003cstring\u003e&quot;,&quot;comments_disabled&quot;:&quot;\u003cboolean\u003e&quot;,&quot;content_tag_ids&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;created_at&quot;:&quot;\u003cstring\u003e&quot;,&quot;draft&quot;:&quot;\u003cboolean\u003e&quot;,&quot;edited_at&quot;:&quot;\u003cstring\u003e&quot;,&quot;html_url&quot;:&quot;\u003cstring\u003e&quot;,&quot;id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;label_names&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;outdated&quot;:&quot;\u003cboolean\u003e&quot;,&quot;outdated_locales&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;position&quot;:&quot;\u003cinteger\u003e&quot;,&quot;promoted&quot;:&quot;\u003cboolean\u003e&quot;,&quot;section_id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;source_locale&quot;:&quot;\u003cstring\u003e&quot;,&quot;updated_at&quot;:&quot;\u003cstring\u003e&quot;,&quot;url&quot;:&quot;\u003cstring\u003e&quot;,&quot;vote_count&quot;:&quot;\u003cinteger\u003e&quot;,&quot;vote_sum&quot;:&quot;\u003cinteger\u003e&quot;}],&quot;snippet&quot;:&quot;\u003cstring\u003e&quot;}