Minimal scripts showing how to call the Elicit API from Node.js using native fetch.
- Node.js 18+ (for native
fetchand top-levelawait) - An Elicit API key (account settings)
export ELICIT_API_KEY="your-api-key"No dependencies to install — the package.json just sets "type": "module" for ESM support.
Search for academic papers with a research question.
node 1_search.jsNarrow results by study type, publication year, and journal quartile.
node 2_filtered_search.jsGenerate an AI-powered research report. Reports take 5-15 minutes — the script polls until completion.
node 3_create_report.js- These examples use top-level
await, which requires ESM ("type": "module"inpackage.json) or the--input-type=moduleflag. - No HTTP library is needed — Node 18+ includes
fetchglobally. - Error handling is intentionally minimal to keep the examples readable. See the CLI tool or Slack bot for production patterns.
See the API documentation for all available parameters and filters.