pybliometrics-dev / pybliometrics

Python-based API-Wrapper to access Scopus
https://pybliometrics.readthedocs.io/en/stable/
Other
422 stars 129 forks source link

Get citation count at a given time #123

Closed VJalili closed 5 years ago

VJalili commented 5 years ago

Is there any method or API to get citation count at a given time? e.g., how many times the article with DOI XYZ was cited through 2016 (since it's publication date to 2016).

Michael-E-Rose commented 5 years ago

You can use the Citation Overview API to accomplish this: https://pybliometrics.readthedocs.io/en/stable/examples/CitationOverview.html

VJalili commented 5 years ago

Using that method I get 403 Client Error.

I am using the following code (from the documentation page):

from pybliometrics.scopus import CitationOverview
co = CitationOverview("2-s2.0-84930616647", start=2015, end=2017)

and I get the following error:

Traceback (most recent call last):
  File ".\main.py", line 2, in <module>
    co = CitationOverview("2-s2.0-84930616647", start=2015, end=2017)
  File "...\pybliometrics\scopus\abstract_citations.py", line 168, in __init__
    date=date)
  File "...\pybliometrics\scopus\classes\retrieval.py", line 60, in __init__
    res = get_content(qfile, refresh, url=url, params=params)
  File "...\pybliometrics\scopus\utils\get_content.py", line 165, in get_content
    content = cache_file(*args, **kwds).text.encode('utf-8')
  File "...\pybliometrics\scopus\utils\get_content.py", line 92, in cache_file
    resp.raise_for_status()
  File "...\Python37-32\lib\site-packages\requests\models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.elsevier.com/content/abstract/citations/2-s2.0-84930616647?view=STANDARD&date=2015-2017&scopus_id=84930616647
Michael-E-Rose commented 5 years ago

Yes, see the second sentence in the docs. You need special permission by Scopus for this API. Your local Scopus salesperson can help you.