• Tech Tips

    Quick Search Results using Raycast and DDGR

    This is more or less a proof of concept. I wanted a fast way to look up facts without navigating away from what I’m working on.

    Using Raycast is a natural place to start given you can pull it up and make it go away with ease. I looked for extensions in the Raycast Store (they’re free, despite the name) that might help but nothing seemed to do what I wanted. The Wikipedia extension does a great job of pulling information but it’s not as useful if I want a quick fact like “zip code for Portland Maine”.

    Next I began looking for command line tools that return web search results. Googler came up as a top choice but the project has been archived. ddgr was the next one I came across; it works beautifully to return DuckDuckGo search results as JSON. I installed it with homebrew ( brew install ddgr ).

    Finally, I whipped up a quick Raycast script command that would accept an argument, use ddgr to get the top search results, then spit them out in the Raycast output window. Raycast scrolls to the bottom of the output automatically, so I reversed the order of the top 10 results so that the most relevant appears at the bottom. That’s it!

    There isn’t any graceful error handling, automated test coverage, etc. Use it at your own risk. 😉

    Initial screen of RaycastSearching for Who is Derek Trucks?Search results