Work Retrieval

Retrieve a Work by Work ID

Fetch a work by Drylab work ID with optional version metadata, expansions, or raw payload. Response schemas are the same returned by the API endpoints described here.

const res = await client.works.get(
    "work-id-123", // required; Dryad work identifier
    {
      versions: "all", // optional; include version metadata ("all"|"none"|`v{number}`)
      expand: ["sections", "blocks"], // optional; string or string[] for additional payload data
      raw: false, // optional; boolean to request raw source payload
    }
  );

Resolve DOI

Resolve a DOI to a work ID and return the same payload as GET . Response schemas are the same returned by the API endpoints described here.

const res = await client.works.getByDOI(
    "10.1234/example", // required; DOI to resolve
    {
      versions: "all", // optional; include version label ("all"|"none"|`v{number}`)
      expand: ["sections"], // optional; string or string[] for additional payload data
      raw: false, // optional; boolean to request raw source payload
    }
  );

Retrieve multiple Works

Search the works index with rich filtering, pagination, and include/expand controls.

const res = await client.works.list({
    q: "glioblastoma", // optional; search query string
    source: "medrxiv", // optional; filter by source ("biorxiv"|"medrxiv"|"arxiv")
    since: "2024-01-01", // optional; ISO8601 lower bound on published_at
    until: "2024-12-31", // optional; ISO8601 upper bound on published_at
    has_assets: true, // optional; boolean or "true"/"false" string to require assets
    license: "cc-by-4.0", // optional; filter by license slug
    sort: "published_at", // optional; sort field ("published_at"|"created_at")
    order: "desc", // optional; sort direction ("asc"|"desc")
    limit: 25, // optional; max results per page
    cursor: "opaque-cursor", // optional; pagination cursor from previous response
    include: ["sections"], // optional; string or string[] of related data to include
    expand: ["blocks"], // optional; string or string[] of expandable fields
  });

Last updated