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
- Query Farm hosting
- Available · $10/month organization minimum
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)
| 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.
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;
INSTALL vgi FROM community;
LOAD vgi;
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'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'scholar' AS scholar (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-scholar:0.5.0'
);
3. Run a query
SELECT title, authors, year
FROM scholar.main.scholar_search('retrieval augmented generation', count := 5)
Run the connector on a server you manage. You operate the service and choose who can connect.
1. Deploy the connector on your server
Follow the connector’s deployment instructions. Use its supported HTTP transport, or launch it remotely over SSH. The connection guide explains both options.
2. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
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;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach the connector
For an HTTP deployment, replace the example URL with your endpoint. Add the authentication options your deployment requires. For SSH, use the SSH connection instructions.
ATTACH 'scholar' AS scholar
(TYPE vgi, LOCATION 'https://your-connector.example.com');
4. Run a query
SELECT title, authors, year
FROM scholar.main.scholar_search('retrieval augmented generation', count := 5)
Query Farm operates Scholar for your team. Hosting has a $10 monthly minimum per organization; usage counts toward it. From $2.97 per instance-month ($10 monthly minimum).
1. Create your hosted connector
Open the console, choose your organization and deployment size, and add any service credentials there.
2. Install the vgi extension
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;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach your deployment
Copy the ATTACH statement from your deployment in the console and run it in DuckDB or Haybarn. Use scholar as the catalog alias for the query below.
4. Run a query
SELECT title, authors, year
FROM scholar.main.scholar_search('retrieval augmented generation', count := 5)
Technical details
- Verified connector release
- v0.5.0
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
- Verified on
- December 1, 2026
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'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'scholar' AS scholar (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-scholar:0.5.0'
);
Overview
Scholarly-literature search across OpenAlex, arXiv, and Crossref, unified for SQL and RAG
Search academic papers, preprints, and citations directly from DuckDB/SQL across OpenAlex, arXiv, and Crossref — three free, ToS-clean scholarly APIs unified behind one pluggable query surface, with no API key required.
The scholar catalog turns the world's open scholarly-metadata graph into ordinary SQL tables. It is built for researchers, data engineers, librarians, and anyone wiring up retrieval-augmented generation (RAG) pipelines who would rather write a query than glue together three different REST clients. Every search returns the same unified result schema — title, authors, abstract, doi, year, published, venue, citations_count, url, source, and a JSON extra column — so a query never has to know or care which provider produced a given row. Switch providers with a single named argument and the rest of your SQL stays identical.
Under the hood the worker talks plain HTTP to each provider's public API: the OpenAlex API (the open catalog of ~250M scholarly works, used by default), the arXiv API for physics, math, and CS preprints, and the Crossref REST API for DOI-registered publications. Results are fetched page by page and streamed back to DuckDB as Arrow, so large result sets never have to be buffered in full. Pagination cursors round-trip through the worker, retries back off on rate limits, and a provider error surfaces as a clean SQL error rather than crashing the attach.
Providers and searches
A search is a free-text query sent to one provider at a time; OpenAlex is the default and a single named provider argument switches the source to arXiv or Crossref. A count argument caps how many works come back, so a broad query stays cheap. The set of providers, with whether each needs a key and which one is the default, is itself queryable metadata, so an agent can discover valid provider names before searching.
Getting started
Install and load the signed vgi community extension, ATTACH this worker at a LOCATION such as uv run scholar_worker.py, and then call the two table functions directly. Ready-to-run, copy-paste queries live in this schema's example queries and in each function's own examples, so they are executed and coverage-checked rather than duplicated inline here.
Typical uses: find papers by topic, resolve and enrich DOIs, gather citation counts, assemble a literature-review corpus, or feed a RAG index — all without leaving SQL. No API key is required for any provider; set VGI_SCHOLAR_MAILTO to your contact e-mail to join OpenAlex's and Crossref's faster "polite pool".
Powered by OpenAlex (source), arXiv (API docs), and Crossref (REST API docs).
Catalog
Everything scholar exposes once attached — read straight from the worker's
released build.
main 1 table · 1 function
Scholarly-search table functions: scholar_search (query works) and scholar_providers (list providers)
Schema 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);
| 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;
scholar_providers
One row per scholarly-search provider scholar_search can target (provider name, keyless flag, default flag)
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;
scholar_search (query VARCHAR, count := BIGINT, page_size := BIGINT, provider := VARCHAR)
Search academic literature (OpenAlex / arXiv / Crossref) into a unified schema
Top 5 OpenAlex results (the default provider) for a topic.
SELECT title, authors, year
FROM scholar.main.scholar_search('retrieval augmented generation', count := 5);
| 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 OpenAlex provider.
SELECT title, doi
FROM scholar.main.scholar_search('graph neural networks', provider := 'crossref', count := 10);
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;
2 more examples
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;
Pull the 20 most recent arXiv preprints on a topic.
SELECT title, published
FROM scholar.main.scholar_search('large language models', provider := 'arxiv', count := 20)
ORDER BY published DESC;
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.
Related workers
Search
News, social & research
Query Brave, Tavily, Exa, SearXNG, DuckDuckGo, SerpAPI and Serper web search from SQL through one interface
Wikipedia
News, social & research
Connect Wikipedia articles with Wikidata statements and graph queries from SQL
Bluesky
News, social & research
Bluesky posts, threads, profiles, followers, feeds, trends and the live Jetstream firehose