DBpedia Live 2.0

DBpedia Live 2.0 is currently in development. We are looking for early adopters willing to beta test and evaluate the service. If this sparks your interest please get in touch with us.

0

Wikipedia articles have changed while you are reading this page.

Keep your data relevant in an ever changing world. DBpedia Live 2.0 extracts the most recent data from around 300.000 updated Wikipedia articles each day. This data is made available with our flexible API, where it can be retrieved and used in a variety of ways.


UP-TO-DATE

Keep up with a continuously changing world by accessing the most recent information available in Wikipedia. We make data accessible within seconds of its publication.

DBPEDIA-BASED

Build upon the well-known DBpedia datasets and enrich them with the latest data. Profit from the huge collection of knowledge available in our Knowledge Graphs that are consistently improved by the DBpedia community.

REST-API

Utilize our flexible API that facilitates a multitude of use cases. Keeping track of current events to visualizing highly dynamic data, use our API how it fits you best.


API Reference

DBpedia Live 2.0 offers an API to access and retrieve up to date linked data extracted from Wikipedia articles using the DBpedia Extraction Framework. This information is made accessible by two endpoints. The /changes endpoint provides the meta information on updated articles in form of change events. The /articles endpoint returns the most recent data for specific articles. In order to make various use cases possible, the information can be returned in different data-types, like JSON or n-triples.

List Changes

This endpoint serves a list of change events to DBpedia resources that happened in a specified time frame. Each change event represents the point in time a DBpedia resource was last edited. The event includes the resource’s URI, the timestamp of occurrence, the revision ID as well as the language of the Wikipedia article it stems from.

The list of events will never exceed the length of 10.000 items even though more events occurred in the specified time frame.

MethodPathContent-Type
GET/changesapplication/json, application/tab-separated-values

Parameters

  • languages(string: "") – Comma-separated list of language codes for which change events are returned.
    Omit the parameter to retrieve changes for all available languages.
  • page-size – (integer: 10.000) – Limits the number of returned change events. The value must not be above 10.000. Omit the parameter or set to 0 to retrieve the maximum number of items (10.000).
  • simple(boolean: false) – If set to true, change events are returned only by their resource name. This will also produce a valid payload for the /articles endpoint.
  • since(string: "") – The point in time from which change events are returned. Formatted as an ISO 8601 datetime or UNIX timestamp. If this parameter is omitted since is set to now-1h. Example: 2021-01-24T00:00:00Z or 1611446400.
  • until(string: "") – The point in time until change events are returned. Formatted as an ISO 8601 datetime or UNIX timestamp. If this parameter is omitted until is set to now. Example: 2021-01-24T10:00:00Z or 1611482400.
  • continue – (string: "") – Exclusively used for pagination of results. Use the links provided in the JSON response or Link header instead of setting this parameter manually.

For consistency reasons the Accept header to specify the data format is mandatory. Possible values are Accept: application/json and Accept: application/tab-separated-values.

Sample Requests

Retrieve change events of English resources that occurred in the last hour.

curl "http://dev.live.dbpedia.org/api/sync/changes" -H "Accept: application/json"

Retrieve change events of German and English resources that occurred in the specified time frame.

curl "http://dev.live.dbpedia.org/api/sync/changes?languages=en,de&since=1611446400&until=1611482400" -H "Accept: application/json"

Retrieve change events of English resources that occurred in the last hour as a simple list of strings.

curl "http://dev.live.dbpedia.org/api/sync/changes?simple=true" -H "accept: text/tab-separated-values"

Sample Responses

List of change events in JSON format including pagination data.

{
  "pagination": {
    "continuation-token": "1611446404_3763487",
    "page-size": 2,
    "next": "http://dev.live.dbpedia.org/api/sync/changes?page-size=2&until=1611482400&continue=1611446404_3763487"
  },
  "change-events": [
    {
      "resource-name": "http://dbpedia.org/resource/Yacine_Diop",
      "revisionid": 1002341987,
      "language": "en",
      "modification-timestamp": 1611446401
    },
    {
      "resource-name": "http://dbpedia.org/resource/Hartford_Union_Station",
      "revisionid": 1002341997,
      "language": "en",
      "modification-timestamp": 1611446404
    }
  ]
}

List of change events in TSV (tab-separated-values) format.

http://dbpedia.org/resource/Yacine_Diop    1002341987  en  1611446401
http://dbpedia.org/resource/Hartford_Union_Station    1002341997  en  1611446404

Simple list of change events in JSON format.

[
  "http://dbpedia.org/resource/Yacine_Diop",
  "http://dbpedia.org/resource/Hartford_Union_Station"
]

Simple list of change events in TSV format.

http://dbpedia.org/resource/Yacine_Diop
http://dbpedia.org/resource/Hartford_Union_Station

Pagination

Note, that setting the simple parameter to true will disable pagination.

Not all change events can be returned at once. The page size defaults to 10.000 items but can be adjusted via the page-size parameter, which can’t be greater than 10.000.

To request the next page of results the API provides a next-link in the response or the Link header. This link already has all parameters set according to your initial query, so you can easily iterate through all pages.

The Link header includes the aforementioned next-link and looks like this:

Link: <http://dev.live.dbpedia.org/api/sync/changes?page-size=5&until=1611482400&continue=1611446411_3763487>; rel="next"

If you request the change events in JSON format specifying Accept: application/json the pagination data is also provided in the JSON object like this:

