All the examples I see to attempt to gain a search box in sitelinks in the SERPs use a target URL that has a URL parameter like so:https://example.com/search?q={search-string}Can any URL be used or does this only work with query parameters? For example:https://example.com/search/{search-term}
Using URL without query parameter for Sitelinks Searchbox?
url;schema.org;search;rich snippets
Of course it should be possible to use any kind of URL design. It wouldnt make sense for Google to exclude many sites just because they dont use the URLs query component for the search function.Did you check Googles documentation? For the target property it says:This must be a URL that points to an address on the same domain as the content being searched.It must also include a variable name in braces that is a placeholder for the user's search query.Your server should assume and support UTF-8 values for user search queries.So theres nothing documented that would restrict which URL design is supported.