npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@scoutscore/sdk

v0.1.1

Published

Official TypeScript SDK for ScoutScore - Agent Trust Intelligence API

Readme

ScoutScore TypeScript SDK

Official TypeScript SDK for ScoutScore - Agent Trust Intelligence API.

npm version License: MIT

Installation

npm install @scoutscore/sdk

or

yarn add @scoutscore/sdk

Quick Start

import { ScoutScore } from '@scoutscore/sdk';

// Initialize the client
const scout = new ScoutScore();

// Score a Bazaar service
const service = await scout.scoreBazaarService('api.example.com');
console.log(`Service score: ${service.score}/100 (${service.level})`);
console.log(`Uptime: ${service.reliability?.uptime7d}%`);

// Check fidelity (does the service do what it advertises?)
const fidelity = await scout.getFidelity('api.example.com');
console.log(`Fidelity: ${fidelity.fidelityScore}/100`);

// Browse the leaderboard
const board = await scout.getLeaderboard({ limit: 10 });
for (const svc of board.services) {
  console.log(`#${svc.rank} ${svc.domain} - ${svc.score}/100 (${svc.level})`);
}

Features

  • Full TypeScript Support - Complete type definitions with IntelliSense
  • Automatic Retries - Built-in exponential backoff for failed requests
  • Fast & Lightweight - Zero dependencies, <15KB packed
  • Error Handling - Custom error classes for precise error handling
  • Well Documented - Comprehensive JSDoc comments

API Reference

Client Initialization

import { ScoutScore } from '@scoutscore/sdk';

// Simple initialization (public endpoints)
const scout = new ScoutScore();

// With custom configuration
const scout = new ScoutScore({
  baseUrl: 'https://scoutscore.ai',  // Custom base URL
  timeout: 15000,                     // Request timeout (ms)
  retries: 5,                         // Retry attempts
  apiKey: process.env.SCOUT_API_KEY  // For future paid tier
});

Score a Bazaar Service

Score a service from the x402 Bazaar:

const service = await scout.scoreBazaarService('api.example.com');

console.log(service.score);             // 75
console.log(service.level);             // "HIGH" | "MEDIUM" | "LOW" | "VERY_LOW"
console.log(service.endpointHealth);    // { status: "UP", latencyMs: 245, ... }
console.log(service.reliability);       // { uptime7d: 99.8, trend: "improving", ... }
console.log(service.recommendation.escrowAdvised);  // true | false | "optional"

Check Fidelity

Verify whether a service's actual behavior matches its advertised contract:

const fidelity = await scout.getFidelity('api.example.com');

console.log(fidelity.fidelityScore);                    // 100
console.log(fidelity.level);                            // "HIGH"
console.log(fidelity.layers.protocolCompliance.score);  // 100
console.log(fidelity.layers.contractConsistency.score); // 100
console.log(fidelity.layers.responseStructure.score);   // 100
console.log(fidelity.flags);                            // ["PROTOCOL_COMPLIANT", ...]

Browse the Leaderboard

Get a paginated, filterable list of all scored services:

// Top 10 services
const board = await scout.getLeaderboard({ limit: 10 });
console.log(`Total services: ${board.stats.totalServices}`);
for (const svc of board.services) {
  console.log(`#${svc.rank} ${svc.domain} - ${svc.score}/100 (${svc.level})`);
}

// Search and filter
const ai = await scout.getLeaderboard({
  search: 'image',
  category: 'AI & ML',
  limit: 20,
  offset: 0
});

Batch Score Services

Score multiple Bazaar services in one request (max 20):

const result = await scout.scoreBazaarBatch([
  'api.example.com',
  'service.example.com',
  'another.example.com'
]);

console.log(result.batch.averageScore);  // 68
console.log(result.batch.scored);        // 3
console.log(result.batch.distribution);  // { HIGH: 1, MEDIUM: 2, LOW: 0, VERY_LOW: 0 }
console.log(result.results);            // Array of scores

Get Bazaar Statistics

const stats = await scout.getBazaarStats();
console.log(stats.stats.services.total);        // 13681
console.log(stats.stats.pricing.averagePriceUSD); // 14.96
console.log(stats.stats.schemas.coveragePercent); // 18

Health Check

Check API health status:

const health = await scout.getHealth();
console.log(health.status);     // "ok" | "degraded" | "down"
console.log(health.version);    // "3.0"
console.log(health.endpoints);  // Available API endpoints

Error Handling

The SDK provides custom error classes for precise error handling:

import {
  ServiceNotFoundError,
  RateLimitError,
  ValidationError,
  NetworkError,
  TimeoutError
} from '@scoutscore/sdk';

try {
  const score = await scout.scoreBazaarService('nonexistent.com');
} catch (error) {
  if (error instanceof ServiceNotFoundError) {
    console.error('Service not found');
  } else if (error instanceof RateLimitError) {
    console.error(`Rate limited. Retry after ${error.retryAfter}s`);
  } else if (error instanceof TimeoutError) {
    console.error('Request timed out');
  } else if (error instanceof ValidationError) {
    console.error(`Invalid input: ${error.message}`);
  } else {
    console.error('Unexpected error:', error);
  }
}

TypeScript Support

Full TypeScript support with comprehensive type definitions:

import type {
  BazaarScore,
  FidelityResponse,
  LeaderboardResponse,
  TrustLevel
} from '@scoutscore/sdk';

// Type-safe responses
const service: BazaarScore = await scout.scoreBazaarService('api.example.com');
const level: TrustLevel = service.level;  // "HIGH" | "MEDIUM" | "LOW" | "VERY_LOW"

// IntelliSense autocomplete for all fields
if (service.recommendation.verdict === 'RECOMMENDED') {
  console.log(`Max transaction: $${service.recommendation.maxTransaction}`);
}

Examples

Check Service Reliability

const service = await scout.scoreBazaarService('api.example.com');

if (service.reliability?.sufficientData) {
  console.log(`7-day uptime: ${service.reliability.uptime7d}%`);
  console.log(`Avg latency: ${service.reliability.avgLatency7d}ms`);
  console.log(`Trend: ${service.reliability.trend}`);
} else {
  console.log('Not enough data for reliability metrics');
}

Handle Escrow Recommendations

const service = await scout.scoreBazaarService('untrusted.example.com');

if (service.recommendation.escrowAdvised === true) {
  console.log('Escrow required');
  console.log(`Reason: ${service.recommendation.escrowReason}`);
  console.log(`Suggested provider: ${service.recommendation.suggestedEscrowProvider?.name}`);
} else if (service.recommendation.escrowAdvised === 'optional') {
  console.log('Escrow optional (moderate risk)');
} else {
  console.log('Direct payment acceptable (trusted service)');
}

Batch Process Services

const domains = [
  'api1.example.com',
  'api2.example.com',
  'api3.example.com',
  // ... up to 20
];

const batch = await scout.scoreBazaarBatch(domains);

// Filter by trust level
const highTrust = batch.results.filter(r => r.level === 'HIGH');

console.log(`${highTrust.length} high-trust services found`);

Requirements

  • Node.js 18 or higher (requires native fetch)
  • TypeScript 5.0+ (for TypeScript projects)

Browser Support

The SDK works in modern browsers that support the Fetch API and ES2020:

import { ScoutScore } from '@scoutscore/sdk';

const scout = new ScoutScore();
const service = await scout.scoreBazaarService('api.example.com');
// Works in Chrome, Firefox, Safari, Edge

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

License

MIT - ScoutScore

Support

  • Issues: https://github.com/scoutscore/scout/issues

Made by the ScoutScore team