Skip to main content
Copy-paste recipes that combine the RPCs. Each one uses the environment variables from Connecting.

Mirror the whole feed, then keep it current

This keeps a full local copy of the feed and keeps it current. It has two phases. First, backfill every report by paging from the start. Then, on each later run, pull only what changed since the newest updatedAt you stored.
Upsert each report by reportId. A withdrawal moves updatedAt, so retractions arrive through the same loop. When you see withdrawn: true, retire the record on your side.

Poll for new malicious npm packages

Keep the last updatedAt you saw. Then pull only verified-malicious npm reports that changed after it:
Run it on a schedule. Move your watermark to the largest updatedAt in each batch.

Expand a campaign into its member packages

After the backfill, the steady state is always the same. Call ListPackageReports with filters.since set to your high-water mark. See Pagination & sync.