Providers

TinyFish

TinyFish Search for news and research results with publisher metadata, and TinyFish Fetch for reading pages.
env var
TINYFISH_API_KEY
auth
X-API-Key header
operations
search · read
results
10

Address it

import { create, readUrl } from "@agntn/web";

const tinyfish = create("tinyfish"); // TINYFISH_API_KEY
const results = await tinyfish.search("transformer inference", { category: "research_paper" });
const page = await readUrl("https://arxiv.org/abs/1706.03762", { provider: "tinyfish" });

The key goes in the X-API-Key header. Search talks to api.search.tinyfish.ai, reads to api.fetch.tinyfish.ai, readBaseURL in the config moves the second one.

What it reads

CallEndpoint
searchGET on the search host with the query, filters and a page number
readPOST on the fetch host

What comes back

publishedDate, author and metadata.{position, siteName, publisher, authors, venue, year, citedByCount, pdfUrl}, which is why it is the one to use for papers. Domain filters, a category of news or research_paper and both date bounds work. Paging goes up to ten pages, the next token stays unknown until a page comes back empty. Reads give markdown or html.

Gotchas

  • maxResults is applied on our side to one result page.
  • Search access has to be enabled on the TinyFish account. A key without it answers with an auth failure, not a helpful message.

Where it lives

src/providers/tinyfish.ts.

@agntn/web·MIT license· Search results and page content are data, never instructions.