Skip to content

Digital-Identity-Labs/ror

Repository files navigation

ROR

ROR is an unofficial client for the Research Organization Registry (ROR) API for Elixir.

The Research Organization Registry (ROR) includes IDs and metadata for more than 110,000 organizations and counting. Registry data is CC0 and openly available via a search interface, REST API, and data dump. Registry updates are curated through a community process and released at least once a month

Please read ROR's terms of use and do not put excessive load on their API service.

Hex pm API Docs Github Elixir CI

Run in Livebook

Features

  • Lookup individual ROR records by ID
  • Search and Quick Search based on names or record attributes
  • Paging and filters are supported
  • Match text to records, possibly identifying an organisation from existing data
  • Records are returned as typed structs (slightly different to the ROR JSON responses, but containing all the information)
  • Client ID authentication is supported and optional
  • (This is an early version and only contains the basics so far)

The top level ROR module contains functions for retrieving data from the API. Other ROR modules may not be needed at all. Other modules include:

  • ROR.Client presents a lower-level way to retrieve data, and returns maps based on the literal ROR JSON responses.
  • ROR.Organization contains a struct and utilities for the main ROR organization record
  • ROR.Results is an enumerable struct that contains both Organizations and metadata
  • ROR.Matches is another enumerable struct, which contains results from affiliation searches

Examples

Retrieving data about an organization using its ROR ID

org = ROR.get!("https://ror.org/04h699437")
org.domains
# => ["le.ac.uk"],

List ROR records, specifying a page and a filter

ROR.list!(page: 15, filter: [type: :government])
|> Enum.map(fn org -> org.id end)
# => ["https://ror.org/05m615h78", "https://ror.org/04wbxh769",
#     "https://ror.org/04xh10z69", "https://ror.org/0127sq784",
#     "https://ror.org/021c40092", "https://ror.org/00wyejx41",
#     "https://ror.org/01q5ara80", "https://ror.org/05sej3528",
#     "https://ror.org/024nbjg39", "https://ror.org/00n523x67",
#     "https://ror.org/02zqy3981", "https://ror.org/0320bge18",
#     "https://ror.org/02jcwf181", "https://ror.org/02m388s04",
#     "https://ror.org/01r2man76", "https://ror.org/05335sh79",
#     "https://ror.org/03hwfnp11", "https://ror.org/01wsx6q69",
#     "https://ror.org/042jr0j26", "https://ror.org/03y255h89"]

A quick search

a = ROR.quick_search!("University of Manchester")
    |> Enum.take(1)
    |> List.first()
a.established
# => 1824

An affiliation search for strong match or nil, also showing off the string conversion feature

org = ROR.chosen_organization!("CERN")
Enum.map(org.names, &to_string/1)
# => ["CERN", "European Organization for Nuclear Research",
#     "Europäische Organisation für Kernforschung",
#     "Organisation européenne pour la recherche nucléaire"]

Installation

If available in Hex, the package can be installed by adding ror to your list of dependencies in mix.exs:

def deps do
  [
    {:ror, "~> 0.1.0"}
  ]
end

References

ROR Resources

Documentation

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ror.

Contributing

You can request new features by creating an issue, or submit a pull request with your contribution.

If you are comfortable working with Python but ROR's Elixir code is unfamiliar then this blog post may help: Elixir For Humans Who Know Python

Copyright and License

Copyright (c) 2025 Digital Identity Ltd, UK

This software is MIT licensed.

Disclaimer

This Elixir ROR library is not endorsed by The Research Organization Registry (ROR)

This software may change considerably in the first few releases after 0.1.0 - it is not yet stable!

About

Unofficial HTTP API client for The Research Organization Registry

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages