Giter Site home page Giter Site logo

openalexapi's Introduction

Archived in favor of pyalex

OpenAlex API

This is a Python library used to access information from the OpenAlex JSON API

For details see https://docs.openalex.org/api

License

GPLv3+

openalexapi's People

Contributors

dpriskorn avatar essentiallynoah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

openalexapi's Issues

Support new features

We’ve got a ton of great API improvements to report! If you’re an API user, there’s a good chance there’s something in here you’re gonna love.

Search

You can now search both titles and abstracts. We’ve also implemented stemming, so a search for “frogs” now automatically gets your results mentioning “frog,” too. Thanks to these changes, searches for works now deliver around 10x more results. This can all be accessed using the new search query parameter.

New entity filters

We’ve added support for tons of new filters, which are documented here. You can now:

get all of a work’s outgoing citations (ie, its references section) with a single query.
search within each work’s raw affiliation data to find an arbitrary string (eg a specific department within an organization)
filter on whether or not an entity has a canonical external ID (works: has_doi, authors: has_orcid, etc)
Request multiple records by ID at once

This has been our most-requested feature and we’re super excited to roll it out! By using the new OR operator, you can request up to 50 entities in a single API call. You can use any ID we support–DOI, ISSN, OpenAlex ID, etc.

Deep paging

Using cursor-based paging, you can now retrieve an infinite number of results (it used to be just the top 10,000). But remember: if you want to download the entire dataset, please use the snapshot, not the API! The snapshot is the exact same data in the exact same format, but much much faster and cheaper for you and us.

More groups in group_by queries

We now return the top 200 groups (it used to be just the top 50).

New Autocomplete endpoint

Our new autocomplete endpoint dead easy to use our data to power an autocomplete/typeahead widget in your own projects. It works for any of our five entity types (works, authors, venues, institutions, or concepts). If you’ve got users inputting the names of journals, institutions, or other entities, now you can easily let them choose an entity instead of entering free text–and then you can store the ID (ISSN, ROR, whatever) instead of passing strings around everywhere.

Better docs

In addition to documenting the new features above, we’ve also added lots of new documentation for existing features, addressing our most frequent questions and requests:

a new getting-started tutorial walks you through using the API to find the percent of journal articles from a given institution that are Open Access.
for each of our five entity types, an overview describing what that entity is and how we get it.
more documentation of the OpenAlex ID and of our Canonical External IDs (DOIs, RORs, etc).
a section about using logical expressions (inequalities and booleans) with filters.
lots more explanation and examples on the group_by page.
a (short) list of community-created client libraries
Thanks to everyone who’s been in touch to ask for new features, report bugs, and tell us where we can improve (also where we’re doing well, we’re ok with that too).

We’ll continue improving the API and the docs. We’re also putting tons of work into improving the underlying dataset’s accuracy and coverage, and we’re happy to report that we’ve improved a lot on what we inherited from MAG, with more improvements to come. We’ve delayed the launch of the full web UI, but expect that in the summer…we are so excited about all the possibilities that’s going to open up.

Missing dependencies

    344 except ImportError as e:
--> 345     raise ImportError('email-validator is not installed, run `pip install pydantic[email]`') from e

ImportError: email-validator is not installed, run `pip install pydantic[email]`
      4 import logging
      5 from typing import Optional, List
----> 7 import backoff  # type: ignore
      8 import requests
      9 from pydantic import BaseModel, EmailStr

ModuleNotFoundError: No module named 'backoff'

Loading a work crashes when oa_status is blank

Hi,

I'm experiencing the following issue whenever I retrieve a work that has no information given for the oa_status variable (example: https://api.openalex.org/works/W2150191218):

oa = openalexapi.OpenAlex()
oa.get_single_work("https://openalex.org/W2150191218")

yields:

Traceback (most recent call last):
File "mappings/openalex.py", line 5, in
oa.get_single_work("https://openalex.org/W2150191218")
File "env/lib/python3.8/site-packages/openalexapi/init.py", line 35, in get_single_work
return Work(**response.json())
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 1 validation error for Work
open_access -> oa_status
none is not an allowed value (type=type_error.none.not_allowed)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.