Skip to main content
Web search scripts let you search websites and services directly from Raycast without opening a browser first. Type your query, press Enter, and jump straight to the results.

How Web Searches Work

Web search scripts typically:
  1. Accept a search query as an argument
  2. URL-encode the query
  3. Open the search URL in your default browser
Example Web Search
#!/bin/bash

# @raycast.schemaVersion 1
# @raycast.title Search Google
# @raycast.mode silent
# @raycast.icon πŸ”
# @raycast.argument1 { "type": "text", "placeholder": "query", "percentEncoded": true }

open "https://www.google.com/search?q=$1"

Available Search Categories

Search Engines

  • Google
  • DuckDuckGo
  • Bing
  • Brave Search
  • Ecosia

Developer Documentation

  • MDN Web Docs
  • Stack Overflow
  • GitHub
  • npm packages
  • Python docs
  • DevDocs

Code Search

  • GitHub code search
  • Sourcegraph
  • Grep.app
  • SearchCode

Package Managers

  • npm
  • PyPI
  • RubyGems
  • Homebrew
  • Cargo (Rust)
  • Maven

Shopping

  • Amazon
  • eBay
  • AliExpress
  • Product Hunt

Media & Entertainment

  • YouTube
  • Netflix
  • IMDb
  • Spotify
  • SoundCloud

Social Media

  • Twitter/X
  • Reddit
  • LinkedIn
  • Hacker News

Maps & Travel

  • Google Maps
  • Apple Maps
  • Flights
  • Hotels
  • Restaurants

Translation

  • Google Translate
  • DeepL
  • Linguee

Images

  • Google Images
  • Unsplash
  • Pexels
  • Giphy (GIFs)

Reference & Learning

  • Wikipedia
  • Wolfram Alpha
  • Dictionary
  • Thesaurus

News

  • Google News
  • Hacker News
  • Reddit
  • Tech news sites

Creating Search Scripts

Basic Search Script

#!/bin/bash

# @raycast.schemaVersion 1
# @raycast.title Search Site
# @raycast.mode silent
# @raycast.packageName Web Searches
# @raycast.icon πŸ”
# @raycast.argument1 { "type": "text", "placeholder": "search query", "percentEncoded": true }

open "https://example.com/search?q=$1"
#!/bin/bash

# @raycast.schemaVersion 1
# @raycast.title Search Flights
# @raycast.mode silent
# @raycast.icon ✈️
# @raycast.argument1 { "type": "text", "placeholder": "from", "percentEncoded": true }
# @raycast.argument2 { "type": "text", "placeholder": "to", "percentEncoded": true }

open "https://www.google.com/flights?hl=en#flt=/m/$1./m/$2"

Search with Dropdown Options

#!/bin/bash

# @raycast.schemaVersion 1
# @raycast.title Search Documentation
# @raycast.mode silent
# @raycast.icon πŸ“š
# @raycast.argument1 { "type": "dropdown", "placeholder": "Site", "data": [{"title": "MDN", "value": "mdn"}, {"title": "React", "value": "react"}] }
# @raycast.argument2 { "type": "text", "placeholder": "query", "percentEncoded": true }

case $1 in
  "mdn")
    open "https://developer.mozilla.org/en-US/search?q=$2"
    ;;
  "react")
    open "https://react.dev/?search=$2"
    ;;
esac

Common Search Patterns

Create scripts for advanced Google searches:
# Search within a specific site
open "https://www.google.com/search?q=site:github.com+$1"

# Search for file types
open "https://www.google.com/search?q=$1+filetype:pdf"

# Search with time filters
open "https://www.google.com/search?q=$1&tbs=qdr:d"  # Past day
# Search Stack Overflow
open "https://stackoverflow.com/search?q=$1"

# Search GitHub issues
open "https://github.com/search?type=issues&q=$1"

# Search npm packages
open "https://www.npmjs.com/search?q=$1"
# Amazon product search
open "https://www.amazon.com/s?k=$1"

# eBay search
open "https://www.ebay.com/sch/i.html?_nkw=$1"

# Price comparison
open "https://www.google.com/search?tbm=shop&q=$1"

Tips for Better Search Scripts

1

Use percentEncoded for Arguments

Enable URL encoding in your argument definition:
# @raycast.argument1 { "type": "text", "placeholder": "query", "percentEncoded": true }
This automatically handles special characters and spaces.
2

Group Related Searches

Use packageName to organize searches:
# @raycast.packageName Developer Searches
3

Choose Clear Icons

Use recognizable icons for quick identification:
  • πŸ” for general search
  • πŸ“š for documentation
  • πŸ›’ for shopping
  • πŸ—ΊοΈ for maps
  • Or use brand emojis/icons
4

Make Titles Descriptive

Include the site name in the title:
# @raycast.title Search Stack Overflow
Not just β€œSearch” - be specific!

Performance Note

Web search scripts use silent mode and execute instantly. The browser opens with your search results without any intermediate steps.

Browsing

Browser controls and web utilities

Navigation

Website bookmarks and quick links

Developer Utils

Developer tools and documentation

Build docs developers (and LLMs) love