Counting

Recipes for counting things in OpenAlex. For building the result set you’re counting, see Searching; for the full querying story, start with Querying.

Which journals publish the most on a topic?

Split the topic’s works by journal in OQL. Type this into the OQL tab on openalex.org, or send it to the API (this exact query):

get the count of works since 2020 about kelp by journal

One row per journal, most works first: for kelp since 2020, Frontiers in Marine Science (153), Journal of Applied Phycology (121), Journal of Phycology (112). Each work counts once, under the journal of its primary location. Add numbers to compare the journals:

get the count and mean FWCI of works since 2020 about kelp by journal, highest mean FWCI first. Only journals with at least 20 works since 2020 about kelp.
get the count and percent open access of works since 2020 about kelp by journal

The first ranks the 21 journals with at least 20 kelp papers by FWCI (Ecology leads at 4.1); the Only sentence keeps a journal with one highly cited paper from topping the list. The second shows how much of each journal’s kelp work is open access. More splits and numbers: Tracking trends over time, the OQL guide.

How do I count all the citations to a set of results?

For any result set — whatever searches and filters you’ve applied — add the citations sum facet under Stats (click ”+” next to Stats → citations sum). It shows the total citations received by every work in the set. Divide by the number of results for the average citations per work.

How do I check whether a journal’s works are in OpenAlex?

Search for the journal by name and click it — that filters to works whose primary location is that journal, so you can browse its coverage. If the name doesn’t turn it up, search by ISSN instead. Still nothing? Get in touch.

Why do the counts-by-year numbers differ from what I see in the interface?

The counts_by_year, works_count, and cited_by_count numbers nested inside an entity (an author, institution, or source) are precomputed. They are refreshed regularly, so they trail a live works query only slightly (typically well under 1%). When the gap is bigger, it usually comes from one of these:

  • Institutions and publishers count only themselves. An institution’s works_count counts works tagged with that institution, not its units (labs, hospitals, merged predecessor records); a publisher’s counts its own sources, not its imprints’. The website’s works list for an institution or publisher includes those units, because it filters on lineage (authorships.institutions.lineage, primary_location.source.host_organization_lineage). For institutions, works_count_with_children_and_predecessors is the count that matches that list (plus the expansion corpus).
  • Entity counts include the expansion corpus. works_count counts works in both corpora, while a works query counts only the core corpus unless you add corpus=all.
  • Topics count primary topics. A topic’s works_count counts works whose primary topic it is; filtering on topics.id also matches secondary topics.
  • Sources count primary locations. A source’s works_count counts works whose primary location is that source.

If you need an exact count, run a works search filtered by the entity (e.g. openalex.org/works?filter=authorships.author.id:A5086928770) instead of reading the nested number. Full explanation: Counts by year.

Last updated

View as Markdown