--- id: use-url-to-run-search title: Use a URL to Run a Search description: You can create a custom URL to launch a log search in Sumo Logic. slug: /help/docs/search/get-started-with-search/build-search/use-url-to-run-search/ canonical: https://www.sumologic.com/help/docs/search/get-started-with-search/build-search/use-url-to-run-search/ --- You can create a custom URL to launch a log search in Sumo Logic. :::note The syntax in this article is for use in the [new UI](/docs/get-started/sumo-logic-ui/). For the [Classic UI](/docs/get-started/sumo-logic-ui-classic/), replace `log-search` in the URL syntax with `ui/#/search`. ::: ## Syntax ``` https:///log-search/create?query=¶meters=&startTime=&endTime= ``` * `` is your Sumo Logic service endpoint. See [Sumo Logic Endpoints and Firewall Security](/docs/api/about-apis/getting-started#sumo-logic-endpoints-by-deployment-and-firewall-security) for the endpoint URLs. * `` is the text of your log search query in URL encoded format. * `` is the query parameter part of a templatized query and the corresponding value for the query parameter. * `` is the start of your log query time range, the value can be either: * in milliseconds since epoch. * a [relative time range expression](/docs/search/get-started-with-search/search-basics/time-range-expressions). * `` is the end of your log query time range, the value can be either: * in milliseconds since epoch. * a [relative time range expression](/docs/search/get-started-with-search/search-basics/time-range-expressions). You can omit the `` value and the current time (`now`) is assumed. ## Examples ### Standard query URL Create a URL for the following log query, using a relative time range expression of `-10w` to `-1w`.: ```sumo test query | count by _source ``` The custom URL that launches this log query in the Sumo Logic Search page would be similar to the following. The exact URL would depend on your Sumo Logic account endpoint, as listed in [Sumo Logic Endpoints and Firewall Security](/docs/api/about-apis/getting-started#sumo-logic-endpoints-by-deployment-and-firewall-security).  ``` https://service.sumologic.com/log-search/create?query=test%20query%20%7C%20count%20by%20_source&startTime=-10w&endTime=-1w ``` ### Templatized query URL Create a URL for the following log query, using a relative time range expression of `-60m` to `-30m`.: ```sumo {{app_name}} error | count ``` Assuming that user selects `billing` app from the list of apps, the final query is : ```sumo billing error | count ``` The custom URL that launches this log query in the Sumo Logic Search page would be similar to the following. The exact URL would depend on your Sumo Logic account endpoint, as listed in [Sumo Logic Endpoints by Deployment and Firewall Security](/docs/api/about-apis/getting-started#sumo-logic-endpoints-by-deployment-and-firewall-security).  ``` https://service.sumologic.com/log-search/create?query={{app_name}}%20error%20%7C%20count¶meters=app_name:billing&startTime=-60m&endTime=-30m ```