Installation
Install the Predicate SDK for Python or TypeScript. Both SDKs provide the same functionality and work with Playwright for browser automation.
Python SDK
pip install predicate-sdk
playwright install chromium
Requirements
- Python 3.8 or higher
- pip (Python package manager)
- Playwright (automatically installed)
Verify Installation
python -c "from predicate import PredicateBrowser; print('SDK installed!')"
# Output: SDK installed!
View Python SDK on GitHub →
TypeScript SDK
Requirements
- Node.js 16 or higher
- npm or yarn package manager
- Playwright (automatically installed)
View TypeScript SDK on GitHub →
Get Your API Key
To use server-side features (importance ranking, smart filtering), you'll need an API key:
- Sign up at predicatesystems.ai
- Navigate to API Keys section in your dashboard
- Create a new API key (starts with
sk_)
- Set it as an environment variable or pass it to the SDK
Environment variable (recommended):
export PREDICATE_API_KEY="sk_..."
Free Tier Available
You can use the SDK without an API key for both local & cloud based processing with your free credits:
- All SDK functions work
- Limited server API calls (no credit card required)
- Full importance ranking within free credit limits
- Full smart filtering within free credit limits
Upgrade to Pro, Builder, Teams, or Enterprise tier when you need production-grade ranking and filtering.
Troubleshooting
"Extension failed to load"
The Predicate extension should be automatically loaded. If you see this error:
- Ensure Playwright Chromium is installed:
playwright install chromium
- Check that you have the latest SDK version
- Try reinstalling:
pip install --upgrade predicate-sdk or npm install @predicatesystems/sdk
"ModuleNotFoundError" (Python)
Make sure you're using the correct Python environment:
python --version # Check Python version
pip --version # Check pip is available
pip install predicate-sdk # Install in current environment
Need more help?
Check out our example repository or contact support.
Next Steps
- Quick Start → - Get started with your first automation in 5 minutes
- SDK Reference → - Explore all SDK functions and examples