pje-scraping

Automate PJE scraping workflows across Brazilian tribunals with SSO login, OTP handling, and API-based data retrieval.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/SynthropicTechnology/diegobarbosa-os --skill pje-scraping-synthropictechnology
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pje-scraping
Source: https://github.com/SynthropicTechnology/diegobarbosa-os/tree/main/.claude/skills/pje-scraping
Command: npx skills add https://github.com/SynthropicTechnology/diegobarbosa-os --skill pje-scraping-synthropictechnology

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides specialized automation and web scraping capabilities for PJE (Processo Judicial Eletrônico) across Brazilian tribunals, enabling reliable data extraction and streamlined workflows that reduce manual login and data retrieval time.

Core Features & Use Cases

  • Executors PJE: TypeScript-based executors that run scraping locally, including PuppeteerPJEExecutor for development speed, PlaywrightPJEExecutor for production stealth, and an ExecutorFactory to auto-select the appropriate executor.
  • Authentication Helpers: Centralized utilities to apply anti-detection configurations, process OTPs via a 2FAuth API, wait for SSO redirects, and extract lawyer IDs from cookies.
  • API Integration: A REST API route at app/api/scrape-pje that accepts credentials, tribunal configuration, and scrape type (acervo, expedientes, pauta) to initiate scraping via a configured browser.
  • Scraping Categories: Supports Acervo (active processes), Expedientes (notifications), and Pauta (hearing schedules) across tribunals.
  • End-to-End Scraping Flow: Orchestrates frontend API calls to executor creation, automated login, OTP handling, data extraction via tribunal APIs, and structured return logs for frontend consumption.

Quick Start

Provide credentials, tribunal configuration, and optional browser preference to /api/scrape-pje to begin scraping.

Frequently Asked Questions about pje-scraping

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate PJE scraping across Brazilian tribunals with SSO and OTP?

Automating PJE scraping involves using modular executors that handle SSO logins, process OTPs via a 2FAuth API, and extract lawyer IDs from cookies. The system orchestrates automated login, OTP handling, and data retrieval to return normalized case data.

What is the best way to extract hearing schedules and expedientes from PJE?

The best way to extract hearing schedules and expedientes is by specifying the scrape type as pauta or expedientes in the REST API request. The automation flow then targets these specific scraping categories to collect and normalize the relevant case data.

Can I use Puppeteer for PJE scraping or does it require Playwright?

You can use either Puppeteer or Playwright for PJE scraping. PuppeteerPJEExecutor is available for development speed, while PlaywrightPJEExecutor is used for production stealth, and an ExecutorFactory auto-selects the appropriate executor based on your configuration.

How does anti-detection configuration work when scraping Brazilian tribunal data?

Anti-detection configuration works by applying centralized authentication helpers and stealth settings during browser automation. This ensures reliable data extraction from PJE tribunals without triggering security blocks during the SSO login and scraping flow.

Does PJE scraping support retrieving active processes from the acervo?

Yes, PJE scraping supports retrieving active processes from the acervo. You can initiate this by sending credentials and tribunal configuration to the scrape API route with the scrape type set to acervo.