Scan your whole stack
From OX Research Newsroom
Are you using kitsu?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v13.0.4
kitsu was last scanned on 23 Nov 2026 at version 13.0.4. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 13.0.4 LATEST | 23 Nov 2026 | No rules fired |
| 13.0.3 | 19 Oct 2026 | No rules fired |
| 13.0.2 | 16 Oct 2026 | No rules fired |
| 13.0.1 | 16 Oct 2026 | Not shown |
| 13.0.0 | 16 Oct 2026 | Not shown |
Findings for v13.0.4. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 13.0.4; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Relationships are direct resources, arrays, or null. Resource metadata lives under $; document metadata stays at document level. See migration guidance and compliance boundaries.
{
data: {
id: '1'
type: 'articles'
attributes: {
title: 'JSON API paints my bikeshed'
}
relationships: {
author: {
data: {
id: '42'
type: 'people'
}
}
}
}
included: [
{
id: '42'
type: 'people'
attributes: {
name: 'John'
}
}
]
}
const result = {
data: {
id: '1',
type: 'articles',
title: 'JSON API paints my bikeshed',
author: { id: '42', type: 'people', name: 'John' }
},
included: [{ id: '42', type: 'people', name: 'John' }]
}
// data.author and included[0] reference the same object.
bun add kitsu
npm install kitsu
yarn add kitsu
import Kitsu from "kitsu";
import Kitsu from 'kitsu'
// kitsu.app's API
const defaultApi = new Kitsu()
// Other JSON:API servers
const api = new Kitsu({
baseURL: 'https://api.example/2'
})
// Using with async/await
interface Anime {
id: string
type: 'anime'
canonicalTitle: string
}
const result = await api.get<Anime[]>('anime')
console.log(result.data?.[0]?.canonicalTitle)
// Using with Promises
api.get('anime')
.then(result => console.log(result.data))
.catch((error: unknown) => console.error(error))
// Fetching resources (get/fetch)
api.fetch('anime')
api.fetch('anime', { params: { filter: { id: 1 } } })
api.fetch('anime/1/episodes')
api.fetch('anime/1/relationships/episodes')
// Creating resources (post/create)
api.create('post', {
content: 'some content'
})
// Updating resources (patch/update)
api.update('post', {
id: '1',
content: 'new content'
})
// Deleting resources (delete/remove)
api.remove('post', 1)
// JSON:API parameters
api.get('users', {
params: {
include: 'followers,waifu.character',
fields: {
users: 'slug,followers,waifu'
},
filter: {
slug: 'wopian'
},
sort: '-id',
page: {
limit: 5,
offset: 0
}
}
})
[More Examples]
If you're working with [kitsu.app]'s API, their [API docs][kitsu.app api docs] lists all available resources with their attributes & relationships
See [CONTRIBUTING]
See [CHANGELOG]
All code released under [MIT]
JSON:API client using Axios, including adapters and interceptors.
Constructor options configure defaults. Pass params and document per request; constructor params and document are accepted by the type but ignored.
options KitsuOptions Client defaults; see typed properties and individual examples in KitsuOptions (optional, default {})
options.baseURL string API base URL for relative resource paths (optional, default 'https://kitsu.app/api/edge')options.headers JsonObject? Default headers. Accept and Content-Type initially use application/vnd.api+json. Media parameters and Accept alternatives are preserved.options.query ("traditional" | "modern" | function (JsonObject?): string) Traditional mode repeats array keys. Modern mode uses key[]. A callback returns an encoded query string without ?. (optional, default 'traditional')options.camelCaseTypes boolean Convert inferred outgoing types to camelCase; decoded types stay unchanged (optional, default true)options.resourceCase ("kebab" | "snake" | "none") Generated URL case: library-entries, library_entries, or libraryEntries (optional, default 'kebab')options.attributeCase ("kebab" | "snake" | "none") Keep attribute names by default. kebab and snake encode that case and decode camelCase. Nested JSON, relationships, metadata, extension attributes and queries stay unchanged. (optional, default 'none')options.pluralize boolean Pluralize generated resource URLs and inferred outgoing types (optional, default true)options.timeout number Timeout in milliseconds. Top-level 0 also selects 30000; use axiosOptions.timeout: 0 to disable. (optional, default 30000)options.hoistData boolean Unwrap a single-resource document containing only data. Document metadata and included keep the wrapper; HTTP arrays and null stay under data. Resource metadata stays under $. (optional, default false)options.axiosOptions AxiosRequestConfig? Axios defaults, overriding generated baseURL, timeout and paramsSerializer when supplied.options.params JsonObject? Ignored at construction; pass config.params to a methodoptions.document JsonApiDocument? Ignored at construction; pass config.document on writesConfigure every constructor option
import Kitsu, { type KitsuOptions } from 'kitsu'
const options: KitsuOptions = {
baseURL: 'https://bakery.example/api',
headers: { Authorization: 'Bearer bakery-demo-token' },
query: 'modern',
camelCaseTypes: false,
resourceCase: 'snake',
attributeCase: 'kebab',
pluralize: false,
timeout: 10000,
hoistData: false,
axiosOptions: { withCredentials: true }
}
const api = new Kitsu(options)
await api.get('article', { params: { include: 'author' } })
Attribute casing enabled and disabled
const unchanged = new Kitsu({ attributeCase: 'none' })
const converted = new Kitsu({ attributeCase: 'kebab' })
await unchanged.post('people', { firstName: 'Mina' }) // attributes: { firstName: 'Mina' }
await converted.post('people', { firstName: 'Mina' }) // attributes: { 'first-name': 'Mina' }
// For a response with attributes: { 'first-name': 'Mina' }:
// unchanged.get('people/9') keeps data['first-name']; converted.get('people/9') gives data.firstName.
Document metadata, resource metadata, and hoisting
const wrapped = new Kitsu({ hoistData: false })
const hoisted = new Kitsu({ hoistData: true })
// Server body: { data: { type: 'people', id: '9', meta: { editable: true } } }
const first = await wrapped.get('people/9')
console.log(first.data.$.meta.editable) // true
const second = await hoisted.get('people/9')
console.log(second.$.meta.editable) // true; status and headers remain available
// If that body also contains meta: { total: 1 }, both clients retain data:
// result.meta.total describes the document; result.data.$.meta.editable describes the person.
Custom query serializer
const custom = new Kitsu({
query: (params) => new URLSearchParams({ title: String(params?.title ?? '') }).toString()
})
await custom.get('articles', { params: { title: 'Moonlight Bread' } })
// URL ends with ?title=Moonlight+Bread
Fetch a resource, collection, related resources, or relationship linkage. Alias: fetch.
model string Resource path: articles, articles/42, articles/42/author, or articles/42/relationships/author
config RequestConfig Per-request options (optional, default {})
config.headers JsonObject? Override default headers without changing client defaultsconfig.params JsonObject? Encoded query parameters: include, fields, sort, page, filter and extension families.config.document JsonApiDocument? Ignored by this read method; use document on writes.config.axiosOptions AxiosRequestConfig? Axios overrides, applied after generated headers and params. request() also permits method, url and data overrides. Use signal for cancellation.await api.get('articles', {
headers: { 'Accept-Language': 'en' },
params: { include: 'author', fields: { articles: 'title,author' }, sort: '-createdAt', page: { number: 2, size: 10 }, filter: { title: 'Bread' } },
axiosOptions: { timeout: 10000, signal: new AbortController().signal }
})
Returns Promise\ Decoded document with HTTP details
Update a resource or replace relationship linkage. Alias: update.
model string Resource or relationship path. With a bare resource name, body.id is appended to the URL.
body (JsonObject | Array\ | null) Flat resources or relationship identifiers. Use null to clear to-one linkage at a relationship endpoint.
config RequestConfig Per-request options (optional, default {})
config.headers JsonObject? Override default headers without changing client defaultsconfig.params JsonObject? Encoded query parameters: include, fields, sort, page, filter and extension families.config.document JsonApiDocument? Extra write document members: meta, links, jsonapi, included and extensions. No data or errors. Ignored by bodyless resource DELETE.config.axiosOptions AxiosRequestConfig? Axios overrides, applied after generated headers and params. request() also permits method, url and data overrides. Use signal for cancellation.Resource and document metadata
await api.patch('articles', {
id: '42', title: 'Moonlight Bread', $: { meta: { editable: true } }
}, { document: { meta: { requestId: 'demo-42' } } })
Clear relationships
await api.patch('articles/42/relationships/author', null)
await api.patch('articles/42/relationships/tags', [])
Returns Promise\ Decoded response with HTTP details
Create resources or add relationship linkage. Alias: create. Resource arrays require server support; no Atomic Operations processing.
model string Resource or relationship path
body (JsonObject | Array\ | null) Flat resources or relationship identifiers; full related resources generate included
config RequestConfig Per-request options (optional, default {})
config.headers JsonObject? Override default headers without changing client defaultsconfig.params JsonObject? Encoded query parameters: include, fields, sort, page, filter and extension families.config.document JsonApiDocument? Extra write document members: meta, links, jsonapi, included and extensions. No data or errors. Ignored by bodyless resource DELETE.config.axiosOptions AxiosRequestConfig? Axios overrides, applied after generated headers and params. request() also permits method, url and data overrides. Use signal for cancellation.await api.post('articles', { title: 'Moonlight Bread', author: { type: 'people', id: '9' } }, {
document: { meta: { requestId: 'demo-42' } }
})
await api.post('articles/42/relationships/tags', [{ type: 'tags', id: '3' }])
Returns Promise\ Decoded response with HTTP details
Delete a resource or remove relationship identifiers. Alias: remove. Resource DELETE sends no body. Relationship DELETE sends identifiers without appending their IDs to the URL. Legacy bulk resource DELETE requires server support.
model string Resource name or relationship path. For a resource, pass its ID separately.
id (string | number | Array\<(string | number)>) Resource ID, including 0, or IDs for relationship/bulk deletion
config RequestConfig Per-request options (optional, default {})
config.headers JsonObject? Override default headers without changing client defaultsconfig.params JsonObject? Encoded query parameters: include, fields, sort, page, filter and extension families.config.document JsonApiDocument? Extra write document members: meta, links, jsonapi, included and extensions. No data or errors. Ignored by bodyless resource DELETE.config.axiosOptions AxiosRequestConfig? Axios overrides, applied after generated headers and params. request() also permits method, url and data overrides. Use signal for cancellation.await api.delete('articles', '42') // DELETE /articles/42; no body
await api.delete('articles/42/relationships/tags', ['3'], { document: { meta: { requestId: 'demo-42' } } })
// DELETE /articles/42/relationships/tags; body: { data: [{ type: 'tags', id: '3' }] }
Returns Promise\ Decoded response; empty responses retain HTTP details
Fetch the first authenticated user. Server must support filter[self]=true; supplied filter is replaced.
config RequestConfig Per-request options (optional, default {})
config.headers JsonObject? Override default headers without changing client defaultsconfig.params JsonObject? Encoded query parameters: include, fields, sort, page, filter and extension families. self() replaces filter with { self: true }.config.document JsonApiDocument? Ignored by this read method; use document on writes.config.axiosOptions AxiosRequestConfig? Legacy self() forwards this object as outer get configuration. Use get() for transport overrides.const result = await api.self({ headers: { Authorization: 'Bearer bakery-demo-token' }, params: { fields: { users: 'name' } } })
console.log(result.data?.name)
Returns Promise\ First user under data, plus response headers. Legacy self() omits status and other document members.
Send an arbitrary JSON:API request without generated URL casing or pluralization.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.