STOPHY_API_KEY. See the Quickstart. Paper search needs an API key.
1. Search for papers
This request finds papers from 2024 on, newest first, and asks for 3.results holds the papers. This is the real answer. The abstracts are cut, and two of the three papers had none.
primaryId is the paper’s best outside id, and openAccessUrl is where a free copy lives. It is a PDF for the first and third paper, and a landing page for the second. See Papers for every option.
2. Read a paper
Scrape reads a PDF the way it reads a page and returns Markdown. This request reads the first 2 pages of the third paper and cuts the text at 2,000 characters.totalPages is the pages in the file, 9 here. nextOffset says where to read on. Send the same request with "offset": 1969. Send a larger maxPages for more pages, and pageMarkers: true to see where each page starts. See PDFs and documents. The read cost $0.0015.
A landing page such as the second paper’s is not a PDF. Scrape reads it as a page, and it may not hold the paper. Keep the papers whose link ends in .pdf or points at arxiv.org/pdf.
3. Read every paper
This function searches, keeps the papers with a direct PDF link, reads the first 2 pages of each, and returns notes with the id, title, year and text. Theid is the paper’s primaryId, so a citation points at the same paper wherever you saw it.
text and cite id. For a paper you hold as a file, Parse documents gives the same Markdown from an upload.
What to check
resultsis not empty, and the papers match your topic. If not, change the query, or addauthors,fromandto.- Every note has a
textthat starts with the paper’s title. If a PDF comes back empty, try"mode": "ocr"in the PDF options. - The text you hand a model is cut at
maxChars. Read on withnextOffsetwhen the answer needs the methods or the results. - A claim in your summary is a quote you can find in
text. Check three.
What it costs
A page that cannot be read costs nothing. See Pricing.
Related
- Papers reads one paper by id, DOI or arXiv id, and finds similar papers.
- PDFs and documents lists the PDF options.
- Search finds web pages, news and videos about the same topic.
- Live web context for agents wraps reading as tools for an agent.