Skip to content

Scholar

Search OpenAlex, arXiv, and Crossref for papers from SQL, with one unified result schema

Connector software
Free and open source
Service credentials
Not needed
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/scholar/index.md to help me query Scholar with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Find research papers about a topic

Example output · captured
Connector release
v0.5.0
Engine
2.0.1
VGI protocol
3.4.0
SELECT title, authors, year
FROM scholar.main.scholar_search('retrieval augmented generation', count := 5)
Result
title authors year
Active Retrieval Augmented Generation ["Zhengbao Jiang", "Frank F. Xu", "Luyu Gao", "Zhiqing Sun", "Qian Liu", "Jane … 2023
Corrective Retrieval Augmented Generation ["Shi-Qi Yan", "Jia-Chen Gu", "Yun Zhu", "Zhen-Hua Ling"] 2026
Benchmarking Retrieval-Augmented Generation for Medicine ["Guangzhi Xiong", "Qiao Jin", "Zhiyong Lu", "Aidong Zhang"] 2024
RAGAs: Automated Evaluation of Retrieval Augmented Generation ["Shahul Es", "Jithin James", "Luis Espinosa-Anke", "Steven Schockaert"] 2024
Graph Retrieval-Augmented Generation: A Survey ["Boci Peng", "Yun Zhu", "Yongchao Liu", "Xiaohe Bo", "Haizhou Shi", "Chuntao H… 2025

Quick start

Choose where to run Scholar, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach with uvx

Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.

ATTACH 'scholar' AS scholar (
  TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-scholar-worker'
);

3. Run a query

query.sql
SELECT title, authors, year
FROM scholar.main.scholar_search('retrieval augmented generation', count := 5)
More example queries →
Technical details
Verified connector release
v0.5.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach with uvx

Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.

ATTACH 'scholar' AS scholar (
  TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-scholar-worker'
);

Overview

Scholarly-literature search across OpenAlex, arXiv, and Crossref, unified for SQL and RAG

Catalog

Everything scholar exposes once attached — read straight from the worker's released build.

scholar 1 schema
main 1 table · 1 function

Scholarly-search table functions: scholar_search (query works) and scholar_providers (list providers)

Schema examples (7)
Examples (7)

List each provider with its keyless and default flags, alphabetically.

SELECT provider, requires_key, "default"
FROM scholar.main.scholar_providers
ORDER BY provider;

Find the default provider used when scholar_search omits provider.

SELECT provider FROM scholar.main.scholar_providers WHERE "default";

Fetch the top 5 OpenAlex (default provider) results for a topic.

SELECT title, authors, year
FROM scholar.main.scholar_search('retrieval augmented generation', count := 5);
Result
title authors year
Active Retrieval Augmented Generation ["Zhengbao Jiang", "Frank F. Xu", "Luyu Gao", "Zhiqing Sun", "Qian Liu", "Jane … 2023
Corrective Retrieval Augmented Generation ["Shi-Qi Yan", "Jia-Chen Gu", "Yun Zhu", "Zhen-Hua Ling"] 2026
Benchmarking Retrieval-Augmented Generation for Medicine ["Guangzhi Xiong", "Qiao Jin", "Zhiyong Lu", "Aidong Zhang"] 2024
RAGAs: Automated Evaluation of Retrieval Augmented Generation ["Shahul Es", "Jithin James", "Luis Espinosa-Anke", "Steven Schockaert"] 2024
Graph Retrieval-Augmented Generation: A Survey ["Boci Peng", "Yun Zhu", "Yongchao Liu", "Xiaohe Bo", "Haizhou Shi", "Chuntao H… 2025

Search Crossref instead of the default provider and pull DOIs.

SELECT title, doi
FROM scholar.main.scholar_search('graph neural networks', provider := 'crossref', count := 10);
3 more examples

Match the top 25 OpenAlex and top 25 Crossref results for one topic by DOI and compare the citation count each provider reports for the same work.

WITH oa AS (SELECT lower(doi) AS doi, title, citations_count AS openalex_citations FROM scholar.main.scholar_search('attention is all you need transformer', count := 25) WHERE doi IS NOT NULL), cr AS (SELECT lower(doi) AS doi, citations_count AS crossref_citations FROM scholar.main.scholar_search('attention is all you need transformer', provider := 'crossref', count := 25) WHERE doi IS NOT NULL) SELECT oa.doi, oa.title, oa.openalex_citations, cr.crossref_citations
FROM oa
JOIN cr USING (doi)
ORDER BY oa.openalex_citations DESC, oa.doi;

Attach OpenAlex citation counts to arXiv preprints (arXiv reports none) by matching the two providers' results for a topic on case-insensitive exact title.

WITH preprints AS (SELECT title, year FROM scholar.main.scholar_search('masked autoencoders vision transformers', provider := 'arxiv', count := 25)), indexed AS (SELECT title, citations_count FROM scholar.main.scholar_search('masked autoencoders vision transformers', count := 25)) SELECT p.title, p.year, max(i.citations_count) AS openalex_citations
FROM preprints AS p
JOIN indexed AS i ON lower(trim(p.title)) = lower(trim(i.title))
GROUP BY p.title, p.year
ORDER BY openalex_citations DESC, p.title;

Search one topic with every provider and report, per provider in the registry, how many of its top 20 results came back and how many carry a DOI and an abstract.

WITH hits AS (SELECT source, doi, abstract FROM scholar.main.scholar_search('retrieval augmented generation', provider := 'openalex', count := 20) UNION ALL SELECT source, doi, abstract FROM scholar.main.scholar_search('retrieval augmented generation', provider := 'arxiv', count := 20) UNION ALL SELECT source, doi, abstract FROM scholar.main.scholar_search('retrieval augmented generation', provider := 'crossref', count := 20)) SELECT p.provider, p."default", count(h.source) AS results, count(h.doi) AS with_doi, count(h.abstract) AS with_abstract
FROM scholar.main.scholar_providers AS p
LEFT JOIN hits AS h ON h.source = p.provider
GROUP BY p.provider, p."default"
ORDER BY p.provider;
Tables
scholar_providers 7 examples3 cols

One row per scholarly-search provider scholar_search can target (provider name, keyless flag, default flag)

Columns
providernot null VARCHAR
Provider name to pass as provider := '...'.
requires_keynot null BOOLEAN
Whether the provider needs an API key (all v1 providers are keyless).
defaultnot null BOOLEAN
Whether this is the default provider.
ConstraintsPRIMARY KEY (provider)
Examples (7)

List each provider with its keyless and default flags, alphabetically.

SELECT provider, requires_key, "default"
FROM scholar.main.scholar_providers
ORDER BY provider;

Find the default provider used when scholar_search omits provider.

SELECT provider FROM scholar.main.scholar_providers WHERE "default";

Confirm all providers are keyless (no API key required).

SELECT count(*) AS keyless
FROM scholar.main.scholar_providers
WHERE NOT requires_key;
4 more examples

Search one topic with every provider and report, per provider in the registry, how many of its top 20 results came back and how many carry a DOI and an abstract.

WITH hits AS (SELECT source, doi, abstract FROM scholar.main.scholar_search('retrieval augmented generation', provider := 'openalex', count := 20) UNION ALL SELECT source, doi, abstract FROM scholar.main.scholar_search('retrieval augmented generation', provider := 'arxiv', count := 20) UNION ALL SELECT source, doi, abstract FROM scholar.main.scholar_search('retrieval augmented generation', provider := 'crossref', count := 20)) SELECT p.provider, p."default", count(h.source) AS results, count(h.doi) AS with_doi, count(h.abstract) AS with_abstract
FROM scholar.main.scholar_providers AS p
LEFT JOIN hits AS h ON h.source = p.provider
GROUP BY p.provider, p."default"
ORDER BY p.provider;
SELECT provider, requires_key, "default"
FROM scholar.main.scholar_providers()
ORDER BY provider;
SELECT provider FROM scholar.main.scholar_providers() WHERE "default";
SELECT count(*) AS keyless
FROM scholar.main.scholar_providers()
WHERE NOT requires_key;
Link
Table functions

Try these queries

List each provider with its keyless and default flags, alphabetically.

SELECT provider, requires_key, "default"
FROM scholar.main.scholar_providers
ORDER BY provider

Uses scholar_providers

Find the default provider used when scholar_search omits provider.

SELECT provider FROM scholar.main.scholar_providers WHERE "default"

Uses scholar_providers

Search Crossref instead of the default provider and pull DOIs.

SELECT title, doi
FROM scholar.main.scholar_search('graph neural networks', provider := 'crossref', count := 10)

Uses scholar_search

List every provider scholar_search can use, with its keyless and default flags.

SELECT provider, requires_key, "default"
FROM scholar.main.scholar_providers()
ORDER BY provider

Find the default provider used when scholar_search omits provider.

SELECT provider FROM scholar.main.scholar_providers() WHERE "default"

Confirm all providers are keyless (no API key required).

SELECT count(*) AS keyless
FROM scholar.main.scholar_providers()
WHERE NOT requires_key;

5 more examples in the Catalog, each listed under the table or function it uses.

Questions it can answer

Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.

  • When a scholarly search does not specify a provider, which provider is used by default? Return just that provider's name.
  • How many of the available scholarly-search providers can be used without an API key?

Scholar is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.