• Products
  • Documentation
  • Resources

Insert the search results macro

This macro was intentionally excluded from the new editor and will be deprecated from the legacy editor soon. Read the announcement for more information. 

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

Using the Search Results macro

To add the Search Results macro:

  1. When editing, select from the toolbar

  2. Find the macro by name and select it

  3. Configure it as needed

You can also type / on the page to bring up the same list you'd see by selecting from the toolbar. Continue typing the name of the macro to filter the list.

To edit the Search Results macro:

  1. Select the macro placeholder.

  2. Select the Edit icon to open the configuration panel.

  3. Configure the parameters. Your changes are saved as you go.

  4. Resume editing the page, and the panel closes.

You can also select the centered , medium-width , and full-width icons to adjust the width of some macros. Select the trashcan iconto remove the macro.


Parameters are options that you can set to control what and how content from the macro appears on the page. 

If the parameter name used in Confluence Cloud storage format or wikimarkup is different than the label used when inserting macros using the browser or the slash command, it will be listed below in brackets (example).




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: 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


Start typing the space name to find the space, or specify the key of the space you want to search in. Note that the key is case sensitive.

Content Type


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

Last Modified


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

These are the values you can use:

  • w = weeks

  • d = days

  • h = hours

  • m = minutes

For example:

  • 2h 35m

  • 3d 30m


  • If no time category is specified, Confluence assumes minutes.

  • If you specify more than one time period (for example, weeks and days), you must separate the periods with a space. You can put them in any order.

  • The time categories are not case sensitive. For example, '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.

Wiki markup example

Wiki markup is useful when you need to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.

Macro name: search

Macro body: None.

1 2 3 4 {search:lastModified=3w|query=choc|contributor=admin|maxLimit=10|type=page|spacekey=ds}

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


Still need help?

The Atlassian Community is here for you.