Get Unit
AI-generatedSummary
Retrieve a knowledge unit by ID path, with optional format selection for markdown or JSON response.
Inputs
- unitId (required) — Unit ID path (e.g., 'consumer-electronics/audio/wireless-earbuds-under-150/2026')
- format — Response format: raw markdown or structured JSON with parsed frontmatter; defaults to 'md' if omitted
Output shape
json
Each returned item contains a
jsonproperty. Whenformatis 'json', the value is the parsed unit data fetched from the API endpoint/api/v1/units/{unitId}.json. Whenformatis 'md' (default), the value is{ id: string, format: 'markdown', content: string }wherecontentis the raw markdown text fetched from/api/v1/units/{unitId}.md. Authentication is handled via optionalknowledgelibApicredentials; if absent, public access tohttps://knowledgelib.iois used.
Examples
Example 1: Fetch a unit as raw markdown
unitId: 'consumer-electronics/audio/wireless-earbuds-under-150/2026', format: 'md' (default)
Example 2: Fetch a unit as structured JSON
unitId: 'consumer-electronics/audio/wireless-earbuds-under-150/2026', format: 'json'