Child pages
  • Search Macro
Skip to end of metadata
Go to start of metadata

The Search macro searches your Confluence site based on search terms specified in the macro code, and displays the results on the wiki page.

On this page:

Usage with the Macro Browser

To insert the search macro into a page using the Macro Browser,

  1. Open the Confluence page or blog post that you want to edit, then click the 'Edit' button.
  2. Click the Macro Browser icon on the toolbar. The macro browser window will open.
  3. Scroll through the list of macros to find the one you want. Alternatively, start typing the macro name into the search box at the top right of the macro browser. Macros with a matching name will appear in the main pane.
  4. Click the desired macro.
  5. Set the macro parameters to your requirements. If desired, you can preview these changes by clicking 'Refresh'.
  6. Click 'Insert' to add the macro onto the page.

(tick) You can also insert macros via autocomplete. For more information, see Using Autocomplete in the Rich Text Editor.

Once you've found the search macro and have added the required parameter values, click 'insert' to add it to your page.

Usage with the Wiki Markup Editor

In the example below, we assume that you want to search for all pages and other content types which contain the term 'my_query'.

What you need to type

What you will get


Found 0 search result(s) for my_query.


Parameters are options that you can include in Confluence macros to control the content or format of the macro output. The table below lists relevant parameters for this macro.

Parameter names are different in the macro browser and in wiki markup. Below we show the macro browser parameter names in bold text, and the equivalent wiki markup parameters in (bracketed) text. If we do not show any parameter name for the wiki markup, then you should leave out the parameter name and simply include the parameter value as the first parameter, immediately after the colon (:).





Search Terms



The search terms which this macro will use to generate its results.

You can refine your search query by using operators such as 'AND' and 'OR'. For example:

  • In the macro browser Search Terms entry box: my_query1 AND my_query2

  • In wiki markup editor: {search:query=my_query1 AND my_query2}

    For more information, take a look at the documentation on the Confluence search syntax.

Maximum Number of Results



Set a limit to the number of search results displayed.

Restrict to this Space Key



Specify the key of the space you want to search in. Note that this is case sensitive.

Content Type



Specify the content type. The content types are: page, comment, blogpost, attachment, userinfo (the content of user profiles only), spacedesc (the content of space descriptions only) and mail.

Last Modified



Specify a period of time in weeks, days, hours and/or minutes, to see the content modified within that time frame. For example:

  • 2h 35m
  • 3d 30m
    These are the values you can use:
  • w = weeks
  • d = days
  • h = hours
  • m = minutes
    If no time category is specified, Confluence assumes minutes.
    If you specify more than one time period (e.g. weeks and days), the periods must be separated by a space and they can come in any order.
    The time categories are not case sensitive e.g. '4d' is the same as '4D'.

Restrict to this Username



Specify the username of a Confluence user, to show only content created or updated by that user.

1. Setting a limit to the number of search results displayed

Display a maximum of 20 results.


2. Specifying the key of the space you want to search

Global space: Search within the Doctemp space only.


Personal space: Search within jsmith's space only.


3. Specifying the content type

Search within comments only.


4. Specifying a time period in which the content was last modified

Search for content modified in the last one week and two days.

{search:query=my_query|lastModified=1w 2d}

5. Limiting the search results to content created or modified by a specific user

Search within content created or updated by jsmith only.



When a user views the page containing the Search macro, the search results will show only pages and other content types for which the user has 'View' permission.


Livesearch Macro
Searching Confluence
Working with Macros

Take me back to the Wikis Help Guide.