Docs/SDK/Installation

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-runtime
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:

  1. Sign up at predicatesystems.ai
  2. Navigate to API Keys section in your dashboard
  3. Create a new API key (starts with sk_)
  4. 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-runtime or npm install @predicatesystems/runtime

"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-runtime  # Install in current environment

Need more help?

Check out our example repository or contact support.

Next Steps