{
  "pagination": {
    "continuation-token": "1611446404_3763487",
    "page-size": 2,
    "next": "http://dev.live.dbpedia.org/api/sync/changes?page-size=2&until=1611482400&continue=1611446404_3763487"
  },
  "change-events": [
    {
      "resource-name": "http://dbpedia.org/resource/Yacine_Diop",
      "revisionid": 1002341987,
      "language": "en",
      "modification-timestamp": 1611446401
    },
    {
      "resource-name": "http://dbpedia.org/resource/Hartford_Union_Station",
      "revisionid": 1002341997,
      "language": "en",
      "modification-timestamp": 1611446404
    }
  ]
}

Error Responses

If a request is invalid a proper description of the error is usually provided in the response.
Either in JSON format or in plain text depending on the Accept header.

CodeErrorHint
400Bad RequestInvalid parameter values. Reason is provided in response body.
406Media Type not AcceptableThe Accept header is set incorrectly. Possible values are Accept: application/json and Accept: application/tab-separated-values.

Retrieve Data

The /articles endpoint is used to extract the most recent data for the specified DBpedia resources. It accepts a list of DBpedia resource names for which it returns the related data. Each returned object is an up to date DBpedia resource represented as an RDF triple.

The list of resource names needs to be provided in the body of a POST request.

MethodPathaccepting Content-Typeproducing Content-Type
POST/articlesapplication/json, text/plainapplication/json, application/n-triples, application/n-quads

Parameters

  • articles(string: "") – The list of DBpedia resource names for which data is returned. The expected format of the list depends on the specifed Content-Type header. See sample payloads.

For consistency reasons the Accept and the Content-Type headers to specify the data formats are mandatory. Possible values are Accept: application/json, Accept: application/n-triples and Accept: application/n-quads in conjunction with Content-Type: application/json or Content-Type: text/plain.

Sample Payloads

JSON payload used with Content-Type: application/json.

[
  "http://dbpedia.org/resource/Yacine_Diop",
  "http://dbpedia.org/resource/Hartford_Union_Station"
]

Plain text payload used with Content-Type: text/plain.

http://dbpedia.org/resource/Yacine_Diop
http://dbpedia.org/resource/Hartford_Union_Station

Sample Requests

Create a payload file in a valid format containing the list of desired DBpedia resource names to use in the following requests.

Using a JSON payload.

curl -X POST "http://dev.live.dbpedia.org/api/sync/articles" -H "Accept: application/json" -H "Content-Type: application/json" -d @payload.json 

Using a plain text payload.

curl -X POST "http://dev.live.dbpedia.org/api/sync/articles" -H "Accept: application/json" -H "Content-Type: text/plain" --data-binary @payload.txt 

Sample Responses

DBpedia resource in JSON Format

[
  {
    "resource-name": "http://dbpedia.org/resource/Yacine_Diop",
    "n-triples": "<data in RDF format>"
  },
  {
    "resource-name": "http://dbpedia.org/resource/Hartford_Union_Station",
    "n-triples": "<data in RDF format>"
  }
]

DBpedia resource in n-triples Format

<http://dbpedia.org/resource/Yacine_Diop> <http://www.w3.org/2000/01/rdf-schema#label> "Yacine Diop"@en .
<http://dbpedia.org/resource/Yacine_Diop> <http://dbpedia.org/ontology/wikiPageID> "59489792"^^<http://www.w3.org/2001/XMLSchema#integer> .
...
<http://dbpedia.org/resource/Hartford_Union_Station> <http://www.w3.org/2000/01/rdf-schema#label> "Hartford Union Station"@en .
<http://dbpedia.org/resource/Hartford_Union_Station> <http://dbpedia.org/ontology/wikiPageID> "8449501"^^<http://www.w3.org/2001/XMLSchema#integer> .
... 

DBpedia resources in n-quads format. The DBpedia resource name is represented in the graph label of each RDF triple.

<http://dbpedia.org/resource/Yacine_Diop> <http://www.w3.org/2000/01/rdf-schema#label> "Yacine Diop"@en <http://dbpedia.org/resource/Yacine_Diop> .
<http://dbpedia.org/resource/Yacine_Diop> <http://dbpedia.org/ontology/wikiPageID> "59489792"^^<http://www.w3.org/2001/XMLSchema#integer> <http://dbpedia.org/resource/Yacine_Diop> .
...
<http://dbpedia.org/resource/Hartford_Union_Station> <http://www.w3.org/2000/01/rdf-schema#label> "Hartford Union Station"@en <http://dbpedia.org/resource/Hartford_Union_Station> .
<http://dbpedia.org/resource/Hartford_Union_Station> <http://dbpedia.org/ontology/wikiPageID> "8449501"^^<http://www.w3.org/2001/XMLSchema#integer> <http://dbpedia.org/resource/Hartford_Union_Station> .
... 

Error Responses

If a request is invalid a proper description of the error is usually provided in the response.
Either in JSON format or in plain text depending on the Accept header.

CodeErrorHint
400Bad RequestInvalid request body. Reason is provided in response body.
404Not FoundCould not find data for the requested resource names.
406Media Type not AcceptableThe Accept header is set incorrectly. Possible values are Accept: application/json, Accept: application/n-triples and Accept: application/n-quads.
415Media Type not SupportedThe Content-Type header is set incorrectly. Possible values are Content-Type: application/json and Content-Type: text/plain.

Contact us