Last updated: 2026-01-24
Status: Current & maintained
Target audience: New users, developers getting started
# Basic installation
pip install -U webscout
# With OpenAI-compatible API server
pip install -U "webscout[api]"
# Development installation
pip install -U "webscout[dev]"UV is a fast Python package manager that Webscout fully supports:
# Install Webscout with uv
uv add webscout
# Or install as a global tool
uv tool install webscout
# Run immediately without installing
uv run webscout --help# Pull and run the official Docker image
docker pull OEvortex/webscout:latest
docker run -it OEvortex/webscout:latest# Check version
webscout version
# List available commands
webscout --helpMany Webscout providers work without authentication. Here's a quick example:
from webscout import Meta
# Initialize the provider
ai = Meta()
# Ask a question
response = ai.chat("Explain quantum computing in simple terms")
print(response)Expected output:
Quantum computing is a type of computing that uses quantum bits...
If you have an OpenAI API key:
from webscout import OpenAI
# Initialize with your API key
client = OpenAI(api_key="sk-your-api-key-here")
# Simple chat
response = client.chat("What are the benefits of renewable energy?")
print(response)# GROQ - Fast inference
from webscout import GROQ
groq = GROQ(api_key="your-groq-api-key")
response = groq.chat("Write a Python function to sort a list")
print(response)
# Cohere - Powerful language model
from webscout import Cohere
cohere = Cohere(api_key="your-cohere-api-key")
response = cohere.chat("Summarize the theory of relativity")
print(response)
# Google Gemini
from webscout import GEMINI
gemini = GEMINI(api_key="your-gemini-api-key")
response = gemini.chat("What is machine learning?")
print(response)For longer responses, stream them in real-time:
from webscout import GROQ
client = GROQ(api_key="your-groq-api-key")
# Enable streaming
response = client.chat("Write a 500-word essay on AI ethics", stream=True)
# Print each chunk as it arrives
for chunk in response:
print(chunk, end="", flush=True)# Basic text search
webscout text -k "python programming"
# Image search
webscout images -k "mountain landscape"
# News search
webscout news -k "AI breakthrough"
# Weather
webscout weather -l "New York"from webscout import DuckDuckGoSearch
# Initialize
search = DuckDuckGoSearch()
# Perform text search
results = search.text("best practices for API design", max_results=5)
for result in results:
print(f"Title: {result['title']}")
print(f"URL: {result['href']}")
print(f"Snippet: {result['body']}\n")from webscout import BingSearch, YepSearch, YahooSearch
# Bing
bing = BingSearch()
results = bing.text("climate change solutions")
# Yep (privacy-focused)
yep = YepSearch()
results = yep.text("machine learning")
# Yahoo
yahoo = YahooSearch()
results = yahoo.text("python frameworks")from webscout.Provider.TTI import Pollinations
# Initialize
image_generator = Pollinations()
# Generate an image
image_path = image_generator.generate_image(
prompt="A serene mountain landscape at sunset",
model="pollinations"
)
print(f"Image saved to: {image_path}")from webscout.Provider.TTI import Together, MiraGic
# Together AI
together = Together()
image = together.generate_image("A futuristic city")
# MiraGic
miragic = MiraGic()
image = miragic.generate_image("A robot playing chess")Solution:
# Ensure the package is installed
pip install -U webscout
# Or if using uv
uv add webscout
# If developing locally
cd /path/to/Webscout
pip install -e .Solution:
- Verify your API key is correct and copied without extra spaces
- Check that your API key hasn't expired
- Ensure you're using the correct provider class for your key
# Good - API key is set correctly
client = OpenAI(api_key="sk-your-actual-key-here")
# Bad - Extra spaces or quotes
client = OpenAI(api_key=" sk-your-key ") # Extra spaces!Solution:
import time
from webscout import GROQ
client = GROQ(api_key="your-api-key")
# Add delay between requests
for i in range(10):
response = client.chat(f"Question {i}")
print(response)
time.sleep(2) # Wait 2 seconds between requestsSolution:
from webscout import OpenAI
# Increase timeout from default 30 seconds
client = OpenAI(
api_key="your-api-key",
timeout=60 # 60 seconds
)
try:
response = client.chat("Your question here")
except Exception as e:
print(f"Error: {e}")
# Handle the error gracefullySolution:
from webscout import GROQ
client = GROQ(api_key="your-api-key")
# Use proper streaming syntax
response = client.chat("Write a poem", stream=True)
# Check if response is a generator
import types
if isinstance(response, types.GeneratorType):
for chunk in response:
print(chunk, end="", flush=True)
else:
print(response)- API Reference — Deep dive into all available classes and methods
- Provider Development — Create custom providers
- Examples — Real-world code examples
- Troubleshooting — Solution to common problems
-
Conversational AI — Maintain multi-turn conversations
from webscout import Meta ai = Meta(is_conversation=True) ai.chat("Hello, what's your name?") ai.chat("Can you remember my question?") # Context preserved
-
Web Search Integration — Combine search with AI
from webscout import DuckDuckGoSearch, Meta search = DuckDuckGoSearch() results = search.text("latest AI news") ai = Meta() response = ai.chat(f"Summarize this news: {results[0]['body']}")
-
CLI Interface — Use Webscout from terminal
webscout text -k "python tips and tricks" webscout images -k "nature photography" --size large
- Environment variables — Set default API keys
- Configuration — Adjust timeouts, retries, and more
- Custom providers — Build your own integrations
# Interactive chat (if supported by provider)
webscout chat
# Show available AI providers
webscout providers list# DuckDuckGo (default)
webscout text -k "search term"
webscout images -k "search term"
webscout news -k "search term"
# Alternative engines
webscout bing_text -k "search term"
webscout yep_text -k "search term"
webscout yahoo_text -k "search term"# Show version
webscout version
# Help for specific command
webscout text --help- Install Python extension
- Select your Python interpreter (where you installed Webscout)
- Create a
.code-workspacefile:
{
"folders": [{"path": "."}],
"settings": {
"python.defaultInterpreterPath": "${workspaceFolder}/venv/bin/python"
}
}- File → Settings → Project → Python Interpreter
- Click the gear icon and select Add...
- Choose Existing Environment and select your Python interpreter
- Webscout should now autocomplete and provide IntelliSense
You're now ready to:
- ✅ Use Webscout for chat and search
- ✅ Generate images
- ✅ Integrate with your projects
- ✅ Troubleshoot basic issues
Next: Explore the API Reference for advanced usage patterns.
For detailed troubleshooting, see Troubleshooting Guide.