Skip to content

Using the search API ​

The search API serves GraphQL over the curated Limburg collections at:

https://search.linkedopenlimburg.nl/graphql

Open the endpoint in a browser for the playground, a GraphQL UI that documents every collection, field and filter.

Public endpoint ​

The public endpoint moves on to each new version as it is deployed, breaking changes included; each release lists its changes, with the breaking ones marked ⚠️. Its index is rebuilt every night at 02:00 (Amsterdam time), and before each upgrade, so a new version only goes live over an index built for its schema. To stay on one release, run the stack yourself and pin it.

Send a query ​

From code, POST the query as JSON:

sh
curl https://search.linkedopenlimburg.nl/graphql \
  -H 'Content-Type: application/json' \
  -d '{"query": "{ creativeWorks(query: \"Maastricht\", perPage: 1) { items { name { value } } } }"}'

GET <endpoint>?sdl returns the schema as SDL, the same contract that is committed as schema.graphql.

A first query ​

graphql
{
  creativeWorks(query: "Maastricht", perPage: 10) {
    items {
      name {
        value
      }
      dataset {
        id
        name {
          value
        }
      }
      associatedMedia {
        thumbnailUrl
        contentUrl
        license
      }
    }
  }
}
Run query

A reference such as dataset serves the referenced collection’s own fields, and every collection serves its display field as name, so dataset { name { value } } reads the same as a creator or a material reference.

Collections ​

Eight collections are served: creativeWorks, persons, organizations, places, terms, occupations, datasets and publishers. Every one takes the same five arguments – query, where, orderBy, page, perPage – and returns items, pagination and facets.

perPage runs from 0 to 100; page through page for more. Asking for more than 100 currently fails with a bare “Unexpected error.” rather than saying what is wrong, so check this first if a query stops working when you raise the page size (ldelements/lde#730).

Next ​

Each example on these pages has a “Run query” button that opens it in the playground.

  • Filter and facet – facets for a filter UI, combining filters, reusable works.
  • Reading results – dates, images, makers, dimensions, identifiers and datasets.
  • One identity across datasets – how terms, places, persons and organizations shared between datasets are merged, and where their descriptions come from.
  • Introspecting the schema – what a collection can filter, sort and facet on, and what refers to an object.