The search data comes from multiple sources including:
In-page search widgets
Browser search plugins
ISP and browser data partnerships
Destination click monitoring
Google itself is a closed ecosystem. The search box cannot be monitored directly. However, destination clicks (where people go after searching) can often be tracked.
This is why we recommend using industry-specific keywords that people search for in multiple places, not just Google. The broader your keyword relevance, the more data we can capture.