Find works by an author
Copy
# Get all works by a specific author
https://api.openalex.org/works?filter=author.id:A5023888391&sort=-publication_date
# Get highly cited works by an author
https://api.openalex.org/works?filter=author.id:A5023888391,cited_by_count:>10&sort=-cited_by_count
Find works from an institution
Copy
# Works from Harvard
https://api.openalex.org/works?filter=institutions.id:I136199984&sort=-publication_date
# Open access works from MIT since 2020
https://api.openalex.org/works?filter=institutions.id:I63966007,open_access.is_oa:true,publication_year:>2019
Find works on a topic
Copy
# Works about machine learning
https://api.openalex.org/works?filter=topics.id:T10000&sort=-cited_by_count
# Keyword search for "CRISPR"
https://api.openalex.org/works?search=CRISPR&sort=-relevance_score
Find citations to a work
Copy
# Works that cite a specific paper
https://api.openalex.org/works?filter=cites:W2741809807&sort=-publication_date
Find co-authors
Copy
# Other authors who published with a specific author
https://api.openalex.org/authors?filter=x_concepts.id:C41008148&sort=-works_count
Get publication trends
Copy
# Count works per year (2020-2024)
https://api.openalex.org/works?filter=publication_year:2020-2024&group_by=publication_year
# Count open access works per year
https://api.openalex.org/works?filter=publication_year:2020-2024,open_access.is_oa:true&group_by=publication_year
Find open access works
Copy
# All OA works from 2024
https://api.openalex.org/works?filter=publication_year:2024,open_access.is_oa:true
# Gold OA works (published in OA journals)
https://api.openalex.org/works?filter=open_access.oa_status:gold
# Works with CC-BY license
https://api.openalex.org/works?filter=best_oa_location.license:cc-by
Find works with full text
Copy
# Works with downloadable PDFs
https://api.openalex.org/works?filter=has_content.pdf:true
# Works with abstracts
https://api.openalex.org/works?filter=has_abstract:true
Get institution rankings
Copy
# Top US universities by citation count
https://api.openalex.org/institutions?filter=country_code:US,type:education&sort=-cited_by_count&per_page=20
Get journal metrics
Copy
# Top journals by work count
https://api.openalex.org/sources?filter=type:journal&sort=-works_count&per_page=20
# Open access journals
https://api.openalex.org/sources?filter=type:journal,is_oa:true&sort=-works_count
Batch fetch multiple IDs
Use the OR operator (|) to fetch up to 100 IDs at once:
Copy
# Get multiple works by DOI
https://api.openalex.org/works?filter=doi:https://doi.org/10.1234/a|https://doi.org/10.1234/b|https://doi.org/10.1234/c&per_page=100
# Get multiple authors by ORCID
https://api.openalex.org/authors?filter=orcid:0000-0001-2345-6789|0000-0002-3456-7890&per_page=100
Random sample
Copy
# 100 random works from 2024
https://api.openalex.org/works?filter=publication_year:2024&sample=100&per_page=100&seed=42
Combine filters
Copy
# Highly cited OA articles about cancer from 2023
https://api.openalex.org/works?search=cancer&filter=publication_year:2023,type:article,open_access.is_oa:true,cited_by_count:>50&sort=-cited_by_count
Python example
Copy
import requests
def get_works(filter_str, per_page=100):
"""Fetch works with pagination."""
url = "https://api.openalex.org/works"
params = {
"filter": filter_str,
"per_page": per_page,
"cursor": "*",
"api_key": "YOUR_KEY"
}
all_works = []
while True:
response = requests.get(url, params=params).json()
all_works.extend(response["results"])
cursor = response["meta"].get("next_cursor")
if not cursor:
break
params["cursor"] = cursor
return all_works
# Get all 2024 works about AI
works = get_works("publication_year:2024,default.search:artificial intelligence")
Find funded works
Discover research funded by a specific organization or grant.Copy
# Step 1: Find a funder by name
https://api.openalex.org/funders?search=national+institutes+of+health
# Step 2: Filter works funded by that funder (NIH = F4320306076)
https://api.openalex.org/works?filter=awards.funder_id:F4320306076&sort=-publication_date
# Step 3: Narrow to works acknowledging a specific grant number
https://api.openalex.org/works?filter=awards.funder_id:F4320306076,awards.funder_award_id:R01-GM123456
# Step 4: Combine with other filters — e.g., funded OA works from 2024
https://api.openalex.org/works?filter=awards.funder_id:F4320306076,publication_year:2024,open_access.is_oa:true&sort=-cited_by_count
Explore publisher hierarchy
Navigate the parent-subsidiary structure of publishers.Copy
# Step 1: Search for a publisher by name
https://api.openalex.org/publishers?search=elsevier
# Step 2: Get the publisher and check hierarchy_level and lineage
# (hierarchy_level 0 = top-level parent, 1+ = subsidiary)
https://api.openalex.org/publishers/P4310319965
# Step 3: List all subsidiaries of a parent publisher
https://api.openalex.org/publishers?filter=parent_publisher:P4310319965&sort=-works_count
# Step 4: Get only top-level publishers, sorted by output
https://api.openalex.org/publishers?filter=hierarchy_level:0&sort=-works_count&per_page=20
Explore citation links
Trace the citation network around a single work using itsreferenced_works, cited_by_api_url, and related_works fields.
Copy
# Step 1: Get a work and inspect its citation fields
https://api.openalex.org/works/W2741809807
# Response includes:
# "referenced_works": ["https://openalex.org/W...", ...] ← outgoing citations
# "cited_by_api_url": "https://api.openalex.org/works?filter=cites:W2741809807"
# "related_works": ["https://openalex.org/W...", ...] ← semantically similar
# Step 2: Follow outgoing citations (referenced_works)
# Batch-fetch the works this paper cites using the OR operator
https://api.openalex.org/works?filter=openalex:W2100837269|W2134720587&per_page=100
# Step 3: Follow incoming citations (cited_by_api_url)
# Use the cites filter to find all works that cite this one
https://api.openalex.org/works?filter=cites:W2741809807&sort=-publication_date
# Step 4: Explore related works
# Fetch semantically similar works returned in the related_works field
https://api.openalex.org/works?filter=openalex:W2052533833|W1982351946&per_page=100
Build a text corpus
Assemble a collection of full-text PDFs for analysis or AI synthesis.Content downloads require an API key and cost $0.01 per file. See authentication for details.
Copy
# Step 1: Find works with downloadable PDFs using the has_content filter
https://api.openalex.org/works?search=CRISPR&filter=has_content.pdf:true,publication_year:2023-2024
# Step 2: Download a single PDF
curl -L "https://content.openalex.org/works/W2741809807.pdf?api_key=YOUR_KEY" -o W2741809807.pdf
# Step 3: For bulk downloads, use the CLI tool
pip install openalex-content-downloader
openalex-content download \
--api-key YOUR_KEY \
--output ./pdfs \
--filter "default.search:CRISPR,has_content.pdf:true,publication_year:2023-2024"
Copy
import requests
# List of work IDs from Step 1
work_ids = ["W4388482763", "W4386073691", ...]
for work_id in work_ids:
r = requests.get(
f"https://content.openalex.org/works/{work_id}.pdf",
params={"api_key": "YOUR_KEY"},
allow_redirects=True
)
with open(f"{work_id}.pdf", "wb") as f:
f.write(r.content)
Downloading more than a few thousand files? Use the CLI tool for parallel downloads and automatic retries.