ShareMaster is shaped by your feedback. Tell us what to build next →
Features All features overview
Migration Tools Overview Structure and content OneDrive ↔ SharePoint Content only Structure only Move / Copy Upload from this computer Download to this computer Dropbox to SharePoint Resume and incremental runs
Microsoft Teams Overview Copy a team Move channels Merge teams Inactive teams Ownerless teams Guests and external access Export a team Search everyone's chats
Recycling Bin Overview Browse a site's recycle bin Empty recycle bins in bulk Restore and purge history Deleted teams
Archive Overview Configure the tenant On Demand Archive Restore Archived Files Archive Savings Report Blob Viewer
Optimise Storage Tools Overview Delete all items in a list Delete all files and folders in a library Remove empty folders Remove duplicate files Reduce image sizes Delete sites and subsites
SharePoint Tools Overview Tenant Explorer SharePoint Explorer Easy Settings Fix renamed groups List Explorer Search the Preservation Hold Library
Search & Indexing Overview Search query Item search properties Reindex Crawl log
Replace Overview Replace in SharePoint Replace in local files Find password-protected files Remove PDF passwords
Shared Links Overview Report shared links Report unique permissions Remove a person from sharing links Remove shared links Remove unique permissions
Version History Overview Version trimming Version trimming report Reset file version
Reports Overview Inventory report Folder inventory Site and subsite storage Storage growth Security matrix Teams permissions Pre-migration analysis Compare items Dropbox to Microsoft 365 compare Duplicate file report Empty folder report Image size report Recycle bin report Unused licences Copilot readiness Inactive sites, OneDrives and groups Orphaned users Site settings Audit activity Groups Checked-out files report Report history
Developer Tools Overview Query Builder PnPjs Console Property Bags SPFx Customizers Webhooks Customisation audit
Pricing Services Demos Blog Guides Use cases Compare Tools Alerts FAQ Contact
  1. Home
  2. Documentation
  3. Search & indexing

Search query

KQL with every option

Find the files in SharePoint that match your keywords and export the list to Excel. Type the words, add a file type, a site, an author or a date if you want, and every match the tenant's search index holds comes back with its address. Every option SharePoint's own search takes is there too: the query template, a result source, the properties to return, sorting, refiners and refinement filters. The exact request is shown before it is sent, and queries can be saved and run again.

Reads only. Nothing in SharePoint is changed.

What does it tell you?

  • Which files mention a word or a phrase, across the whole tenant or under one site? Example: "purchase order" IsDocument:true
  • Which files of one type match? Example: budget filetype:xlsx, or invoice (filetype:pdf OR filetype:docx)
  • What is under one site or library? Example: contract path:"https://contoso.sharepoint.com/sites/Legal";
  • Who wrote it, and when did it change? Example: author:"Dana Reyes" LastModifiedTime>=2026-01-01, or LastModifiedTime>={Today-30} for the last 30 days
  • Can I have the whole list in Excel? Tick Export all pages and every result comes out, not only the page on screen.
  • Can I have the files themselves? Download saves the files of the ticked results, or of every result the filter shows, to a folder on this computer.
  • Is this content in the search index at all, and what does the index hold for it?
  • What does a result source or a query rule do to a query? The page shows the query SharePoint actually ran.
  • Which refiner values does a set of results have, and how many in each?

