# Search for articles

You can search for articles by making a GET request to `https://api.intercom.io/articles/search`.

Endpoint: GET /articles/search
Version: 2.12
Security: bearerAuth

## Query parameters:

  - `phrase` (string)
    The phrase within your articles to search for.

  - `state` (string)
    The state of the Articles returned. One of `published`, `draft` or `all`.

  - `help_center_id` (integer)
    The ID of the Help Center to search in.

  - `highlight` (boolean)
    Return a highlighted version of the matching content within your articles. Refer to the response schema for more details.

## Header parameters:

  - `Intercom-Version` (string)

## Response 200 fields (application/json):

  - `type` (string)
    The type of the object - `list`.
    Enum: "list"

  - `total_count` (integer)
    The total number of Articles matching the search query
    Example: 5

  - `data` (object)
    An object containing the results of the search.

  - `data.articles` (array)
    An array of Article objects

  - `data.articles.type` (string)
    The type of object - `article`.
    Enum: "article"

  - `data.articles.id` (string)
    The unique identifier for the article which is given by Intercom.
    Example: 6871119

  - `data.articles.workspace_id` (string)
    The id of the workspace which the article belongs to.
    Example: hfi1bx4l

  - `data.articles.title` (string)
    The title of the article. For multilingual articles, this will be the title of the default language's content.
    Example: Default language title

  - `data.articles.description` (string)
    The description of the article. For multilingual articles, this will be the description of the default language's content.
    Example: Default language description

  - `data.articles.body` (string)
    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

  - `data.articles.author_id` (integer)
    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

  - `data.articles.state` (string)
    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"

  - `data.articles.created_at` (integer)
    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

  - `data.articles.updated_at` (integer)
    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

  - `data.articles.url` (string)
    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

  - `data.articles.parent_id` (integer)
    The id of the article's parent collection or section. An article without this field stands alone.
    Example: 125685

  - `data.articles.parent_ids` (array)
    The ids of the article's parent collections or sections. An article without this field stands alone.
    Example: [18,19]

  - `data.articles.parent_type` (string)
    The type of parent, which can either be a `collection` or `section`.
    Example: collection

  - `data.articles.default_locale` (string)
    The default locale of the help center. This field is only returned for multilingual help centers.
    Example: en

  - `data.articles.translated_content` (object)
    The Translated Content of an Article. The keys are the locale codes and the values are the translated content of the article.

  - `data.articles.translated_content.type` (string)
    The type of object - article_translated_content.
    Enum: null, "article_translated_content"

  - `data.articles.translated_content.ar` (object)
    The Content of an Article.

  - `data.articles.translated_content.ar.type` (string)
    The type of object - `article_content` .
    Enum: null, "article_content"

  - `data.articles.translated_content.ar.title` (string)
    The title of the article.
    Example: How to create a new article

  - `data.articles.translated_content.ar.description` (string)
    The description of the article.
    Example: This article will show you how to create a new article.

  - `data.articles.translated_content.ar.body` (string)
    The body of the article.
    Example: This is the body of the article.

  - `data.articles.translated_content.ar.author_id` (integer)
    The ID of the author of the article.
    Example: 5017691

  - `data.articles.translated_content.ar.state` (string)
    Whether the article is `published` or is a `draft` .
    Enum: "published", "draft"

  - `data.articles.translated_content.ar.created_at` (integer)
    The time when the article was created (seconds).
    Example: 1663597223

  - `data.articles.translated_content.ar.updated_at` (integer)
    The time when the article was last updated (seconds).
    Example: 1663597260

  - `data.articles.translated_content.ar.url` (string)
    The URL of the article.
    Example: http://intercom.test/help/en/articles/3-default-language

  - `data.highlights` (array)
    A corresponding array of highlighted Article content

  - `data.highlights.article_id` (string)
    The ID of the corresponding article.
    Example: 123

  - `data.highlights.highlighted_title` (array)
    An Article title highlighted.

  - `data.highlights.highlighted_title.type` (string)
    The type of text - `highlight` or `plain`.
    Enum: "highlight", "plain"

  - `data.highlights.highlighted_title.text` (string)
    The text of the title.
    Example: my query

  - `data.highlights.highlighted_summary` (array)
    An Article description and body text highlighted.

  - `data.highlights.highlighted_summary.type` (string)
    The type of text - `highlight` or `plain`.
    Enum: "highlight", "plain"

  - `data.highlights.highlighted_summary.text` (string)
    The text of the title.
    Example: my query

  - `pages` (object)
    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.

  - `pages.type` (string)
    the type of object `pages`.
    Enum: "pages"

  - `pages.page` (integer)
    The current page
    Example: 1

  - `pages.next` (object)

  - `pages.next.per_page` (integer)
    The number of results to fetch per page.
    Example: 2

  - `pages.next.starting_after` (string)
    The cursor to use in the next request to get the next page of results.
    Example: your-cursor-from-response

  - `pages.per_page` (integer)
    Number of results per page
    Example: 2

  - `pages.total_pages` (integer)
    Total number of pages
    Example: 13

## Response 401 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.field` (string)
    Optional. Used to identify a particular field or query parameter that was in error.
    Example: email

