How to integrate Google search in the Shell command line.
API URL
https://www.googleapis.com/customsearch/v1?key={Your API key}&q={search keyword}&cx={Your CX}&start={1}&num={10}
Get API Key:https://console.cloud.google.com/apis/credentials
Get CX:https://programmablesearchengine.google.com/controlpanel/all
This is the search data returned in JSON format, it’s that simple.
![GoogleAPI Programmable Search Engine JSON](https://markbuild.com/wp-content/uploads/2022/10/googleapi-search-result.jpg)
API Reference:
https://developers.google.com/custom-search/v1/reference/rest/v1/Search
Integrated into my private search tool
![](https://markbuild.com/wp-content/uploads/2022/10/google_search_in_shell_command_line.webp)
Compare with regular search
![](https://markbuild.com/wp-content/uploads/2022/10/google_search_meta_universe.webp)
![Google Programmable Search on iPhone iSH Shell command line](https://markbuild.com/wp-content/uploads/2022/10/google_search_iSH_Shell_command_line.webp)