How it runs

  1. Sign in. Open Search & Indexing, then Search query. One sign-in when you click the tile. Any of the three credentials works; Item search properties uses the same one.
  2. Write the query. Your keywords in Query text, in KQL: words, a "phrase in quotes", AND, OR and NOT in capitals, and property filters such as filetype:pdf. Limit to a site adds a Path restriction for you.
  3. Choose the columns. Select properties adds columns to the results and the workbook, such as Author, LastModifiedTime, FileType, Size. Title, Path, WorkId and UniqueId are always there.
  4. Set options. Result source, rows per page (50 unless you change it), sort rows, refiners and refinement filters (one per line). Each switch is Default, On or Off; Default is not sent.
  5. Run search. The results open on their own page: the results this account can see, with the total and how long it took. Type in the filter box to narrow the rows on screen, across every column, as you type; it shows how many of them match. Keep only this on a refiner value adds it as a filter and takes you back to the query to run it.
  6. Search again. Takes you back to the query with every field as you left it, to change it and run it again. Show results on the query goes back to the last results without running it.
  7. Export to Excel. Tick Export all pages for every result, or leave it clear for the page on screen. Export always writes the results, not just the rows the filter shows. Choose where to save, and the workbook is listed in Report History.
  8. Download the files. Tick the rows you want (Tick shown ticks every row the filter shows), or tick none to take every row the filter shows, then click Download. ShareMaster reads those results again, then opens Download to device's options: how many files and how big, a warning if it is a large download, and anything it cannot download and why. Choose a folder and whether to skip or overwrite files already there. The files land in folders that mirror the site, library and folder they came from. Pages, list items and folders are skipped (not a file). A file that cannot be read (no access, gone, locked) is listed as failed and the rest carry on. Stop at any point; the completion dialog has the counts and the run report is in History.
  9. Follow up. Open a result, copy its address, or ask Why is this here? to see every property the index holds for it. Save query keeps the query and every option, to load and run again.

How does it work?

Each query is a single request, sent with your sign-in exactly as the request panel shows it. Options left at Default are not sent, so SharePoint applies its own. The title, the address and the index's own ids are always asked for alongside the properties you list, so every result can be opened and looked up. Date tokens and query variables are sent as they are, and SharePoint works out their values.

Results are what the index returns to this account after SharePoint trims them by permission, so the header counts what this account can see, and an empty result is never presented as proof that content is missing. Clicking a refiner value adds it as a new line of refinement filters for the next request; nothing is filtered on this computer.

Export to Excel writes three sheets. Summary has the tenant, when it ran, SharePoint's estimate of the total, how many rows the workbook holds, the query SharePoint actually ran and the whole request. Results has one row per result and one column per property, in the order asked for. Refiners has each refiner value with its count. Without Export all pages the workbook holds the page on screen and says which rows those are.

Export all pages asks for 500 results at a time. When there are more than that, it does not page through them, because SharePoint re-ranks between pages and rows go missing or repeat; it cuts the results into slices by modified date (and by size inside one second) small enough for one request each, and keeps each result once, up to 1,000,000 rows. SharePoint's total is only an estimate, so the workbook can hold more or fewer rows than it. It says where it stopped if SharePoint refuses a slice after three tries, or when you press Stop. Saved queries are kept in one file on this computer; a file that cannot be read is set aside rather than saved over. Nothing on this page changes SharePoint.

What do you need?

  • Read access to the content you expect to see. Search results are trimmed to the signed-in account, so an administrator and a member can get different answers to the same query.

What will it not do?

  • A result that is missing is not proof the content is missing from the index: it may be trimmed from this account by permissions.
  • On a certificate, results are what the app's Sites permission covers, not what any person sees, and people results may be empty.
  • Limit to a site is a Path restriction, which matches by prefix: /sites/Team also matches /sites/Team2.
  • FQL in the query text is not available on this route; refinement filters take FQL.
  • SharePoint returns at most 500 rows a request, and paging deep through a big result set loses and repeats rows. So Export all pages reads a big set in slices by modified date (then by size), each in one request, and writes each row once: the workbook is then in modified-date order, not in your sort order. The Summary sheet says how it was read and if anything stopped it.
  • Some built-in result sources, such as Documents and Pages, replace your query text with their own query. The page warns when SharePoint did not run your query text.
  • A workbook holds at most 1,000,000 result rows; the Summary sheet says when there were more.
  • Results come from the search index, not from the libraries themselves: a file added or changed since SharePoint last crawled it may be missing or out of date until the next crawl.
  • Date tokens such as {Today-7} are sent as they are; SharePoint works out the date.
  • Download takes the rows of the page on screen (ticked, or shown by the filter), not every page of the results: page through, or raise Rows per page (up to 500), to download more. It downloads the current version of each file only, with its created and modified dates where Windows allows, and uses the search's own sign-in: nothing new is asked for.
  • Item search properties: Why one item is, or is not, in search.
  • Reindex: Ask SharePoint to crawl sites and lists again when the index is behind.
  • Crawl log: What the crawler saw when it last visited.

Microsoft's own documentation

See every feature