How do I get the searchID for a saved search?

Specifically, I want to use the getSavedSearchResultsAllFields API call to get saved search based on the “Email Batched Results” report.

How do I get the search ID? The UI only shows a title and description for the report. Is there a way in the UI or the API to list all saved searches with the searchID included in the results?

Unfortunately there isn’t a simple way to get it yet, but it is available (although obscurely) through the UI. If you go to the Saved Reports and hover over the link to the report you wish to query, the link will show a number at the end of the line for filterId. This would be the parameter you use for the searchId.

A slightly easier way in addition to what @TomScott has suggested is to inspect the saved search drop down box element and you will find the entire list with id’s in the inspection.

Thanks to both John and Tom. Once you know that the searchID only shows up as a query parameter in hyperlinks to the report, and that it’s called filterID instead of searchID, there are a number of ways to get it.

On my system, hovering over the hyperlink won’t cut it, but you can right-click and select “copy link address.”

It sure would be nice to have an API method that returns a list of saved searches with their ID. Short of that, a documentation update, at least, would be in order.

@Nicholas_Trecina also mentioned to me that it is available through the legacy XML-RPC API via the DataService.query method:
https://developer.infusionsoft.com/docs/xml-rpc/#data-query-a-data-table

The table in question is SavedFilter:
https://developer.infusionsoft.com/docs/table-schema/

1 Like

@TomScott this method is not working PHP 8.

Good morning Manuel,

The XML-RPC API has a standardized XML specification, which operates regardless of the consumer’s platform and language. I would start troubleshooting from how you are performing the call and what specific errors you are receiving.