How to access the data

Thank you for your interest in the data of the DZT Knowledge Graph.

To access the data, we recommend the following procedure:

  • Start with the Query API (V2) – simple and fast.
  • Use filters and pagination to avoid unnecessary data loads.
  • If needed, perform more advanced queries using the Shape Query or
    SPARQL APIs.
  • Understand typical use cases – they help guide your own scenarios.
  • Use the documentation as a reference if you have special requirements
    (e.g., Shape Query API or SPARQL).

Step 1: Access & Overview

  • Make sure you have a valid API key and know which endpoints to use.
  • There are three available data access interfaces:
  1. Simple Query API – for text-based search use cases.
  2. Advanced Shape Query API – for more complex filtering.
  3. SPARQL API – for RDF graph queries following the SPARQL 1.1
    standard.

Step 2: How to Use the Query API

Use the Query API to retrieve specific objects from the Knowledge Graph.

Important parameters:

  • kw (keyword) – searches in schema:name.
  • filterDsList or filterDs – limits results to objects that comply with a specific
    Domain Specification (“DS”).
  • page and page-size – control pagination.
  • inLang header – defines your preferred language version for multilingual
    objects.

Example request (cURL):

curl   
'https://proxy.opendatagermany.io/api/ts/v2/kg/things?kw=Wartburg&filterDsList=ht  
tps://semantify.it/list/CRkyvcqGqeUu' \  
 -H 'accept: application/json, text/plain, */*' \  
 -H 'x-api-key: <APIKEY>' \  
 -H 'page: 1' \  
 -H 'page-size: 5'  

Note: Version V1 is deprecated – use /v2 for all data access.
Result:
The initial query usually returns only basic information (@id, @type,
ds:compliesWith). For detailed data, a second query per object is required.

Step 3: Optimising Queries (see “Optimisations” section)

To avoid performance issues when working with large datasets, follow these
recommendations:

  • Reduce page size – e.g., use page-size: 5 instead of 100.
  • Limit the response depth – use the X-HOP header to control how many
    “hops” of nested objects are included.
    Example: X-HOP: 0 returns only IDs and types.
  • Apply filters – using filterDsList narrows results to relevant objects and
    improves response time.

Recommended approach:

  • Load small pages incrementally,
  • Retrieve only the objects you actually need, and
  • Avoid fetching all data by default.

Step 4: Explore Practical Use Cases

In the section “Data Access Use Cases”, you will find practical examples – e.g.
retrieving tours, points of interest (POIs) around Berlin, or iteratively loading
large objects.

Suggested workflow for a use case:

  1. Define your question (e.g. “Find all POIs in Berlin”).
  2. Choose appropriate filters (keyword, DS).
  3. Perform an initial query with small pages.
  4. Fetch detailed information for each object via ID queries.
  5. Apply optimisation techniques as needed (see Step 3).

These use cases help you understand the process and adapt it to your own
requirements.