Skip to content

Science: New OpenAlex tools: Search & Load Text #73

Open

Description

@SommerEngineering

Idea

For scientific research, the AI should be able to search OpenAlex for suitable sources and read them. OpenAlex does not have a full text for every work; for many, only the abstract is available. That's why the second tool is called Load Text instead of Load PDF.

Tools

  • Search (openalex_search): Searches works and returns for each hit the OpenAlex ID, DOI, title, authors, year, venue, open access status, and whether a full text is available.
  • Load Text (openalex_load_text): Loads the text of a work: the full text when OpenAlex has one, otherwise the abstract.

API

OpenAlex offers a public API, which we tested on 2026-10-03:

  • Endpoint https://api.openalex.org/works?search=…, with filters (e.g., year, open access, type) and up to 100 results per page, response as JSON.
  • Abstracts only come as abstract_inverted_index, a map from each word to its positions. The tool has to rebuild the text from it.
  • Full text: According to the documentation, OpenAlex keeps copies of about 60 million open access works as PDF, about 43 million of them also as GROBID TEI XML. Each work states this in has_content and content_urls, e.g., https://content.openalex.org/works/<id>.grobid-xml. The TEI XML is already structured text, so Load Text does not need to parse PDFs.

Costs and API key

OpenAlex has usage-based pricing:

  • Without an API key, the daily budget is $0.10 (according to the response headers). A search costs $0.001, which allows about 100 searches a day.
  • A free API key raises the budget to $1 a day. More is available pay-as-you-go.
  • Full text downloads always need an API key; without one, the API answers with HTTP 401. According to the documentation, a download costs $0.01.

Requirements

  • API key setting: An optional API key, stored in the OS keychain like the API keys of providers and configurable by enterprise IT. Without a key, Load Text falls back to the abstract. Optionally, it could load the open access PDF directly from the publisher (best_oa_location.pdf_url).
  • Budget: When the daily budget is used up, the tools say so clearly instead of failing silently.
  • Licenses: Metadata is CC0. Each full text is subject to the license of its work (best_oa_location.license).
  • Prompt injection: OpenAlex passes text fields through unprocessed. Search results and loaded texts are untrusted content and have to pass the prompt injection check like every other tool result.

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    • Status
      Accepted

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions