Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt

Use this file to discover all available pages before exploring further.

SSCholarResource exposes Semantic Scholar’s paper and author APIs as a read-only tree. Setup steps for the API key live at Semantic Scholar Credentials.

Node

pnpm add @struktoai/mirage-node
import { MountMode, SSCholarResource, Workspace } from '@struktoai/mirage-node'

const sscholar = new SSCholarResource({
  apiKey: process.env.SEMANTIC_SCHOLAR_API_KEY,
})

const ws = new Workspace({ '/papers': sscholar }, { mode: MountMode.READ })
await ws.execute('ls /papers/search/')

Browser

pnpm add @struktoai/mirage-browser
import { MountMode, SSCholarResource, Workspace } from '@struktoai/mirage-browser'

const sscholar = new SSCholarResource({
  apiKey: SEMANTIC_SCHOLAR_API_KEY,
})

Config

FieldDefaultNotes
apiKeynoneOptional API key. Without it you get the public rate limit. Redacted in snapshots.
baseUrlhttps://api.semanticscholar.orgOverride for development proxies.
defaultListLimit100Default page size for listings.
defaultSearchLimit100Default page size for searches.
defaultSnippetLimit5Snippets returned per paper.

Mount mode

read.