# Article Search Response

> This is a subset of the full specification, limited to the `article_search_response` schema.
>
> 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 `article_search_response` schema. 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: []
paths: {}
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
    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
```
