AgentPM™

@zack/wikipedia-scrape

Fetch a Wikipedia URL and return title, text, and image URLs.

Install
agentpm install @zack/wikipedia-scrape@0.1.5
Load
Weekly downloads
3
0%
Last publish
3w ago
v0.1.5

wikipedia-scrape

What it does

Fetches a Wikipedia article URL and returns:

  • title (string)
  • text (full extracted text)
  • images (array/list of image URLs or a serialized string, per the manifest)

AgentPM manifest

See agent.json in this folder. It declares:

  • "kind": "tool", "runtime": { "type": "node", "version": "20" }
  • "entrypoint": { "command": "node", "args": ["dist/index.js"] }
  • JSON Schema for inputs and outputs

Quirks

  • Uses undici with a custom User-Agent.

Entrypoint reads JSON from stdin and prints a single JSON object to stdout.

Run in isolation

pnpm -C tools-node/wikipedia-scrape build

echo '{"url":"https://en.wikipedia.org/wiki/Alan_Turing"}' | node tools-node/wikipedia-scrape/dist/index.js