Yes. I think geocode services are configured like normal with the sources property.
Yes, the Search widget can work with the default Esri World Geocoder, with a layer, with a geocode service resource exposed by the ArcGIS Server REST API, or a properly configured 3rd party search API.
Search widget with a custom source (open data address search API for France)
https://developers.arcgis.com/javascript/latest/sample-code/widgets-search-customsource/index.html
Search widget with multiple sources (2 layers and Esri World Geocoder)
https://developers.arcgis.com/javascript/latest/sample-code/widgets-search-multiplesource/index.html
Be sure to set the includedefaultsources to false
var searchWidget = new Search({
view: view,
allPlaceholder: "Search by street address",
autoSelect: true,
suggestionsEnabled: true,
includeDefaultSources: false,
sources: [
{
locator: new Locator({
//url: "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer" //World GeocodeServer
url: "your GeocodeServer"
}),
name: "City Locator",
placeholder: "Street Address",
zoomScale: 1000
},
]
})