# cdnjs Library Lookup

> cdnjs Library Lookup is a paid API for AI agents from intel.rallylive.ca, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Looks up a JavaScript library on cdnjs, returning its latest version, CDN URL, SRI hash, license, homepage, GitHub repo, and the 15 most recent versions for instant script tag generation.

## Facts

- Endpoint: GET https://intel.rallylive.ca/dev/cdnjs
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cdnjs-library-lookup-d2ad58a8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KoB4mFLY8xNIO0xGRoOm5

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability cdnjs-library-lookup-d2ad58a8
```

Example prompt: Look up lodash on cdnjs and give me the latest version's full CDN script tag with the SRI integrity hash so I can drop it straight into my HTML.

## When to prefer this

Use this endpoint when an agent needs to generate or verify a CDN script tag for a front-end JavaScript library, especially when SRI hashes are required for Content Security Policy compliance. Prefer this over generic web scraping when you need structured, parsed cdnjs metadata including version history and integrity hashes in a single call.

## Known failure modes

- Library not found on cdnjs — returns an error or empty result
- Misspelled library name — no match returned
- Library exists but has no default file set — CDN URL may be absent
- Network timeout fetching cdnjs API — service error returned

## How this service works

cdnjs library lookup: latest version, description, homepage, license, default file and its full CDN URL with SRI hash, GitHub repo, and the latest 15 versions. Instant script tags for front-end agents. $0.01 per library.

## Output

Returns the library's latest version number, description, homepage URL, license, default file path and its full CDN URL, the SRI hash for that file, a link to its GitHub repository, and a list of the 15 most recent versions — everything needed to generate a ready-to-use HTML script tag.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cdnjs-library-lookup-d2ad58a8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from intel.rallylive.ca](https://www.zero.xyz/host/intel.rallylive.ca/llms.txt)
