Spiral gives your agent every tool with one account. Browse the tools →

opencode · Developer

How to Use Semantic Scholar paper search in opencode

Returns papers matching keywords in titles and abstracts through Semantic Scholar's bulk search. Use it to discover research on a topic before inspecting particular papers or exploring their citations.

Prompts to try with Semantic Scholar paper search in opencode

Copy an example into opencode, or ask in your own words.

Use Semantic Scholar paper search to find papers about retrieval augmented generation, then add a candidate reading table with titles, authors, and publication years to docs/research.md.

Semantic Scholar paper searchopencode
Try asking
  • Use Semantic Scholar paper search to look this up and give me the result as a table. Save the result in ./assets.

  • Pull the latest numbers from Semantic Scholar paper search and tell me what changed since last week.

  • Check Semantic Scholar paper search and summarize what you find in three bullet points.

  • Pull the newest data from Semantic Scholar paper search and give me the result as a table.

How to set up Semantic Scholar paper search in opencode

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the server

    Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

    opencode mcp add spiral --global --url https://api.spiral.ai/mcp
  2. Sign in

    Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run Semantic Scholar paper search

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "alexandria",
        "model": "semanticscholar-org/papers/search_papers",
        "input": {
          "query": "<query>"
        }
      }'

Then paste one of the prompts above: opencode finds Semantic Scholar paper search on Spiral, shows the price and runs it.

Semantic Scholar paper search providers and prices

Spiral runs Semantic Scholar paper search through Alexandria. Open a card for today's price, with every fee included.

AlexandriaDeveloper
Semantic Scholar · Search papers
semanticscholar-org/papers/search_papers

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
SortcitationCount:desc, citationCount:asc, publicationDate:desc, publicationDate:asc, paperId:asc, or paperId:desccitationCount:desc

Result order. The source has no relevance order. citationCount:desc (default) lists the most-cited first. publicationDate:desc lists the newest first. Undated papers come last, and some journal papers carry a future issue date. The paperId orders are arbitrary but stay stable while paging through large result sets.

Limit1 to 20025

Items per page (1-200, default 25).

Open access onlyon or off

Only papers with a public PDF.

Min citation count0 to 1000000

Only papers cited at least this many times.

Every API field of Semantic Scholar · Search papers is on its tool page: open its card above.

What can you do with Semantic Scholar paper search in opencode?

Build a research bibliography beside the code that implements a method, with Semantic Scholar records supporting each reading candidate. A coding agent can turn paper metadata and research connections into project documentation and comparison tables.

Prepare a literature review

Start with a topic search, resolve cited titles, collect paper records, and expand through references, citations, and recommendations. Use author records and publication lists to check attribution and find additional work for screening.

Update a survey bibliography

Resolve the survey's existing citations, retrieve their records, and look for subsequent citations and related papers. Search the topic and cited authors' publications to propose additions, with author metrics providing corpus context.

Repair incomplete bibliography entries

Match incomplete titles to paper records and fill in publication details. For uncertain attribution, locate the author record and compare its indexed publications before accepting a match.

Maintain a research topic bulletin

Repeat a topic search and check citations, author publications, and recommendations for reading candidates. Inspect their records and references to explain why each addition belongs in the bulletin.

Compare methods before implementation

Find papers for competing approaches and assemble their bibliographic records and available abstracts. Follow references, subsequent citations, and recommendations to build a reading queue for evaluating the methods.

Build an annotated seminar reading list

Combine topic searches, known titles, citation trails, and recommendations into a reading shortlist. Add paper details and author publication context so participants can see the bibliography behind each selection.

Questions about Semantic Scholar paper search in opencode

Can opencode use Semantic Scholar paper search?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Semantic Scholar paper search like any built-in tool.

How much does Semantic Scholar paper search cost in opencode?

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

Do I need an Alexandria account to use Semantic Scholar paper search in opencode?

No. Spiral runs Semantic Scholar paper search on its own Alexandria account. You sign in to Spiral once and never paste a key.

How long does it take to set up Semantic Scholar paper search in opencode?

About two minutes: add the server, then sign in, then check it.

Does opencode wait while Semantic Scholar paper search runs?

Semantic Scholar paper search runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

Does Semantic Scholar cover every kind of research publication?

Its corpus spans all fields of science, with academic articles and preprints as the primary focus. Book coverage is limited, and patents are excluded from the scholarly corpus described in its citation-count documentation.

Where does Semantic Scholar get its papers?

It combines web indexing with partnerships involving scientific journals, indexes, and content providers. Its documented sources include PubMed, arXiv, and Springer Nature.

How fresh is Semantic Scholar's data?

Semantic Scholar says it adds content daily, which can change citation counts as additional papers enter the corpus. That describes corpus additions, rather than a guaranteed daily refresh of every record.

Why do Semantic Scholar's citation counts differ from other sources?

Counts depend on the citing papers discoverable in its own corpus. Its limited book coverage and exclusion of patents mean the counted material can differ from another scholarly index.

Does a publication date always mean the paper first appeared online?

Semantic Scholar may display either the print date or the online date, depending on the metadata supplied by its source.

Get started

Start using Semantic Scholar paper search in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options