If you use Kagi Assistant, you can pick one of your lenses (i.e. lists of domains to restrict searches to) in chats. Not sure if their API has that as well or some other way to restrict searches. Also not sure if the Assistant (or API) respects blocked domains when searching.