_____ _ _____ _
/ ____| | | | ___| (_)
| (___ ___ __ _ _ __ ___| |__ | |__ _ __ __ _ _ _ __ ___
\___ \ / _ \/ _` | '__/ __| '_ \| __| '_ \ / _` || | '_ \ / _ \
____) | __/ (_| | | | (__| | | | |__| | | | (_| || | | | | __/
|_____/ \___|\__,_|_| \___|_| |_\____/_| |_|\__, ||_|_| |_|\___|
_____ __/ |
/ ____| |___/
| (___ ___ _ __ __ _ _ __ ___ _ __
\___ \ / __| '__/ _` | '_ \ / _ \ '__|
____) | (__| | | (_| | |_) | __/ |
|_____/ \___|_| \__,_| .__/ \___|_|
| |
|_|

High-performance, anti-detection search engine scraper - Built with advanced Go concurrency patterns
β¨ Features β’ π Install β’ π§ Usage β’ π Examples β’ π§ Advanced β’ π Debug
Google, Bing & DuckDuckGo |
Bypass CAPTCHAs & Blocks |
Chrome-Based Scraping |
Domain, Keyword & More |
Keyword Extraction & Ad Detection |
Avoid Rate Limiting |
Usage: gosearch [OPTIONS] [QUERY]
Options:
--query string Search query
--engine string Search engine (google, bing, duckduckgo, all) (default "google")
--max int Maximum results to fetch (default 10)
--ads Include advertisements in results
--timeout duration Search timeout (default 30s)
--proxy string Proxy URL (e.g., http://user:pass@host:port)
--headless Use headless browser (recommended for avoiding detection)
--lang string Language code (default "en")
--region string Region code (default "us")
--format string Output format (json, csv, table) (default "json")
--output string Output file (default: stdout)
--page int Result page number (default 1)
--min-words int Minimum word count in description
--max-words int Maximum word count in description
--domain string Filter results by domain (include)
--exclude-domain string Filter results by domain (exclude)
--keyword string Filter results by keyword
--type string Filter by result type (organic, special, etc.)
--site string Limit results to specific site
--filetype string Limit results to specific file type
--verbose Enable verbose logging
--debug Enable debug mode (saves HTML responses)
--log string Log file path
--stats string Statistics output file
--help Show help
Search with Advanced Filters π§°
./gosearch --query "machine learning" --engine bing --domain edu --format table

Multi-Engine Search with Headless Browser π
./gosearch --query "climate science" --engine all --headless --output results.json

Filetype Specific Search π
./gosearch --query "research papers" --filetype pdf --site edu --max 20
package main
import (
"context"
"fmt"
"time"
"github.com/RahulSDevloper/Search-Engine-Scraper---Golang/pkg/engines"
"github.com/RahulSDevloper/Search-Engine-Scraper---Golang/pkg/models"
)
func main() {
// Create a new Google search engine
engine := engines.NewGoogleSearchEngine()
// Configure search request with optimization strategy
request := models.SearchRequest{
Query: "golang concurrency patterns",
MaxResults: 10,
Timeout: 30 * time.Second,
UseHeadless: true,
Debug: true,
}
// Execute search with context for cancellation
ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second)
defer cancel()
results, err := engine.Search(ctx, request)
if err != nil {
fmt.Printf("Error: %v\n", err)
return
}
// Process and analyze results
for i, result := range results {
fmt.Printf("%d. %s\n%s\n\n", i+1, result.Title, result.URL)
}
}
# ~/.config/gosearch/config.yaml
rate_limits:
google: 10 # requests per minute
bing: 15
duckduckgo: 20
proxy_rotation:
enabled: true
proxies:
- http://proxy1:8080
- http://proxy2:8080
rotation_strategy: round-robin # or random
If you're not getting any results, try these solutions:
-
Use Headless Mode to avoid detection
./gosearch --query "your search" --headless
-
Use a Proxy to route through a clean IP address
./gosearch --query "your search" --proxy http://your-proxy-server:port
-
Enable Debug Mode to examine the HTML response
./gosearch --query "your search" --debug
graph TD
A[Run Search] --> B{Results Found?}
B -->|Yes| C[Process Results]
B -->|No| D[Enable Debug Mode]
D --> E[Check HTML Responses]
E --> F{Captcha Present?}
F -->|Yes| G[Use Headless + Proxy]
F -->|No| H[Check Selectors]
H --> I[Update Selectors]
I --> A
G --> A
Engine | Results/Second | Memory Usage | Detection Avoidance |
---|---|---|---|
6.5 | Low | High | |
Bing | 8.2 | Low | Medium |
DuckDuckGo | 7.3 | Low | Very High |
All (Concurrent) | 4.8 | Medium | Medium |
The Search Engine Scraper follows these core principles:
- Resilience First: Designed to handle the constantly changing DOM structures of search engines
- Performance Focused: Optimized for speed while maintaining low resource usage
- Privacy Conscious: Minimal footprint to avoid detection
- Developer Friendly: Clean API for integration into other Go applications
This project is licensed under the MIT License - see the LICENSE file for details.