Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publications, or conducting bibliometric analysis across 240M+ scholarly works. Use for literature searches, research output analysis, citation analysis, and academic database queries.
.claude/skills/openalex-database/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-17 | ✗→✓ | ▲ Improved | — | — |
| case-13 | ✗→✓ | ▲ Improved | — | — |
| case-14 | ✗→✓ | ▲ Improved | — | — |
| case-16 | ✗→✓ | ▲ Improved | — | — |
| case-04 | ✗→✓ | ▲ Improved | — | — |
OpenAlex is a comprehensive open catalog of 240M+ scholarly works, authors, institutions, topics, sources, publishers, and funders. This skill provides tools and workflows for querying the OpenAlex API to search literature, analyze research output, track citations, and conduct bibliometric studies.
Always initialize the client with an email address to access the polite pool (10x rate limit boost):
pythonfrom scripts.openalex_client import OpenAlexClient client = OpenAlexClient(email="your-email@example.edu")
Install required package using uv:
bashuv pip install requests
No API key required - OpenAlex is completely open.
Use for: Finding papers by title, abstract, or topic
python# Simple search results = client.search_works( search="machine learning", per_page=100 ) # Search with filters results = client.search_works( search="CRISPR gene editing", filter_params={ "publication_year": ">2020", "is_oa": "true" }, sort="cited_by_count:desc" )
Use for: Getting all publications by a specific researcher
Use the two-step pattern (entity name → ID → works):
pythonfrom scripts.query_helpers import find_author_works works = find_author_works( author_name="Jennifer Doudna", client=client, limit=100 )
Manual two-step approach:
python# Step 1: Get author ID author_response = client._make_request( '/authors', params={'search': 'Jennifer Doudna', 'per-page': 1} ) author_id = author_response['results'][0]['id'].split('/')[-1] # Step 2: Get works works = client.search_works( filter_params={"authorships.author.id": author_id} )
Use for: Analyzing research output from universities or organizations
pythonfrom scripts.query_helpers import find_institution_works works = find_institution_works( institution_name="Stanford University", client=client, limit=200 )
Use for: Finding influential papers in a field
pythonfrom scripts.query_helpers import find_highly_cited_recent_papers papers = find_highly_cited_recent_papers( topic="quantum computing", years=">2020", client=client, limit=100 )
Use for: Finding freely available research
pythonfrom scripts.query_helpers import get_open_access_papers papers = get_open_access_papers( search_term="climate change", client=client, oa_status="any", # or "gold", "green", "hybrid", "bronze" limit=200 )
Use for: Tracking research output over time
pythonfrom scripts.query_helpers import get_publication_trends trends = get_publication_trends( search_term="artificial intelligence", filter_params={"is_oa": "true"}, client=client ) # Sort and display for trend in sorted(trends, key=lambda x: x['key'])[-10:]: print(f"{trend['key']}: {trend['count']} publications")
Use for: Comprehensive analysis of author or institution research
pythonfrom scripts.query_helpers import analyze_research_output analysis = analyze_research_output( entity_type='institution', # or 'author' entity_name='MIT', client=client, years='>2020' ) print(f"Total works: {analysis['total_works']}") print(f"Open access: {analysis['open_access_percentage']}%") print(f"Top topics: {analysis['top_topics'][:5]}")
Use for: Getting information for multiple DOIs, ORCIDs, or IDs efficiently
pythondois = [ "https://doi.org/10.1038/s41586-021-03819-2", "https://doi.org/10.1126/science.abc1234", # ... up to 50 DOIs ] works = client.batch_lookup( entity_type='works', ids=dois, id_field='doi' )
Use for: Getting representative samples for analysis
python# Small sample works = client.sample_works( sample_size=100, seed=42, # For reproducibility filter_params={"publication_year": "2023"} ) # Large sample (>10k) - automatically handles multiple requests works = client.sample_works( sample_size=25000, seed=42, filter_params={"is_oa": "true"} )
Use for: Finding papers that cite a specific work
python# Get the work work = client.get_entity('works', 'https://doi.org/10.1038/s41586-021-03819-2') # Get citing papers using cited_by_api_url import requests citing_response = requests.get( work['cited_by_api_url'], params={'mailto': client.email, 'per-page': 200} ) citing_works = citing_response.json()['results']
Use for: Understanding research focus areas
python# Get top topics for an institution topics = client.group_by( entity_type='works', group_field='topics.id', filter_params={ "authorships.institutions.id": "I136199984", # MIT "publication_year": ">2020" } ) for topic in topics[:10]: print(f"{topic['key_display_name']}: {topic['count']} works")
Use for: Downloading large datasets for analysis
python# Paginate through all results all_papers = client.paginate_all( endpoint='/works', params={ 'search': 'synthetic biology', 'filter': 'publication_year:2020-2024' }, max_results=10000 ) # Export to CSV import csv with open('papers.csv', 'w', newline='', encoding='utf-8') as f: writer = csv.writer(f) writer.writerow(['Title', 'Year', 'Citations', 'DOI', 'OA Status']) for paper in all_papers: writer.writerow([ paper.get('title', 'N/A'), paper.get('publication_year', 'N/A'), paper.get('cited_by_count', 0), paper.get('doi', 'N/A'), paper.get('open_access', {}).get('oa_status', 'closed') ])
Add email to get 10x rate limit (1 req/sec → 10 req/sec):
pythonclient = OpenAlexClient(email="your-email@example.edu")
Never filter by entity names directly - always get ID first:
python# ✅ Correct # 1. Search for entity → get ID # 2. Filter by ID # ❌ Wrong # filter=author_name:Einstein # This doesn't work!
Always use per-page=200 for efficient data retrieval:
pythonresults = client.search_works(search="topic", per_page=200)
Use batch_lookup() for multiple IDs instead of individual requests:
python# ✅ Correct - 1 request for 50 DOIs works = client.batch_lookup('works', doi_list, 'doi') # ❌ Wrong - 50 separate requests for doi in doi_list: work = client.get_entity('works', doi)
Use sample_works() with seed for reproducible random sampling:
python# ✅ Correct works = client.sample_works(sample_size=100, seed=42) # ❌ Wrong - random page numbers bias results # Using random page numbers doesn't give true random sample
Reduce response size by selecting specific fields:
pythonresults = client.search_works( search="topic", select=['id', 'title', 'publication_year', 'cited_by_count'] )
python# Single year filter_params={"publication_year": "2023"} # After year filter_params={"publication_year": ">2020"} # Range filter_params={"publication_year": "2020-2024"}
python# All conditions must match filter_params={ "publication_year": ">2020", "is_oa": "true", "cited_by_count": ">100" }
python# Any institution matches filter_params={ "authorships.institutions.id": "I136199984|I27837315" # MIT or Harvard }
python# Papers with authors from BOTH institutions filter_params={ "authorships.institutions.id": "I136199984+I27837315" # MIT AND Harvard }
python# Exclude type filter_params={ "type": "!paratext" }
OpenAlex provides these entity types:
Access any entity type using consistent patterns:
pythonclient.search_works(...) client.get_entity('authors', author_id) client.group_by('works', 'topics.id', filter_params={...})
Use external identifiers directly:
python# DOI for works work = client.get_entity('works', 'https://doi.org/10.7717/peerj.4375') # ORCID for authors author = client.get_entity('authors', 'https://orcid.org/0000-0003-1613-5981') # ROR for institutions institution = client.get_entity('institutions', 'https://ror.org/02y3ad647') # ISSN for sources source = client.get_entity('sources', 'issn:0028-0836')
See references/api_guide.md for:
See references/common_queries.md for:
Main API client with:
Use for direct API access with full control.
High-level helper functions for common operations:
find_author_works() - Get papers by authorfind_institution_works() - Get papers from institutionfind_highly_cited_recent_papers() - Get influential papersget_open_access_papers() - Find OA publicationsget_publication_trends() - Analyze trends over timeanalyze_research_output() - Comprehensive analysisUse for common research queries with simplified interfaces.
If encountering 403 errors:
If searches return no results:
references/api_guide.md)For large queries:
per-page=200select= to limit returned fieldsAlways use polite pool for production workflows by providing email to client.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +32 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.