# Search for articles

`GET /articles/search`

> This is a subset of the full specification, limited to the `GET /articles/search` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.12/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.12'
  description: This is a subset of the full specification, limited to the `GET /articles/search` operation. Components more than 3 `$ref` hops away are not included.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
tags:
  - name: Articles
    description: Everything about your Articles
paths:
  /articles/search:
    get:
      summary: Search for articles
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
        - name: phrase
          in: query
          required: false
          description: The phrase within your articles to search for.
          example: Getting started
          schema:
            type: string
        - name: state
          in: query
          required: false
          description: The state of the Articles returned. One of `published`, `draft` or `all`.
          example: published
          schema:
            type: string
        - name: help_center_id
          in: query
          required: false
          description: The ID of the Help Center to search in.
          example: 123
          schema:
            type: integer
        - name: highlight
          in: query
          required: false
          description: Return a highlighted version of the matching content within your articles. Refer to the response schema for more details.
          example: false
          schema:
            type: boolean
      tags:
        - Articles
      operationId: searchArticles
      description: You can search for articles by making a GET request to `https://api.intercom.io/articles/search`.
      responses:
        '200':
          description: Search successful
          content:
            application/json:
              examples:
                Search successful:
                  value:
                    type: list
                    total_count: 1
                    data:
                      articles:
                        - id: '17'
                          type: article
                          workspace_id: this_is_an_id92_that_should_be_at_least_4
                          parent_id: null
                          parent_type: null
                          parent_ids: []
                          title: Title 1
                          description: ''
                          body: ''
                          author_id: 991266276
                          state: draft
                          created_at: 1736201440
                          updated_at: 1736201440
                          url: null
                      highlights: []
                    pages:
                      type: pages
                      page: 1
                      total_pages: 1
                      per_page: 10
              schema:
                $ref: '#/components/schemas/article_search_response'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    request_id: 6bd4b156-c8b4-4c78-a9ee-0985e4d47299
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    article:
      title: Article
      type: object
      x-tags:
        - Articles
      description: The Articles API is a central place to gather all information and take actions on your articles. Articles can live within collections and sections, or alternatively they can stand alone.
      properties:
        statistics:
          nullable: true
          $ref: '#/components/schemas/article_statistics'
      allOf:
        - $ref: '#/components/schemas/article_list_item'
    article_list_item:
      title: Articles
      type: object
      x-tags:
        - Articles
      description: The data returned about your articles when you list them.
      properties:
        type:
          type: string
          description: The type of object - `article`.
          enum:
            - article
          default: article
          example: article
        id:
          type: string
          description: The unique identifier for the article which is given by Intercom.
          example: '6871119'
        workspace_id:
          type: string
          description: The id of the workspace which the article belongs to.
          example: hfi1bx4l
        title:
          type: string
          description: The title of the article. For multilingual articles, this will be the title of the default language's content.
          example: Default language title
        description:
          type: string
          nullable: true
          description: The description of the article. For multilingual articles, this will be the description of the default language's content.
          example: Default language description
        body:
          type: string
          nullable: true
          description: The body of the article in HTML. For multilingual articles, this will be the body of the default language's content.
          example: Default language body in html
        author_id:
          type: integer
          description: The id of the author of the article. For multilingual articles, this will be the id of the author of the default language's content. Must be a teammate on the help center's workspace.
          example: '5017691'
        state:
          type: string
          description: Whether the article is `published` or is a `draft`. For multilingual articles, this will be the state of the default language's content.
          enum:
            - published
            - draft
          default: draft
          example: published
        created_at:
          type: integer
          format: date-time
          description: The time when the article was created. For multilingual articles, this will be the timestamp of creation of the default language's content in seconds.
          example: 1672928359
        updated_at:
          type: integer
          format: date-time
          description: The time when the article was last updated. For multilingual articles, this will be the timestamp of last update of the default language's content in seconds.
          example: 1672928610
        url:
          type: string
          nullable: true
          description: The URL of the article. For multilingual articles, this will be the URL of the default language's content.
          example: http://intercom.test/help/en/articles/3-default-language
        parent_id:
          type: integer
          nullable: true
          description: The id of the article's parent collection or section. An article without this field stands alone.
          example: '125685'
        parent_ids:
          type: array
          description: The ids of the article's parent collections or sections. An article without this field stands alone.
          items:
            type: integer
          example:
            - 18
            - 19
        parent_type:
          type: string
          nullable: true
          description: The type of parent, which can either be a `collection` or `section`.
          example: collection
        default_locale:
          type: string
          description: The default locale of the help center. This field is only returned for multilingual help centers.
          example: en
        translated_content:
          nullable: true
          $ref: '#/components/schemas/article_translated_content'
    article_search_highlights:
      title: Article Search Highlights
      type: object
      x-tags:
        - Articles
      description: The highlighted results of an Article search. In the examples provided my search query is always "my query".
      properties:
        article_id:
          type: string
          description: The ID of the corresponding article.
          example: '123'
        highlighted_title:
          type: array
          description: An Article title highlighted.
          items:
            type: object
            description: A highlighted article title.
            properties:
              type:
                type: string
                description: The type of text - `highlight` or `plain`.
                enum:
                  - highlight
                  - plain
                example: 'The highlight is '
              text:
                type: string
                description: The text of the title.
                example: my query
        highlighted_summary:
          type: array
          description: An Article description and body text highlighted.
          items:
            type: array
            description: An array containing the highlighted summary text split into chunks of plain and highlighted text.
            items:
              type: object
              description: An instance of highlighted summary text.
              properties:
                type:
                  type: string
                  description: The type of text - `highlight` or `plain`.
                  enum:
                    - highlight
                    - plain
                  example: 'How to highlight '
                text:
                  type: string
                  description: The text of the title.
                  example: my query
    article_search_response:
      title: Article Search Response
      type: object
      x-tags:
        - Articles
      description: The results of an Article search
      properties:
        type:
          type: string
          description: The type of the object - `list`.
          enum:
            - list
          example: list
        total_count:
          type: integer
          description: The total number of Articles matching the search query
          example: 5
        data:
          type: object
          description: An object containing the results of the search.
          properties:
            articles:
              type: array
              description: An array of Article objects
              items:
                $ref: '#/components/schemas/article'
            highlights:
              type: array
              description: A corresponding array of highlighted Article content
              items:
                $ref: '#/components/schemas/article_search_highlights'
        pages:
          $ref: '#/components/schemas/cursor_pages'
    article_statistics:
      title: Article Statistics
      type: object
      description: The statistics of an article.
      nullable: true
      properties:
        type:
          type: string
          description: The type of object - `article_statistics`.
          enum:
            - article_statistics
          default: article_statistics
          example: article_statistics
        views:
          type: integer
          description: The number of total views the article has received.
          example: 10
        conversions:
          type: integer
          description: The number of conversations started from the article.
          example: 0
        reactions:
          type: integer
          description: The number of total reactions the article has received.
          example: 10
        happy_reaction_percentage:
          type: number
          format: float
          description: The percentage of happy reactions the article has received against other types of reaction.
          example: 40
        neutral_reaction_percentage:
          type: number
          format: float
          description: The percentage of neutral reactions the article has received against other types of reaction.
          example: 40
        sad_reaction_percentage:
          type: number
          format: float
          description: The percentage of sad reactions the article has received against other types of reaction.
          example: 20
    cursor_pages:
      title: Cursor based pages
      type: object
      description: |
        Cursor-based pagination is a technique used in the Intercom API to navigate through large amounts of data.
        A "cursor" or pointer is used to keep track of the current position in the result set, allowing the API to return the data in small chunks or "pages" as needed.
      nullable: true
      properties:
        type:
          type: string
          description: the type of object `pages`.
          example: pages
          enum:
            - pages
        page:
          type: integer
          description: The current page
          example: 1
        next:
          $ref: '#/components/schemas/starting_after_paging'
        per_page:
          type: integer
          description: Number of results per page
          example: 2
        total_pages:
          type: integer
          description: Total number of pages
          example: 13
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              field:
                type: string
                nullable: true
                description: Optional. Used to identify a particular field or query parameter that was in error.
                example: email
            required:
              - code
      required:
        - type
        - errors
    intercom_version:
      description: Intercom API version.</br>By default, it's equal to the version set in the app package.
      type: string
      example: '2.12'
      default: '2.12'
      enum:
        - '1.0'
        - '1.1'
        - '1.2'
        - '1.3'
        - '1.4'
        - '2.0'
        - '2.1'
        - '2.2'
        - '2.3'
        - '2.4'
        - '2.5'
        - '2.6'
        - '2.7'
        - '2.8'
        - '2.9'
        - '2.10'
        - '2.11'
        - '2.12'
        - Preview
    starting_after_paging:
      title: 'Pagination: Starting After'
      type: object
      nullable: true
      properties:
        per_page:
          type: integer
          description: The number of results to fetch per page.
          example: 2
        starting_after:
          type: string
          description: The cursor to use in the next request to get the next page of results.
          nullable: true
          example: your-cursor-from-response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
