Skip to content
1 min read · 125 words

Function: scrapperLinksToRetrievables()

ts
function scrapperLinksToRetrievables(
  payload: ScrapperLinksLike,
  opts?: ToRetrievableOptions,
  recommend?: ArtifactRecommendations,
): RawRetrievable[];

Defined in: src/batteries/tools/web_retrieval/index.ts:278

Convert a Scrapper normalised links payload into one @nhtio/adk/common!RawRetrievable per link.

Parameters

ParameterTypeDescription
payloadScrapperLinksLikeThe Scrapper normalised links payload ({ links: [{ url, text }] }).
optsToRetrievableOptionsTrust tier, kind, id prefix, optional spool hook, and inline preference.
recommendArtifactRecommendationsOptional artifact-resolver recommendations.

Returns

RawRetrievable[]

One RawRetrievable per link.

Remarks

Each link's text becomes the content and its url the source. Spooling is opt-in, exactly as for the other web converters; link records default to inline: true so short text remains inline even when a storage layer auto-spools it.