yannis
yannis

Reputation: 926

Get the name attached to an ORCID ID through some API without Institution credentials

I have an ORCID number but my institution is not a "member". I'm editing Proceedings where each author has supplied eir ORCID numbers and I would like to check that these are correct. Instead of typing about 60 names into the www.orcid.org search interface, is there some way to do this through an API? (I can program in Perl, Python, PHP.)

Upvotes: 2

Views: 294

Answers (1)

yannis
yannis

Reputation: 926

Actually it was easier than I thought. All you need is to use the URL http://orcid.org/0000-0000-0000-0000 with the ORCID ID instead of the zeros, and you receive a file containing the name of the owner of that ID.

Here is Perl code to do it ($ORCID contains the ID for which we seek the owner):

system("wget -O tmp -q http://orcid.org/$ORCID");
open IN, "tmp";
binmode IN, ":utf8";
while (<IN>) {
if (m/<meta property="og:title" content="(.+?) \([0-9X-]{19}\)">/) { $name=$1; }
}
close IN;
print $name;

Upvotes: 0

Related Questions