Where can build_trigger_id be found?

I am trying to use the search endpoint but I am not too sure how to get the build_trigger_id.
Could someone maybe expand on what it is and how where to get it from? I know it is mentioned in the documentation but for me it wasn’t too clear.

Making the following request:

https://site-api.datocms.com/search-results?q=search&build_trigger_id=main

Outputs the following error:

{
	"data": [
		{
			"id": "426176",
			"type": "api_error",
			"attributes": {
				"code": "INVALID_DEPLOYMENT_ENVIRONMENT",
				"details": {}
			}
		}
	]
}

Any help on this would be much appreciated! :pray:

I found that it is a Build Trigger section available in settings:

However, what if I would like to just perform a search within a model by calling the endpoint? Would a GraphQL query be a better solution?

Hello @cristiano,

The build trigger id can be found after selecting the build trigger that has “Site Search” activated, and then copying the numeric sequence on the end of the URL:

I see, that’s helpful thanks Marcelo!