---
name: openalex
description: "Cross-disciplinary academic literature search via OpenAlex API — covers arts, humanities, social sciences, engineering, AI, and all non-STEM fields that arXiv doesn't reach."
version: 1.0.0
author: Hermes Agent
license: MIT
platforms: [linux, macos, windows]
metadata:
  hermes:
    tags: [Research, Literature, Academic, OpenAlex, Cross-disciplinary, Humanities, Social Science, Engineering]
    category: research
    related_skills: [arxiv, ocr-and-documents, academic-writing]
    requires_toolsets: [terminal, web]
---

# OpenAlex — Universal Academic Literature Search

Free, open, cross-disciplinary academic search. Covers 2.5亿+ papers across ALL fields — arts, philosophy, social sciences, engineering, energy, AI — unlike arXiv which is mainly STEM/preprints.

**API Key:** Free at https://openalex.org — no key required for basic use ($1/day limit with key, 1 req/s without).

## Quick Reference

| Action | Command |
|--------|---------|
| Search papers | `curl "https://api.openalex.org/works?search=KEYWORD"` |
| Filter by field | `filter=primary_topic.domain.id:D3` (Arts), `subdomain.id:S22` (Philosophy) |
| Get author works | `https://api.openalex.org/authors/AUTHOR_ID` |
| Get institution | `https://api.openalex.org/institutions/INST_ID` |

## API Base

```
https://api.openalex.org
```

No API key required for basic use. For higher limits: `mailto:your@email.com` appended to any request (or register at openalex.org for $1/day free tier).

## Search Papers

```bash
# Basic search
curl -s "https://api.openalex.org/works?search=digital+art+philosophy"

# With filters: philosophy papers from 2020+
curl -s "https://api.openalex.org/works?search=phenomenology+art&filter=from_publication_date:2020-01-01,primary_topic.subdomain.id:S22&per_page=10"

# Only open access papers
curl -s "https://api.openalex.org/works?search=AI+creativity&filter=is_oa:true&per_page=10"

# Cited-by count (most influential)
curl -s "https://api.openalex.org/works?search=computational+creativity&sort=cited_by_count:desc&per_page=5"
```

## Parse Output

```bash
curl -s "https://api.openalex.org/works?search=digital+art+hermeneutics&per_page=5" | python3 -c "
import sys, json
data = json.load(sys.stdin)
for w in data.get('results', []):
    title = w.get('title', '')
    authors = ', '.join(a.get('display_name','') for a in w.get('authorships',[])[:3])
    year = w.get('publication_year', '')
    cited = w.get('cited_by_count', 0)
    oa = 'OA' if w.get('is_oa') else ''
    doi = w.get('doi', '')
    print(f'[{year}] {title}')
    print(f'  Authors: {authors}')
    print(f'  Cited: {cited}x {oa} | {doi}')
    print()
"
```

## Domain & Subdomain Filters

Use `primary_topic.domain.id` or `primary_topic.subdomain.id`:

| Domain | Field | Subdomain | Example |
|--------|-------|-----------|---------|
| D3 | Arts | S24 | Art History |
| D3 | Arts | S25 | Visual Arts |
| D2 | Philosophy | S22 | Philosophy |
| D1 | Social Sciences | various | Sociology, Anthro |
| D4 | Engineering | various | Energy, Electrical |
| D1 | Computer Science | S20 | AI, HCI |

Common domain IDs:
- `D3` = Arts
- `D2` = Philosophy
- `D1` = Social Sciences  
- `D4` = Engineering
- `D6` = Computer Science / AI
- `D5` = Mathematics

Full list: https://openalex.org/domains

## Get Paper Details

```bash
# By DOI
curl -s "https://api.openalex.org/works/https://doi.org/10.1038/nature12373"

# By OpenAlex ID
curl -s "https://api.openalex.org/works/W2893546372"
```

## Get Author

```bash
# Search author
curl -s "https://api.openalex.org/authors?search=Merleau+Ponty"

# Get author's papers
curl -s "https://api.openalex.org/authors/A2208150847/works?sort=cited_by_count:desc&per_page=10"
```

## Get Citations Of A Paper

```bash
# Who cited this paper
curl -s "https://api.openalex.org/works?filter=cites:W2893546372&per_page=10&sort=cited_by_count:desc"
```

## Get References FROM A Paper

```bash
# What this paper cites
curl -s "https://api.openalex.org/works/W2893546372/references"
```

## Filter by Publication Venue

```bash
# In specific journals
curl -s "https://api.openalex.org/works?search=embodied+mind&filter=primary_location.source.display_name:Phenomenology"
```

## Batch Search (Multiple Topics)

```bash
# Research across fields in one query
for topic in "digital_art" "energy_policy" "AI_ethics" "phenomenology"; do
  echo "=== $topic ==="
  curl -s "https://api.openalex.org/works?search=$topic&per_page=3&sort=cited_by_count:desc" | python3 -c "
import sys,json; data=json.load(sys.stdin)
for w in data.get('results',[]):
    print(f'  [{w[\"publication_year\"]}] {w[\"title\"][:60]} — {w[\"cited_by_count\"]} citations')"
done
```

## Python Helper Script

The working script is at `~/.hermes/scripts/search_openalex.py`. It uses `subprocess + curl` (not `urllib`) because `urllib.request` is blocked in this server environment.

```bash
# Usage
python3 ~/.hermes/scripts/search_openalex.py "AI art"                    # basic search
python3 ~/.hermes/scripts/search_openalex.py "phenomenology" --domain D2 # philosophy domain
python3 ~/.hermes/scripts/search_openalex.py "smart grid" --from 2020 --sort cited  # from year, sort by citations
python3 ~/.hermes/scripts/search_openalex.py "diffusion model" --oa --max 5          # open access only
```

**Important:** `urllib.request` is blocked in this environment. Always use curl for OpenAlex API calls here.

## Cross-Disciplinary Research Workflow

Use OpenAlex for non-STEM, arXiv for CS/AI/ML papers:

| Field | Primary Source | Secondary |
|-------|---------------|-----------|
| CS/AI/ML | arXiv + OpenAlex | Semantic Scholar |
| Engineering/Energy | OpenAlex + IEEE Xplore | Google Scholar |
| Philosophy | OpenAlex (D2) | PhilPapers |
| Art History | OpenAlex (D3) | JSTOR, specialized DBs |
| Social Sciences | OpenAlex (D1) | Google Scholar |
| AI+Art crossover | OpenAlex + arXiv | Semantic Scholar |

## Rate Limits

- Without key: ~1 req/s
- With key ($1/day free): higher throughput
- Use `mailto:` trick for basic rate increase: append `&mailto=your@email.com`

## Notes

- OpenAlex ID format: `W2893546372` (works), `A2208150847` (authors), `I1983001"` (institutions)
- `display_name` is human-readable, `id` is the OpenAlex URI
- `primary_topic` field gives the best-domain classification
- For Chinese literature (知网/万方), OpenAlex has limited CN coverage — use Google Scholar for CN papers
