APIReference

Get paper nodes

Get nodes with optional filtering. Use this for fine-grained access to paper structure.

Paper content is stored as a tree of typed nodes: sections, equations, figures, tables, etc. Filter by type to get specific elements:

  • ?types=equation - all equations with LaTeX
  • ?types=table - all tables with content
  • ?types=math_env - all theorems, lemmas, proofs
  • ?types=algorithm - all algorithms

Multi-node support: Fetch multiple specific nodes in one request:

  • ?nodeIds=eq:1,eq:2,fig:1 - get equations 1, 2 and figure 1
  • ?nodeIds=sec:3,sec:4 - get sections 3 and 4 with all content

For a quick overview of what's in a paper (including figure image URLs), use /overview (free).

Counts toward paper quota on first access.

GET
/papers/{id}/nodes

Authorization

ApiKeyAuth
x-api-key<token>

API key for authentication. Get yours at https://sciencestack.ai/settings/api

Format: sk_live_... or sk_test_...

In: header

Path Parameters

id*string

Paper ID — either arXiv ID (e.g., 1706.03762) or internal UUID

Query Parameters

types?string

Comma-separated node types to filter by. Types: section, equation, equation_array, figure, table, algorithm, code, math_env, environment, list, content_block

nodeIds?string

Get specific nodes and their descendants by ID. Comma-separated list of node IDs (e.g., eq:1, eq:1,eq:2,fig:1).

Ordering: Results are always returned in document order, regardless of input order. Duplicates: Automatically deduplicated.

descendants?boolean

Include descendants when nodeIds is set

Defaulttrue
context?integer

When a single nodeId is set, include N nodes before/after (stops at section boundary)

Range0 <= value <= 20
startIndex?integer

Filter by order_index range (inclusive)

endIndex?integer

Filter by order_index range (exclusive)

format?string

Output format:

  • markdown: Formatted markdown (default)
  • raw: JSON AST with tokens (Pro only)
  • latex: Reconstructed LaTeX
Default"markdown"
Value in"raw" | "markdown" | "latex"
limit?integer

Maximum results to return

Default100
Rangevalue <= 500
offset?integer

Pagination offset

Default0
styles?boolean

Include text styling (bold, italic). Default false for cleaner LLM input.

Defaultfalse
preserveLabels?boolean

Keep original LaTeX labels (e.g., \ref{lem:HS}) instead of resolving to node IDs (e.g., lem:2.1). Useful for LaTeX export where you want compilable output. Default false (labels resolved to actionable node IDs for API navigation).

Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://sciencestack.ai/api/v1/papers/1706.03762/nodes?types=equation&nodeIds=eq%3A1"
{
  "data": [
    {
      "nodeId": "string",
      "type": "document",
      "orderIndex": 0,
      "depth": 0,
      "parentNodeId": "string",
      "content": null,
      "metadata": {}
    }
  ],
  "pagination": {
    "offset": 0,
    "limit": 0,
    "hasMore": true
  },
  "_version": "string"
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid API key"
  }
}
{
  "error": {
    "code": "UPGRADE_REQUIRED",
    "message": "Pro plan required for raw format. Upgrade at https://sciencestack.ai/pricing"
  }
}
{
  "error": {
    "code": "PAPER_NOT_FOUND",
    "message": "Paper not found: 9999.99999"
  }
}
{
  "error": {
    "code": "PAPER_LIMIT_EXCEEDED",
    "message": "Monthly paper limit reached. Upgrade at https://sciencestack.ai/pricing"
  }
}