acme. It returns the files whose name matches, with a direct link, the bucket that holds each file, its size and when it was last modified.
In the API reference these endpoints sit under the Bucket Monitoring tag. In the dashboard the source is Search by Source → Open Cloud Storage.
The flow is asynchronous: start a search, poll it until it finishes, then read the files.
Availability and cost
Availability: the Cloud Storage Exposure plan feature. Not every plan includes it. Manage → Buy more in the dashboard lists the features your plan includes. Plans and quotas explains how plan features work. Cost: no metered allowance. Calls count toward your organization’s per-second rate limit, and every2xx response to an API-key request uses one unit of your monthly API Calls allowance. A non-2xx response is refunded.
Without the feature, or when your license is not active, the four search endpoints (create_, get_, list_ and delete_bucket_search_request) return 403:
429 or the capacity 409. A 429 with "message": "Rate limit exceeded" comes from the rate limit or the API Calls allowance. Rate limits explains both.
What a search matches
- The term is matched against file names. Bare words must all appear. A word with a
-prefix excludes files that contain it:acme invoice -draftfinds files whose name containsacmeandinvoicebut notdraft. Setfullpathto match the whole file path instead of the name. Setregexpto treat the term as a regular expression. - Domain terms are shortened first. The search drops the top-level domain and the
www.,http://,https://,ftp://andmailto:prefixes, soacme.comis searched asacme. If the shortened term reaches a fifth page of results, the search runs again with the term you sent and keeps those files instead.search_termin the search response shows the term the search used. - A search collects at most 5,000 files. It reads up to 5 pages of 1,000 files from the index. When the search reaches a fifth page,
has_more_result_than_limitistrueand more files may match than the search kept. - Submit filters decide what fills the cap.
extensions,stopextensions,size_from,size_to,last_modified_from,last_modified_to,bucketandexcluded_bucketsnarrow the files before they are collected.orderanddirectiondecide which files come first. The read filters onlist_bucket_search_resultonly slice the files a search already kept. - A search runs once. It does not refresh. Start a new search to pick up files indexed since, or create a monitor.
Run a search
1
Start the search
create_bucket_search_request takes a JSON body. Only search_term is required.The call returns
201 with the search:id. is_monitoring, alert_cycle, is_email, is_reporting and report_id are scheduling fields that a search you start here leaves at their defaults.2
Poll until it finishes
Fetch the search with
get_bucket_search_request until status is finished.status takes two values:in_progress: still running.finished: done. Read the files.
finished, with no files. Poll every 10 seconds or slower: each successful poll uses an API call.When the search finishes, check has_more_result_than_limit and search_term. true means the search stopped at 5,000 files. A search_term that differs from what you sent means the shortened domain term was used.3
Read the files
list_bucket_search_result returns the files of one search. Pass the search id as searchrequest.file_category groups files by extension:An unknown
file_category returns no files rather than an error.What comes back
count: files that match the read filters you sent, across all pages.total_count: every file the search kept, ignoringsearch,file_categoryandsize_range.available_categories: the categories present among all the search’s files. Use it to offer only filters that return data.next/previous:nullat either end. The URLs point at the internal search service, not atclient-api.leak.center, so don’t call them. Raisepageuntilnextisnull.
Manage searches and files
list_bucket_search_requestlists your organization’s searches, newest first.page_sizedefaults to20, max100.orderingtakescreate_date,-create_date,update_dateor-update_date.get_bucket_search_resultreturns one file by itsid.delete_bucket_search_resultremoves one file from a search and returns204.countandtotal_countdrop by one.delete_bucket_search_requestremoves a search and all of its files and returns204.
Watch the term continuously
A search runs once. To re-run a term on a schedule and receive only new files, create a monitor on thebucket source. See Create a monitoring rule. A monitor on this source needs the same Cloud Storage Exposure plan feature.
Quick search also runs this source for domain, IP address, host name and file name searches. On a plan without the feature, quick search reports this source as not_entitled.
Errors
Errors lists every error the API returns.