# Search Articles

GET /api/v2/knowledge/search

Full search across a help center's published articles, returning complete articles ranked by relevance plus a `totalCount`. Set `highlight` to also receive the matched fragments of each title and summary, ready to render as emphasised text. This endpoint is public, so it always restricts to published articles no matter what `state` is sent.

## Request

- helpCenterId: string, query, required — ID of the help center to search within.
- highlight: boolean, query — Also return a `highlights` array marking which parts of each title and summary matched, as alternating plain/highlight fragments ready to render.
- phrase: string, query, required — The search text.
- state: draft | published | all, query — Which articles to search. The public Search Articles endpoint forces `published` regardless of what is sent here.

## Response

- 200: Successful response
  - articles: object[], required
    - authorId: string, required
    - body: string, required
    - conversions: integer, required
    - createdAt: string, required
    - happyReactions: integer, required
    - id: string, required
    - neutralReactions: integer, required
    - order: integer, required
    - projectId: string, required
    - sadReactions: integer, required
    - slug: string, required
    - state: draft | published, required, default draft
    - title: string, required
    - type: public | internal, required, default public
    - updatedAt: string, required
    - views: integer, required
    - author: object
    - collection: object
    - collectionId: string
    - description: string
    - url: string
  - totalCount: number, required
  - highlights: object[]
    - articleId: string, required
    - highlightedSummary: object[][], required
    - highlightedTitle: object[], required
- 400: Invalid input data
- 401: Authorization not provided
- 403: Insufficient access
- 404: Not found
- 500: Internal server error
