npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@redpine-ai/n8n-nodes-redpine

v0.1.2

Published

n8n node for Redpine: search licensed publisher collections and open-access research as cited full text

Readme

@redpine-ai/n8n-nodes-redpine

This is an n8n community node. It lets you use Redpine in your n8n workflows.

Redpine searches licensed publisher collections and open-access research, as full text rather than abstracts. Every result is cited to its source, and publishers are paid when their content is used.

n8n is a fair-code licensed workflow automation platform.

Installation Credentials Operations Costs Usage Compatibility Resources

Installation

Follow the installation guide in the n8n community nodes documentation. In Settings > Community Nodes > Install, enter the npm package name @redpine-ai/n8n-nodes-redpine.

Credentials

The node authenticates with a Redpine API key.

  1. Sign in to the Redpine dashboard.
  2. Open Settings > API Keys and create a key. It starts with sk_live_.
  3. In n8n, create a Redpine API credential and paste the key.

n8n tests the credential by reading the key's query quota, which is free.

Operations

All operations are under the Search resource.

Warning: Unlock and Search and Unlock spend your Redpine credit balance. Preview and Get Results are free.

Preview (free)

Runs a search and returns every result as a teaser, with the price to unlock each one. It never charges, and works at a zero balance.

  • Query: what to search for.
  • Collection Names or IDs: required, 1 to 5 collections. Pick them from the list, which shows the collections your key can search, or give names with an expression, for example {{ ["Redpine Science"] }}. There is no default collection; an empty selection is refused before any request.
  • Options
    • Filters (JSON): metadata filters, passed to the API unchanged, for example {"journal": "Nature"} or {"and": [{"field": "publication_date", "gte": "2020-01-01"}]}. See the API docs for the fields and operators.
    • Number of Results: 1 to 30, default 10.

Output: one item per result (id, text, metadata, collection, locked, figureCount, tokens, cost), each also carrying the response fields queryId, costToUnlockRemaining, costCharged and, when present, filterWarnings and filtersApplied. When the search matches nothing, the node outputs one item with only the response fields, so the queryId and any filter warnings are not lost.

cost is the price in US dollars to unlock that result, as a decimal string. A null cost means the price is unknown, not that the result is free.

Unlock (spends credit)

Buys the full text of results from an earlier Preview.

  • Query ID: the queryId from the Preview.
  • Result IDs: comma-separated result IDs, or an expression returning an array. Required and never empty: the node always names the results it buys, and there is no "unlock everything" option.
  • Options > Include Figures: return figure images as base64 in each result's metadata. Free, but responses get larger.

You are charged only for results not already unlocked; re-sending an ID costs nothing. Output: one item per requested result, with costCharged set to what this call charged.

Unlock is not capped, so it is not available when the node runs as an AI Agent tool.

Search and Unlock (spends credit, capped)

The unattended path: preview, then buy the best results that fit within a cost cap, in one step.

  • Query, Options: as for Preview. Number of Results here sets how many candidates to choose from; it defaults to 10 or Max Results, whichever is larger.
  • Max Results: the most results to deliver.
  • Max Cost Per Run (USD): the most this node may charge per input item, retries included (see below). Default 0, which buys nothing.

How results are chosen:

  1. Results that are already unlocked under this search (see Retries) were paid for earlier. All of their prices are counted against Max Cost first, whatever their rank and whether or not they are delivered. If any of them has no usable price, nothing is bought.
  2. Then, in relevance order, up to Max Results are kept. An already-unlocked result is delivered. A locked result with a known price is bought if it fits in what is left of Max Cost.
  3. A locked result with an unknown (null) price is skipped; unknown does not mean free.
  4. Buying stops at the first locked result that is skipped, for either reason. The node never walks further down the list to a cheaper, less relevant result, so it never buys a worse result in place of a better one it could not afford. Results ranked below are reported as belowSkipped; already-unlocked ones are still delivered.

The node then unlocks only the chosen locked results. If there are none, it makes no unlock call; with Include Figures on, it fetches the delivered results' figures from Get Results instead, which is free.

Costs are added up in whole microdollars, never floating point. Each result counted also reserves one microdollar, including results priced at $0.000000: the API charges each collection's results as one rounded sum rather than the sum of the listed prices, and the two differ by less than one microdollar per result. What is guaranteed: when the node buys, the prices of the results bought earlier under this search plus the results it buys now, each plus one microdollar, total at most Max Cost, and the API's charge for them is at most that total. At a Max Cost of 0 nothing is bought.

Retries

With Retry on Fail, a retry after an unlock whose response was lost could otherwise buy again. The node sends an Idempotency-Key header on the Search and Unlock preview. A retry of the same item sends the same key, the API returns the same queryId with the results the failed attempt bought already unlocked, and because those count against Max Cost the retry buys nothing it could not have bought the first time.

  • On the regular node the key is the execution id, node id, item index and run index. It does not depend on the search text, so a query built with an expression such as $now keeps its key on retry; the API then refuses the changed search instead of buying again. Each loop iteration is a new run, so it gets a new key.
  • As an AI tool, n8n changes the run index on every retry, so the key uses a fingerprint of the search instead, with object keys sorted so their order does not matter.

The node only buys when the API confirms the key, by answering the preview with Idempotency-Status: created or replayed. If the API does not, Search and Unlock fails with an error saying no purchase was made. Preview, Get Results and Unlock are not affected.

Limits:

  • A manual re-run of a failed execution gets a new execution id, so a new key and a new preview. It can buy up to Max Cost again.

Output: one item per delivered result, each with a runSummary object: maxResults, maxCost, quotedCost (sum of the prices of results bought by this run), alreadyUnlockedCost (sum of the prices of all results that arrived already unlocked, delivered or not; null if any had no usable price), costCharged (what the API charged this run), deliveredIds, unlockedIds and skipped (each with a reason: maxResults, unknownCost or overBudget). When nothing is delivered, one item with the response fields and the runSummary.

Get Results (free)

Re-fetches the results of an earlier search by Query ID, free for 7 days. Results you have unlocked come back in full; the rest stay as teasers. Options > Include Figures returns figures for the unlocked results.

Costs

Prices are set per collection and quoted per result in US dollars. Preview shows each result's price before you pay, and costToUnlockRemaining shows what unlocking everything still locked would cost. Check your balance and usage in the Redpine dashboard.

Usage

The node can be used as a tool by the n8n AI Agent (the Redpine Tool node). As a tool it runs only Preview, Get Results and Search and Unlock; Unlock is refused. For Search and Unlock, Max Cost Per Run must be a fixed number: an expression, including $fromAI(), is refused, because the model supplies the tool's input and could otherwise set its own budget.

With Continue On Fail, a failed item outputs error (the message), code (the Redpine error code, such as a balance or validation error), httpStatus and requestId, paired to the input item.

A typical manual workflow: Preview, inspect or filter the items (for example on cost or metadata.journal), then Unlock with the preview's queryId and the chosen IDs.

Compatibility

Built and tested with n8n 2.x (n8n-workflow 2.41) on Node.js 24 and later.

Resources