# cdnjs on Onekey > 2 endpoints for cdnjs (2 stable, 0 beta), 1 to 5 credits each. Category: Developer platforms. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/cdnjs Reference (Markdown): https://onekey.dev/docs/api/cdnjs.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 2 mapped cdnjs endpoints return each: - `entity.description` (string): 2 - `entity.name` (string): 2 - `entity.url` (URL): 2 - `package.homepageUrl` (URL): 2 - `package.license` (string): 2 - `package.version` (string): 2 - `entity.tags` (list of strings): 1 - `package.repositoryUrl` (URL): 1 - plus 2 platform-specific fields under `ext.` ## Endpoints ### cdnjs.library Metadata of a cdnjs library. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/cdnjs/library?name=jquery` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): cdnjs library name - Fields returned: `entity.name`, `package.version`, `entity.description`, `package.homepageUrl`, `package.license`, `entity.url`, `package.repositoryUrl`, `entity.tags`, `ext.filename`, `ext.versions` - Reference: https://onekey.dev/docs/api/cdnjs/library.md ### cdnjs.search Search cdnjs libraries. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/cdnjs/search?q=jquery` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `entity.name`, `package.version`, `entity.description`, `entity.url`, `package.homepageUrl`, `package.license` - Reference: https://onekey.dev/docs/api/cdnjs/search.md ## Sample request ```bash curl "https://api.onekey.dev/v1/cdnjs/library?name=jquery" \ -H "x-api-key: YOUR_API_KEY" ```