API Guide for LLMs
Are you an LLM? Start here.
OpenAlex API Guide for LLM Agents and AI Applications
CRITICAL GOTCHAS - Read These First!
β DON'T: Create ad-hoc sampling by using random page numbers
β
DO: Use the ?sample parameter for random sampling
β DON'T: Try to sample large datasets (10k+) in one request
β
DO: Use multiple samples with different seeds, then deduplicate
β DON'T: Search/filter by entity names directly
β
DO: Use two-step lookup pattern for related entities
β DON'T: Try to group by multiple dimensions in one query
β
DO: Make multiple queries and combine results client-side
β DON'T: Ignore API errors or retry immediately on failure
β
DO: Implement exponential backoff for retries
β DON'T: Use default page sizes for bulk extraction
β
DO: Use maximum page size (200) for bulk data extraction
β DON'T: Make sequential API calls for lists of known IDs
β
DO: Use the OR filter (pipe |) for batch ID lookups
β DON'T: Ignore rate limits when using concurrency/threading
β
DO: Respect rate limits even across concurrent requests
Quick Reference
Base URL and Authentication
Get Higher Credit Limits
Entity Endpoints
Essential Query Parameters
Filter Syntax
Basic Filtering
Comparison Operators
Multiple Values in Same Attribute
OR Queries (Pipe Separator)
Important: OR only works WITHIN a filter, not BETWEEN filters
Common Patterns
Get Random Sample of Works
Search Works by Title/Abstract
Find Works by Author (Two-Step Pattern)
Find Works by Institution (Two-Step Pattern)
Get Highly Cited Recent Papers
Get Open Access Works Only
Filter by Multiple Criteria
Bulk Lookup by DOIs
Get Works from Specific Journal
Aggregate/Group Data
Pagination for Large Result Sets
Select Specific Fields Only (Faster Responses)
Autocomplete for Type-Ahead
Tag Your Own Text (/text endpoint)
Response Structure
List Endpoints
Single Entity Endpoints
Group By Responses
Performance Optimization Tips
1. Use Maximum Page Size
2. Use Batch ID Lookups
3. Select Only Fields You Need
4. Use Concurrent Requests with Rate Limiting
5. Get an API Key for Heavy Usage
Handling Errors
Common HTTP Status Codes
Exponential Backoff Pattern
Entity-Specific Filter Examples
Works Filters (Most Common)
Authors Filters
Sources Filters
Institutions Filters
External ID Support
Works
Authors
Institutions
Sources
Advanced Tips
Reproducible Random Samples
Finding Related Works
Filtering by Date Ranges
Complex Boolean Searches
Rate Limiting Best Practices
Without API Key
With Free API Key
With Premium API Key
Credit Costs
Concurrent Requests Strategy
Daily Limit Management
Common Mistakes to Avoid
Need More Info?
For Premium Features
Last updated