Search OpenAlex for academic articles using YAML-frontmatter markdown files
Project description
mad-search
Search OpenAlex for academic articles using YAML-frontmatter markdown files.
Requirements
- Python 3.13+
- A free OpenAlex API key
Installation
# run directly with uv
uv run mad-search path/to/search.md
# or install globally
uv tool install mad-search
Usage
Create a markdown file with YAML frontmatter:
---
api_key: your_key_here
query: "(machine learning AND climate) OR large language models"
journals:
- Nature
- Science
year_from: 2020
year_to: 2025
---
Run it:
uv run mad-search search.md
Results are written to out/result.md (the input file is never modified — keeping your API key safe).
Features
- Boolean search —
AND,OR,NOTwith parentheses, passed directly to OpenAlex's Elasticsearch backend - Journal filter — names auto-resolved to ISSNs via the OpenAlex Sources endpoint
- Year range — optional
year_from/year_toconstraints - Result re-ranking — results scored by title match (40%), abstract match (20%), and concept overlap (40%) after retrieval
- Structured output — summary table plus detail sections with DOI, citation count, FWCI, concepts (top 5, score ≥ 0.3), and abstract
- Idempotent — re-running overwrites
out/result.md
Output
Results are written to out/result.md as a markdown table with detail sections:
## Results — 5 paper(s) found
| # | Title | DOI | Journal | Year | Citations | Authors |
|---|---|---|---|---|---|---|
---
### 1. Paper Title
- **DOI:** `10.xxx/...`
- **Authors:** ...
- **Journal:** ...
- **Citations:** 124 | FWCI: 3.2
- **Concepts:** Climate Science (0.92), Machine Learning (0.87)
- **Abstract:** ...
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mad_search-0.1.2.tar.gz.
File metadata
- Download URL: mad_search-0.1.2.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94cbea768a240006a19ed4a1cb5fe5f63c813d0bb0877de22178a373bf7f9a20
|
|
| MD5 |
fde589e5f5dad4293081e032337a23f6
|
|
| BLAKE2b-256 |
63f454e4dd9d61f4865d6547d69fa94fba9ea95d22c12f9d5afbe153c0b0484d
|
File details
Details for the file mad_search-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mad_search-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16ddba5b33871607efbd9679b5cf4dcdf070e9e34a8e32887fa5c04a3805151c
|
|
| MD5 |
5b3e936a7aafa490766bf348d209c938
|
|
| BLAKE2b-256 |
46cb0df2a51e06e5b5e9e029bedb372ab75462169de8f0b9e24e4a320938bf3f
|