CORE API Documentation

This page documents the CORE API methods and API response codes.

Here you will find a documentation for CORE API. An introduction to the Web API is available here.

In order to use the API you will first need to register an API key. To request a new API key, please follow these instructions. The API key will be used to authorise your API requests. The API is available completely free of charge. To protect the service from excessive use, the number of request per unit of time is moderately restricted as described on this page.

Search

This method searches the CORE database to find documents matching a query.

Resource URL

http://core.kmi.open.ac.uk/api/search/⟨search_criteria⟩

Request methods

  • GET
  • POST

Parameters

Required

  • search_criteria: URL encoded search query
  • api_key: API key

Optional

  • format: XML or JSON, by default the response is sent in the XML format
  • count: number of results returned, 10 by default - cannot exceed 100
  • offset: the start index of results to return

Returns

  • 200 OK (success response)
  • 204 No Content (request was correct but no articles were found)
  • 400 Bad Request (request parameters are not valid)
  • 401 Unauthorized (missing API key)
  • 403 Forbidden (request limit was crossed)
  • 500 Internal Server Error (there was an error in the application)

Examples

XML

Request

GET http://core.kmi.open.ac.uk/api/search/semantic%20web?api_key=ks8d74h5b4uj
GET http://core.kmi.open.ac.uk/api/search/title:%20(semantic%20web)?api_key=ks8d74h5b4uj

Response

<?xml version="1.0" encoding="UTF-8"?>
<ListRecords>
    <total_hits>
        60124
    </total_hits>
    <record>
        <header xmlns:core="http://core.kmi.open.ac.uk/api/doc">
            <identifier>90157</identifier>
            <core:repositoryIdentifier>1</core:repositoryIdentifier>
        </header>
        <metadata>
            <oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" 
                       xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" 
                       xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
                <dc:creator>David Corsar, Pete Edwards, Nagendra Velaga, John Nelson, Jeff Pan</dc:creator>
                <dc:title>Addressing the Challenges of Semantic Citizen-Sensing</dc:title>
                <dc:description>Preprint</dc:description>
                <dc:format>application/pdf</dc:format>
                <dc:identifier>http://core.kmi.open.ac.uk/download/pdf/90157/1</dc:identifier>
                <dc:identifier>http://core.kmi.open.ac.uk/display/90157</dc:identifier>
                <dc:identifier>oai:aura.abdn.ac.uk:2164/2261</dc:identifier>
                <dc:source>Aberdeen University Research Archive (AURA)</dc:source>
                <dc:source>http://research.ict.csiro.au/conferences/ssn/ssn11/semantic_sensor_networks_2011.pdf</dc:source>
                <dc:date>2011-10-23</dc:date>
            </oai_dc:dc>
        </metadata>
    </record>
</ListRecords>

JSON

Request

GET http://core.kmi.open.ac.uk/api/search/semantic%20web?format=json&api_key=ks8d74h5b4uj

Response

{
   "ListRecords":[
      {
         "total_hits":60124,
         "record":{
            "header":{
               "identifier":"1589",
               "core:repositoryIdentifier":"5"
            },
            "metadata":{
               "oai_dc:dc":{
                  "oai_dc:ns":[
                     {
                        "xmlns:oai_dc":"http:\/\/www.openarchives.org\/OAI\/2.0\/oai_dc\/",
                        "xsi:schemaLocation":"http:\/\/www.openarchives.org\/OAI\/2.0\/oai_dc\/ http:\/\/www.openarchives.org\/OAI\/2.0\/oai_dc.xsd",
                        "xmlns:dc":"http:\/\/purl.org\/dc\/elements\/1.1\/"
                     }
                  ],
                  "dc:creator":"Cameron Barnes and Belinda Tynan",
                  "dc:format":"application\/pdf",
                  "dc:source":"http:\/\/repository.alt.ac.uk\/724\/1\/ALT_J%2DVol15_No3_2007_The_adventures_of_Miranda_in_t.pdf",
                  "dc:date":"2007-09",
                  "dc:identifier":"oai:generic.eprints.org:724\/core5",
                  "dc:description":"This paper looks at the implications of Web 2.0 technologies for university teaching and ...",
                  "dc:title":"The adventures of Miranda in the brave new world: learning in a Web 2.0 millennium"
               }
            }
         }
      }
   ]
}

