npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

orcid-parser

v0.2.1

Published

A TypeScript library for fetching and parsing ORCID v3.0 publication data

Readme

ORCID Parser

License: BSD-3-Clause NPM Package Version Package Yearly Downloads Minizipped Size Documentation Cite

Lightweight ORCID fetcher and parser. Get ORCID work entries of a profile in one line. Includes helpers to filter, sort, group, and summarize works.

Quick start

Installation

Install with your favorite package manager:

# npm
npm install orcid-parser

# yarn
yarn add orcid-parser

Importing

The default import (index) is standalone. The constants module is distributed separately for performance. Import constants module if you need definitions such as WORK_TYPES.

Use in the browser via CDN:

<script type="module">
  import { Orcid } from 'https://cdn.jsdelivr.net/npm/orcid-parser@latest/dist/index.mjs';
  import { WORK_TYPES } from 'https://cdn.jsdelivr.net/npm/orcid-parser@latest/dist/constants.mjs';
</script>

Use in Node.js/modern bundlers (ESM):

import { Orcid } from 'orcid-parser';
import { WORK_TYPES } from 'orcid-parser/constants';

Use in CommonJS (Node.js require):

const { Orcid } = require('orcid-parser');
const { WORK_TYPES } = require('orcid-parser/constants');

Fetching works

// Create a client instance
const client = new Orcid('0000-0002-1825-0097');

// Fetch all works associated with the ORCID ID.
const works = await client.fetchWorks();

// This will return the cache if exists. Otherwise, it will fetch.
const cachedWorks = await client.getWorks();
console.log(works);

Output:

[
  {
    putCode: 4562453,
    createdDate: 2013-02-17T20:00:56.538Z,
    lastModifiedDate: 2017-05-05T20:31:53.836Z,
    source: 'Josiah Carberry',
    title: 'Developing Thin Clients Using Amphibious Epistemologies',
    subtitle: 'Journal of Psychoceramics',
    translatedTitle: undefined,
    externalIds: [ [Object], [Object] ],
    publicationYear: 2008,
    publicationMonth: NaN,
    publicationDay: NaN,
    journalTitle: undefined,
    url: undefined,
    shortDescription: null,
    citation: {
      type: 'bibtex',
      value: '@article{Carberry_2008, ...}'
    },
    type: 'journal-article',
    contributors: [],
    languageCode: null,
    country: undefined
  },
  ...
  {
    putCode: 19980729,
    createdDate: 2015-11-04T18:52:26.999Z,
    lastModifiedDate: 2022-05-24T17:38:28.337Z,
    source: 'Scopus - Elsevier',
    title: 'Bulk and surface plasmons in artificially structured materials',
    subtitle: undefined,
    translatedTitle: undefined,
    externalIds: [ [Object], [Object] ],
    publicationYear: 1987,
    publicationMonth: NaN,
    publicationDay: NaN,
    journalTitle: 'IEEE Transactions on Plasma Science',
    url: 'http://www.scopus.com/inward/record.url?eid=2-s2.0-0023398608&partnerID=MN8TOARS',
    shortDescription: null,
    citation: {
      type: 'bibtex',
      value: '@article{Carberry1987, ...}}'
    },
    type: 'journal-article',
    contributors: [ [Object], [Object] ],
    languageCode: null,
    country: undefined
  }
]

Filtering and sorting

// Filter works by type
const articles = client.filterByType(WORK_TYPES.ARTICLE);
const papers = client.filterByType([WORK_TYPES.ARTICLE, WORK_TYPES.PREPRINT]);

// Filter by publication year range
const recentWorks = client.filterByYearRange(2020, 2024);

// Sort works by publication date
const sorted = client.sortByDate(); // sortByDate('desc'): newest first
const oldestFirst = client.sortByDate('asc');

Statistics and grouping

// Get statistics about works
const stats = client.getStats(works);
console.log(stats);

>> {
>>   total: 7,
>>   byType: { 'journal-article': 7 },
>>   byYear: { '1987': 1, '2008': 2, '2011': 1, '2012': 3 },
>>   yearRange: { min: 1987, max: 2012 }
>> }

// Group works by property
const byType = client.groupBy('type');
const byJournal = client.groupBy('journalTitle');

Standalone utilities

You can also use the utility functions independently:

import { Orcid, filterByType, sortByDate, getStats } from 'orcid-parser';

const works = await new Orcid('0000-0002-1825-0097').getWorks();

const articles = filterByType(works, 'journal-article');
const sorted = sortByDate(articles, 'desc');
const stats = getStats(works);

Configuration

const client = new Orcid('0000-0002-1825-0097', {
  baseURL: 'https://pub.orcid.org/v3.0',  // default
  timeout: 10000  // 10 seconds (default)
});

Citation

Citation is not required but is greatly appreciated. If this project helps you, please cite using the following APA-style reference:

Pornsiriprasert, S. (2025). ORCID Parser: A TypeScript library for fetching and parsing ORCID publication data (v0.2.1). Zenodo. https://doi.org/10.5281/zenodo.18006107

or this BibTeX entry.

@software{pornsiriprasert2025,
  author       = {Pornsiriprasert, Sira},
  title        = {ORCID Parser: A TypeScript library for fetching and parsing ORCID publication data},
  month        = dec,
  year         = 2025,
  publisher    = {Zenodo},
  version      = {v0.2.1},
  doi          = {10.5281/zenodo.18006107},
  url          = {https://doi.org/10.5281/zenodo.18006107},
}