Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to search by a specific field #3

Closed
jure opened this issue Sep 8, 2014 · 8 comments
Closed

Ability to search by a specific field #3

jure opened this issue Sep 8, 2014 · 8 comments

Comments

@jure
Copy link

jure commented Sep 8, 2014

As discussed in lagotto/alm-report#39, it would be great if one could search the CrossRef API by just a single field in its index. For example, I'd like to get all papers with authors with the last name Heisenberg, by doing something like you can do with the PLOS API:

http://api.plos.org/search?q=author:%22Heisenberg%22

or to get a fuller JSON:

http://api.plos.org/search?facet=false&fl=author,id,pmid,publication_date,received_date,accepted_date,title,cross_published_journal_name,author_display,editor_display,article_type,affiliate,subject,financial_disclosure&fq=!article_type_facet:%22Issue%20Image%22&hl=false&q=author:Heisenberg&rows=25&wt=json

Fields that would be interesting in this regard are:

  • author
  • title
  • journal
  • abstract
  • subject

Ideally, I could even say something like give me all papers where author is Heisenberg and title has "cell" in it. With PLOS's API for example, I'd do this:
http://api.plos.org/search?q=(author:Heisenberg)%20AND%20title:cell

Is there a way to be able to get this result with CrossRef's API? I imagine I'd first have to query all fields:
http://api.crossref.org/works?query=Heisenberg&filter=type:journal-article and then paginate & process the 8000+ results separately, to filter out articles which have "cell" in title?

@sckott
Copy link

sckott commented Sep 30, 2014

+1 for this feature

@JanneSeppanen
Copy link

Do you know if this is supported yet, and if so how? I see there is a field "author":[{"family":"Heisenberg","given":"Werner"} in the crossref api response, any way to filter by it?

@kjw
Copy link
Contributor

kjw commented Dec 12, 2014

Not yet supported, but 'coming soon'. Will update this issue when available.

@kjw
Copy link
Contributor

kjw commented May 24, 2016

Now available as field queries on /works:

https://github.com/CrossRef/rest-api-doc/blob/master/rest_api.md#field-queries

(Except subject and abstract. But that's a whole other kettle of fish.)

@jure
Copy link
Author

jure commented May 26, 2016

Fantastic! Great work @kjw!

@kjw
Copy link
Contributor

kjw commented May 26, 2016

Thanks @jure - sorry it took so long!

@JanneSeppanen
Copy link

JanneSeppanen commented May 26, 2016

Many thanks from me too - this is extremely useful for us too!

Another thing (probably not your responsibility at all but maybe you
can forward to someone):

CrossRef database has publications from the distant future, for
example these ones from the year 2112:
http://search.crossref.org/?q=%22European+Journal+of+Clinical+Nutrition%22&sort=year

Maybe you have secretly invented a time-machine or these are just
really early access papers :) , but in case it is an error, perhaps
CrossRef wants to look into it.

Kind regards,
Janne

Quoting Karl Jonathan Ward notifications@github.com:

Thanks @jure - sorry it took so long!


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#3 (comment)

@kjw
Copy link
Contributor

kjw commented May 26, 2016

@JanneSeppanen I'm glad to hear the API is useful to you. As for publication dates that are in the future - in this specific case we will get in contact with the publisher and encourage them to deposit corrected metadata. We are also starting a project to track common errors and improve our reporting, which I hope will lead to fewer obvious metadata errors in the future.

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

No branches or pull requests

4 participants