Similar & Duplicate

Searches the CORE database for similar or duplicate documents to the specified document.

Resource URL

http://core.kmi.open.ac.uk/api/get/⟨method⟩?⟨resource_type⟩=⟨resource_value⟩

Request methods

  • GET

Parameters

Required

  • method: must be one of {similar, duplicate}
  • resource_type: must be one of {document_id, oai, uri}
  • api_key: registered API key

Optional

  • count: number of returned articles (default is 10)

Returns

  • 200 OK (success response)
  • 204 No Content (request was correct but no articles were found)
  • 401 Unauthorized (missing API key)
  • 403 Forbidden (request limit was crossed)
  • 404 Not Found (requested document doesn't exist)
  • 500 Internal Server Error (there was an error in the application)

Examples

Request

GET http://core.kmi.open.ac.uk/api/get/similar?document_id=5600&count=1&api_key=ks8d74h5b4uj

Response

<?xml version="1.0" encoding="UTF-8"?>
<ListRecords>
    <record>
        <header>
            <MuSim:AssociationMethod>core:CosineTFIDFSim</MuSim:AssociationMethod>
            <core:repositoryIdentifier>124</core:repositoryIdentifier>
            <MuSim:weight>0.357001</MuSim:weight>
            <identifier>2767499</identifier>
        </header>
        <metadata>
            <oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
                <dc:creator>Maren Duvendack</dc:creator>
                <dc:format>application/pdf</dc:format>
                <dc:source>University of East Anglia digital repository</dc:source>
                <dc:source>https://ueaeprints.uea.ac.uk/18840/1/WP24.pdf</dc:source>
                <dc:date>2010-08</dc:date>
                <dc:identifier>http://core.kmi.open.ac.uk/download/pdf/2767499/124</dc:identifier>
                <dc:identifier>http://core.kmi.open.ac.uk/display/2767499</dc:identifier>
                <dc:identifier>oai:ueaeprints.uea.ac.uk:18840</dc:identifier>
                <dc:title>Smoke and mirrors: evidence of microfinance impact from an evaluation of SEWA bank in India</dc:title>
            </oai_dc:dc>
        </metadata>
    </record>
</ListRecords>

Request

GET http://core.kmi.open.ac.uk/api/get/duplicate?document_id=5600&api_key=ks8d74h5b4uj

Response

<?xml version="1.0" encoding="UTF-8"?>
<duplicates xmlns:core="http://core.kmi.open.ac.uk/api/doc" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <core:identifier>6329oai:eprints.bbk.ac.uk.oai2:959</dc:identifier>
    <ListDuplicates>
        <duplicate>
            <core:identifier>5600</core:identifier>
            <dc:identifier>oai:eprints.bbk.ac.uk.oai2:3195</dc:identifier>
        </duplicate>
    </ListDuplicates>
</duplicates>

Request

GET http://core.kmi.open.ac.uk/api/get/duplicate?oai=oai:eprints.bbk.ac.uk.oai2:959&api_key=ks8d74h5b4uj&format=json

Response

{
    "duplicates":{
        "ListDuplicates":[
            {"core:identifier":5600,"dc:identifier":"oai:eprints.bbk.ac.uk.oai2:3195"}
        ],
        "core:identifier":6329,
        "dc:identifier":"oai:eprints.bbk.ac.uk.oai2:959"
    }
}

Similar (for text)

Searches the CORE repository for similar documents to a given text fragment.

Resource URL

http://core.kmi.open.ac.uk/api/get/similar

Request methods

  • POST

Parameters

Required

  • text: text which will be analyzed for similarity
  • api_key: API key

Optional

  • format: XML or JSON, by default the response is sent in the XML format
  • count: number of results returned, 10 by default

Returns

  • 200 OK (success response)
  • 204 No Content (request was correct but no articles were found)
  • 400 Bad Request (missing text)
  • 401 Unauthorized (missing API key)
  • 403 Forbidden (request limit was crossed)
  • 500 Internal Server Error (there was an error in the application)

Examples

XML

Request

POST http://core.kmi.open.ac.uk/api/get/similar
POST DATA text=Some%20text%20to%20be%20analyzed.&count=5&api_key=ks8d74h5b4uj

Response

<?xml version="1.0" encoding="UTF-8"?>
<ListRecords>
    <record>
        <header>
            <identifier>90157</identifier>
            <core:repositoryIdentifier>1</core:repositoryIdentifier>
            <MuSim:AssociationMethod>core:CosineTFIDFSim</MuSim:AssociationMethod>
            <MuSim:weight>0.9952741</MuSim:weight>
        </header>
        <metadata>
            <oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" 
                       xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" 
                       xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
                <dc:creator>David Corsar, Pete Edwards, Nagendra Velaga, John Nelson, Jeff Pan, School Aberdeen, dot Aberdeen, School Aberdeen and Geography Aberdeen</dc:creator>
                <dc:title>Addressing the Challenges of Semantic Citizen-Sensing</dc:title>
                <dc:description>Preprint</dc:description>
                <dc:format>application/pdf</dc:format>
                <dc:identifier>http://core.kmi.open.ac.uk/download/pdf/90157/1</dc:identifier>
                <dc:identifier>http://core.kmi.open.ac.uk/display/90157</dc:identifier>
                <dc:identifier>oai:aura.abdn.ac.uk:2164/2261</dc:identifier>
                <dc:source>Aberdeen University Research Archive (AURA)</dc:source>
                <dc:source>http://research.ict.csiro.au/conferences/ssn/ssn11/semantic_sensor_networks_2011.pdf</dc:source>
                <dc:date>2011-10-23</dc:date>
            </oai_dc:dc>
        </metadata>
    </record>
</ListRecords>

JSON

Request

POST http://core.kmi.open.ac.uk/api/get_similar
POST DATA text=Some%20text%20to%20be%20analyzed.&response_format=json&api_key=ks8d74h5b4uj

Response

{
   "ListRecords":[
      {
         "record":{
            "header":{
               "MuSim:AssociationMethod":"core:CosineTFIDFSim",
               "core:repositoryIdentifier":"143",
               "MuSim:weight":"0.9998858",
               "identifier":"1051754"
            },
            "metadata":{
               "oai_dc:dc":{
                  "oai_dc:ns":[
                     {
                        "xmlns:oai_dc":"http:\/\/www.openarchives.org\/OAI\/2.0\/oai_dc\/",
                        "xsi:schemaLocation":"http:\/\/www.openarchives.org\/OAI\/2.0\/oai_dc\/ http:\/\/www.openarchives.org\/OAI\/2.0\/oai_dc.xsd",
                        "xmlns:dc":"http:\/\/purl.org\/dc\/elements\/1.1\/"
                     }
                  ],
                  "dc:creator":"Dr. Chandra.E and Rajeswari .J",
                  "dc:format":"application\/pdf",
                  "dc:source":"http:\/\/www.ijest.info\/docs\/IJEST11-03-10-195.pdf",
                  "dc:date":"2011",
                  "dc:identifier":"oai:core.kmi.open.ac.uk:1051754",
                  "dc:description":"Data classification is an essential step in trying to safeguard one of the chief properties of an organization -its information. Data classification engages categorizing information to predefined levels. For every level, organizations must allocate different levels of security controls and restrict the number of employees or persons who can access the information. Data classification would be difficult in large organizations with significant content to estimate and classify. With the assistance of a data classification approach, organizations can recognize and implement proper setting for private access control and also can obtain decision based on the obtained result from data classification. Machine learning techniques are one of the best classification approaches in the recent development. Many techniques are available under the machine learning approaches and the most important objective of machine learning research is to automatically learn to identify complex patterns and make intelligent decisions based on data. In this paper, data classification usingmany Machine Learning Techniques has been discussed. This paper focuses on better Machine Learning Techniques which supports data classification are available in the literature.",
                  "dc:title":"A Survey on Data Classification using Machine Learning Techniques"
               }
            }
         }
      }
   ]
}

Download

Returns a cached version of the full-text of a selected CORE article in the PDF or plain text format.

Resource URL

http://core.kmi.open.ac.uk/api/download/⟨format⟩/⟨document_id⟩

Request methods

  • GET

Parameters

Required

  • format: must be one of {pdf, text}
  • document_id: ID of PDF or text to be loaded
  • api_key: registered API key

Optional

  • repository_id: repository in which the document belongs

Returns

  • 200 OK (success response)
  • 401 Unauthorized (missing API key)
  • 403 Forbidden (request limit was crossed)
  • 404 Not Found (requested document doesn't exist)
  • 500 Internal Server Error (there was an error in the application)

Examples

Request

GET http://core.kmi.open.ac.uk/api/download/pdf/35760?repository_id=41&api_key=ks8d74h5b4uj
GET http://core.kmi.open.ac.uk/api/download/text/35760?api_key=ks8d74h5b4uj

Response

requested .pdf or .txt file
(ContentType = "application/pdf" or ContentType = "text/plain")

Classify

This method will attempt to detect the subject class for a given text fragment. It returns the class name. The method is experimental.

Resource URL

http://core.kmi.open.ac.uk/api/classify/text

Request methods

  • POST

Parameters

Required

  • text: text to be classified

Returns

  • 200 OK (success response)
  • 400 Bad Request (missing text)
  • 401 Unauthorized (missing API key)
  • 403 Forbidden (request limit was crossed)
  • 500 Internal Server Error (there was an error in the application)

Examples

Request

POST http://core.kmi.open.ac.uk/api/classify/text
POST DATA text=Some%20text%20to%20be%20analyzed.

Response

classification_token
(ContentType = "text/plain")

URLs

Method will return URLs from text of article in CORE.

Resource URL

http://core.kmi.open.ac.uk/api/get/urls/⟨document_id⟩

Request methods

  • GET

Parameters

Required

  • document_id: ID of document
  • api_key: registered API key

Optional

  • format: XML or JSON, by default the response is sent in the XML format

Returns

  • 200 OK (success response)
  • 204 No Content (request was correct but no URLs in text were found)
  • 401 Unauthorized (missing API key)
  • 403 Forbidden (request limit was crossed)
  • 404 Not Found (text for requested document doesn't exist)
  • 500 Internal Server Error (there was an error in the application)

Examples

XML

Request

GET http://core.kmi.open.ac.uk/api/get/urls/41214?api_key=ks8d74h5b4uj

Response

<?xml version="1.0" encoding="UTF-8"?>
<urlList>
    <url>http://iswc2005.semanticweb.org/</url>
    <url>http://www.pwc.com/</url>
    <url>http://knowledgeweb.semanticweb.org/</url>
    <url>http://www.foaf-project.org/</url>
    <url>http://www.friendster.com/</url>
    <url>http://www.orkut.com/</url>
    <url>https://www.linkedin.com/</url>
    <url>http://www.thefacebook.com/</url>
    <url>http://www.songbuddy.com/</url>
    <url>http://www.autotrader.co.uk</url>
    <url>http://www.rightmove.co.uk</url>
    <url>http://challenge.semanticweb.org/</url>
    <url>http://www.w3.org/DesignIssues/Semantic.html</url>
    <url>http://www.w3.org/2003/Talks/1023-iswc-tbl/</url>
    <url>http://www.w3.org/2004/Talks/0519-tbl-keynote/</url>
</urlList>

JSON

Request

GET http://core.kmi.open.ac.uk/api/get/urls/41214?format=json&api_key=ks8d74h5b4uj

Response

{
   "urlList":[
      {
         "url":"http://iswc2005.semanticweb.org/"
      },
      {
         "url":"http://www.pwc.com/"
      },
      {
         "url":"http://knowledgeweb.semanticweb.org/"
      },
      {
         "url":"http://www.foaf-project.org/"
      },
      {
         "url":"http://www.friendster.com/"
      },
      {
         "url":"http://www.orkut.com/"
      },
      {
         "url":"https://www.linkedin.com/"
      },
      {
         "url":"http://www.thefacebook.com/"
      },
      {
         "url":"http://www.songbuddy.com/"
      },
      {
         "url":"http://www.autotrader.co.uk"
      },
      {
         "url":"http://www.rightmove.co.uk"
      },
      {
         "url":"http://challenge.semanticweb.org/"
      },
      {
         "url":"http://www.w3.org/DesignIssues/Semantic.html"
      },
      {
         "url":"http://www.w3.org/2003/Talks/1023-iswc-tbl/"
      },
      {
         "url":"http://www.w3.org/2004/Talks/0519-tbl-keynote/"
      }
   ]
}

Citations

Returns list of document citations (list of documents cited by the requested document).

Resource URL

http://core.kmi.open.ac.uk/api/get/citations/⟨document_id⟩

Request methods

  • GET

Parameters

Required

  • document_id: ID of document
  • api_key: registered API key

Optional

  • format: XML or JSON, by default the response is sent in the XML format

Returns

  • 200 OK (success response)
  • 204 No Content (no citations were found for requested document)
  • 401 Unauthorized (missing API key)
  • 403 Forbidden (request limit was exceeded)
  • 500 Internal Server Error (there was an error in the application)

Examples

XML

Request

GET http://core.kmi.open.ac.uk/api/get/citations/44?api_key=ks8d74h5b4uj

Response

<?xml version="1.0" encoding="UTF-8"?>
<citationList>
    ...
    <citation>
        <title>
        Planning and Creating Eco-cities: Indicators as a Tool for Shaping Developing and Measuring Progress”, Local Environment,
        </title>
        <authors>
        <author>E Kline</author>
        </authors>
        <date>2000</date>
        <source_id>44</source_id>
        <cited_doc_id/>
    </citation>
    <citation>
        <title>Planning for Sustainability as a Learning Concept”</title>
        <authors>
        <author>T Meppem</author>
        <author>R Gill</author>
        </authors>
        <date>1998</date>
        <source_id>44</source_id>
        <cited_doc_id>7321376</cited_doc_id>
    </citation>
</citationList>

JSON

Request

GET http://core.kmi.open.ac.uk/api/get/urls/41214?format=json&api_key=ks8d74h5b4uj

Response

{
    "citationList":[
        {
            "citation":{
                "authors":[
                    {
                        "author":"E Kline"
                    }
                ],
                "title":"Planning and Creating Eco-cities: Indicators as a Tool for Shaping Developing and Measuring Progress\u201D, Local Environment,",
                "source_id":44,
                "cited_doc_id":"",
                "date":"2000"
            }
        },
        {
            "citation":{
                "authors":[
                    {
                        "author":"T Meppem"
                    },
                    {
                        "author":"R Gill"
                    }
                ],
                "title":"Planning for Sustainability as a Learning Concept\u201D",
                "source_id":44,
                "cited_doc_id":7321376,
                "date":"1998"
            }
        }
    ]
}

Doi

Returns doi name of document requested

Resource URL

http://core.kmi.open.ac.uk/api/get/doi/⟨document_id⟩

Request methods

  • GET

Parameters

Required

  • document_id: ID of document
  • api_key: registered API key

Optional

  • format: XML or JSON, by default the response is sent in the XML format

Returns

  • 200 OK (success response)
  • 204 No Content (no doi found for requested document)
  • 401 Unauthorized (missing API key)
  • 403 Forbidden (request limit was exceeded)
  • 404 Not Found (requested document does not exist)
  • 500 Internal Server Error (there was an error in the application)

Examples

XML

Request

GET http://core.kmi.open.ac.uk/api/get/doi/4869310?api_key=ks8d74h5b4uj

Response

<?xml version="1.0" encoding="UTF-8"?>
<doi>
    <identifier>4869310</identifier>
    <doi_name>10.1146/annurev.bi.17.070148.003455</doi_name>
</doi>

JSON

Request

GET http://core.kmi.open.ac.uk/api/get/doi/4869310?format=json&api_key=ks8d74h5b4uj

Response

{
  "doi": {
    "doi_name": "10.1146\/annurev.bi.17.070148.003455",
    "identifier": 4869310
  }
}        

Get Repositories

This method will return information about repositories harvested by CORE including CORE id, name, base url and Open DOAR id.

Get Repositories

http://core.kmi.open.ac.uk/api/stats/get_repositories

Request methods

  • GET

Parameters

Required

  • api_key: API key

Optional

  • format: XML or JSON, by default the response is sent in the XML format

Returns

  • 200 OK (success response)
  • 401 Unauthorized (missing API key)
  • 403 Forbidden (request limit was crossed)
  • 500 Internal Server Error (there was an error in the application)

Examples

XML

Request

GET http://core.kmi.open.ac.uk/api/stats/get_repositories?api_key=ks8d74h5b4uj

Response

<?xml version="1.0" encoding="UTF-8"?>
<repositories>
    ...
    <repository>
        <name>Electronics & Computer Science EPrints Service - University of Southampton</name>
        <base_url>http://eprints.ecs.soton.ac.uk/perl/oai2</base_url>
        <id>41</id>
        <iso_country_code/>
        <latitude/>
        <longitude/>
        <openDOAR_id>347</openDOAR_id>
    </repository>
    <repository>
        <name>Enlighten</name>
        <base_url>http://eprints.gla.ac.uk/perl/oai2</base_url>
        <id>42</id>
        <iso_country_code>GB</iso_country_code>
        <latitude>55.873290</latitude>
        <longitude>-4.288900</longitude>
        <openDOAR_id>162</openDOAR_id>
    </repository>
        <repository>
        <name>Eprints Archive - University of Portsmouth</name>
        <base_url>http://eprints.libr.port.ac.uk/perl/oai2</base_url>
        <id>43</id>
        <iso_country_code/>
        <latitude/>
        <longitude/>
        <openDOAR_id/>
    </repository>
    ...
</repositories>

JSON

Request

GET http://core.kmi.open.ac.uk/api/stats/get_repositories?format=json&api_key=ks8d74h5b4uj

Response

{
    "repositories":[
        ...
        {
            "repository":{
                "id":41,
                "openDOAR_id":"347",
                "iso_country_code" : "",
                "latitude" : "",
                "longitude" : "",
                "name":"Electronics & Computer Science EPrints Service - University of Southampton",
                "base_url":"http:\/\/eprints.ecs.soton.ac.uk\/perl\/oai2"
            }
        },
        {
            "repository":{
                "id":42,
                "openDOAR_id":"162",
                "iso_country_code" : "GB",
                "latitude" : "55.873290",
                "longitude" : "-4.288900",
                "name":"Enlighten",
                "base_url":"http:\/\/eprints.gla.ac.uk\/perl\/oai2"
            }
        },
        {
            "repository":{
                "id":43,
                "openDOAR_id":"",
                "iso_country_code" : "",
                "latitude" : "",
                "longitude" : "",
                "name":"Eprints Archive - University of Portsmouth",
                "base_url":"http:\/\/eprints.libr.port.ac.uk\/perl\/oai2"
            }
        },
        ...
    ]
}

Get Repository Statistics

This method returns statistical information about about a selected CORE repository:

  • id
  • name
  • base url
  • Open DOAR id
  • number of metadata records (without records marked as deleted)
  • number of metadata records marked as deleted
  • number of links in metadata
  • number of downloaded pdfs

Get Repository Statistics

http://core.kmi.open.ac.uk/api/stats/get_rep_stats

Request methods

  • GET

Parameters

Required

  • id: id of repositories
  • id_type type of id
  • api_key: API key

Optional

  • format: XML or JSON, by default the response is sent in the XML format

Returns

  • 200 OK (success response)
  • 204 No Content (no repository matched to provided id)
  • 401 Unauthorized (missing API key)
  • 403 Forbidden (request limit was crossed)
  • 404 Not Found (bad combination of parameters)
  • 500 Internal Server Error (there was an error in the application)

Examples

XML

Request

GET http://core.kmi.open.ac.uk/api/stats/get_rep_stats?id=3&api_key=ks8d74h5b4uj
GET http://core.kmi.open.ac.uk/api/stats/get_rep_stats?id=1767&id_type=openDOAR_id&api_key=ks8d74h5b4uj
GET http://core.kmi.open.ac.uk/api/stats/get_rep_stats?id=http://aura.abdn.ac.uk/dspace-oai/request&id_type=url&api_key=ks8d74h5b4uj

Response

<?xml version="1.0" encoding="UTF-8"?>
<repository>
    <name>Aberdeen University Research Archive</name>
    <base_url>http://aura.abdn.ac.uk/dspace-oai/request</base_url>
    <id>1</id>
    <openDOAR_id>1767</openDOAR_id>
    <metadata_count>763</metadata_count>
    <metadata_deleted_count>4</metadata_deleted_count>
    <link_count>762</link_count>
    <pdf_count>290</pdf_count>
    <indexed_count>745</indexed_count>
</repository>

JSON

Request

GET http://core.kmi.open.ac.uk/api/stats/get_rep_stats?id=3&format=json&api_key=ks8d74h5b4uj
GET http://core.kmi.open.ac.uk/api/stats/get_rep_stats?id=1767&id_type=openDOAR_id&format=json&api_key=ks8d74h5b4uj
GET http://core.kmi.open.ac.uk/api/stats/get_rep_stats?id=http://aura.abdn.ac.uk/dspace-oai/request&id_type=url&format=json&api_key=ks8d74h5b4uj

Response

{
    "repository":{
        "id":1,
        "pdf_count":290,
        "link_count":762,
        "metadata_count":763,
        "metadata_deleted_count":4,
        "openDOAR_id":1767,
        "name":"Aberdeen University Research Archive",
        "base_url":"http:\/\/aura.abdn.ac.uk\/dspace-oai\/request"
    }
}

Get Repository Update History

Returns the following information on the CORE update history for a selected CORE repository:

  • id
  • name
  • base url
  • Open DOAR id
  • updates
    • update id
    • update time (format: yyyy-MM-dd HH:mm:ss)
    • update type (one of: metadata_download, metadata_extract, pdfs, text, citations, language_detection, concept_extraction, index)
    • update status (one of: successful, unsuccessful)

Get Repository Statistics

http://core.kmi.open.ac.uk/api/stats/get_rep_update_history

Request methods

  • GET

Parameters

Required

  • id: id of repositories
  • id_type type of id
  • api_key: API key

Optional

  • format: XML or JSON, by default the response is sent in the XML format

Returns

  • 200 OK (success response)
  • 204 No Content (no repository matched to provided id)
  • 401 Unauthorized (missing API key)
  • 403 Forbidden (request limit was crossed)
  • 404 Not Found (bad combination of parameters)
  • 500 Internal Server Error (there was an error in the application)

Examples

XML

Request

GET http://core.kmi.open.ac.uk/api/stats/get_rep_update_history?id=3&api_key=ks8d74h5b4uj
GET http://core.kmi.open.ac.uk/api/stats/get_rep_update_history?id=1767&id_type=openDOAR_id&api_key=ks8d74h5b4uj
GET http://core.kmi.open.ac.uk/api/stats/get_rep_update_history?id=http://aura.abdn.ac.uk/dspace-oai/request&id_type=url&api_key=ks8d74h5b4uj

Response

<?xml version="1.0" encoding="UTF-8"?>
<repository>
    <name>Aberdeen University Research Archive</name>
    <base_url>http://aura.abdn.ac.uk/dspace-oai/request</base_url>
    <id>1</id>
    <openDOAR_id>1767</openDOAR_id>
    <updates>
        <update>
            <update_id>660</update_id>
            <update_time>2012-07-23 11:45:51</update_time>
            <update_type>index</update_type>
            <update_status>unsuccessful</update_status>
        </update>
        <update>
            <update_id>659</update_id>
            <update_time>2012-07-23 11:38:09</update_time>
            <update_type>index</update_type>
            <update_status>successful</update_status>
        </update>
        <update>
            <update_id>658</update_id>
            <update_time>2012-07-20 15:20:26</update_time>
            <update_type>citations</update_type>
            <update_status>successful</update_status>
        </update>
        ...
    </updates>
</repository>

JSON

Request

GET http://core.kmi.open.ac.uk/api/stats/get_rep_update_history?id=3&format=json&api_key=ks8d74h5b4uj
GET http://core.kmi.open.ac.uk/api/stats/get_rep_update_history?id=1767&id_type=openDOAR_id&format=json&api_key=ks8d74h5b4uj
GET http://core.kmi.open.ac.uk/api/stats/get_rep_update_history?id=http://aura.abdn.ac.uk/dspace-oai/request&id_type=url&format=json&api_key=ks8d74h5b4uj

Response

{
    "repository":{
        "id":1,
        "updates":[
            {
                "update":{
                    "update_status":"unsuccessful",
                    "update_id":660,
                    "update_time":"2012-07-23 11:45:51",
                    "update_type":"index"
                }
            },
            {
                "update":{
                    "update_status":"successful",
                    "update_id":659,
                    "update_time":"2012-07-23 11:38:09",
                    "update_type":"index"
                }
            },
            {
                "update":{
                    "update_status":"successful",
                    "update_id":658,
                    "update_time":"2012-07-20 15:20:26",
                    "update_type":"citations"
                }
            },
            ...
        ]
        "openDOAR_id":1767,
        "name":"Aberdeen University Research Archive",
        "base_url":"http:\/\/aura.abdn.ac.uk\/dspace-oai\/request"
    }
}

Get Repository Deposit History

This method returns the number of documents deposited in a repository per day.

Get Repositories

http://core.kmi.open.ac.uk/api/stats/get_repository_deposits

Request methods

  • GET

Parameters

Required

  • id: The CORE ID of the repository
  • api_key: API key

Optional

  • cumulative: false (default) to get number of additions per day or true to get cumulative total

Format is in all cases JSON (unfortunately we do not support xml for this method)

Returns

  • 200 OK (success response)
  • 204 No Content (No statistics for this repository)
  • 401 Unauthorized (missing API key)
  • 403 Forbidden (request limit was crossed)
  • 500 Internal Server Error (there was an error in the application)

Examples

Cumulative = false

Request

GET http://core.kmi.open.ac.uk/id=1&api_key=ks8d74h5b4uj

Response

{
"2010-03-29": 6,
"2010-07-26": 1,
"2010-08-05": 12,
"2010-08-09": 10,
"2010-08-13": 2,
"2010-09-23": 1,
"2010-09-27": 2,
"2010-09-30": 1,
"2010-11-03": 42,
"2010-11-08": 103
...
}

Cumulative = true

Request

GET http://core.kmi.open.ac.uk/api/stats/get_repositories?id=1&cumulative=1&api_key=ks8d74h5b4uj

Response

{
  {
"2010-03-29": 6,
"2010-07-26": 7,
"2010-08-05": 19,
"2010-08-09": 29,
"2010-08-13": 31,
"2010-09-23": 32,
"2010-09-27": 34,
"2010-09-30": 35,
"2010-11-03": 77,
"2010-11-08": 180
}

Following is a list of all HTTP response codes that can be returned by CORE API.

  • 200 OK (success response)
  • 204 No Content (request was correct but no content was found)
  • 400 Bad Request (request was syntactically incorrect)
  • 401 Unauthorized (API key was not found or was not valid)
  • 403 Forbidden (API request limit was crossed)
  • 404 Not Found (resource was not found)
  • 500 Internal Server Error (there was an error in the application)

To register a new API key to access the CORE API interface please send an email with the following information:

  1. Name
  2. Institution
  3. Email of responsible person

to p.knoth(at)open.ac.uk and include following text in subject: [CORE-API].

You will shortly receive new API key on the registered email.

The CORE API allows to make a number or requests per time. There is a different limit for each API method. The following table is showing the limits.

MethodLimit
Similar & Duplicate10 requests per 10 seconds
Search10 requests per 10 seconds
Stats Methods10 requests per 10 seconds
URLs10 requests per 10 seconds
Classify2 requests per 10 seconds
Download2 requests per 10 seconds