close
Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

Filtering not working via REST api #17

@nnn911

Description

@nnn911

Hi,

I'm trying to use the index rest api to read citations data using the example provided in the documentation:

import requests
url = "https://opencitations.net/index/api/v2/citations/doi:10.1186/1756-8722-6-59
response = requests.get(url)
print(response.json())

I get back 186 records:

[{'author_sc': 'no',
  'cited': 'omid:br/06190834283 doi:10.1186/1756-8722-6-59 '
           'openalex:W2120377900 pmid:23958373',
  'citing': 'omid:br/06101440095 doi:10.3390/molecules25092135 '
            'openalex:W3023096242 pmid:32370213',
  'creation': '2020-05-02',
  'journal_sc': 'no',
  'oci': '06101440095-06190834283',
  'timespan': 'P6Y8M13D'},
 {'author_sc': 'no',
  'cited': 'omid:br/06190834283 doi:10.1186/1756-8722-6-59 '
           'openalex:W2120377900 pmid:23958373',
  'citing': 'omid:br/06101524605 doi:10.1016/j.clim.2016.01.012 '
            'openalex:W2250687747 pmid:26821304',
  'creation': '2016-03',
  'journal_sc': 'no',
  'oci': '06101524605-06190834283',
  'timespan': 'P2Y6M'},...

If i now add a filter:

url = "https://opencitations.net/index/api/v2/citations/doi:10.1186/1756-8722-6-59?filter=date:>2020" 

I get back the same 186 records, even though most of them have creation days before 2020.

Am I using the API wrong or is this a bug in the backend?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions