---
title: "Auckland Museum SPARQL endpoint"
method: GET
path: "/sparql"
tags: ["sparql"]
---

# Auckland Museum SPARQL endpoint

`GET /sparql`

## Request

- Base URL: `https://api.aucklandmuseum.com`
- URL: `https://api.aucklandmuseum.com/sparql`
- Auth: none declared
- TypeScript: <https://skmtc.dev/aucklandmuseum/apis/auckland-museum-api/docs/sparql/get.ts> (a function with typed inputs; its response is checked against the schema)

You can execute your [SPARQL](http://www.w3.org/TR/rdf-sparql-query/) queries against this endpoint.

The sparql query should be provided as the value of the request parameter `query`.
Set the `Accept` header to `application/sparql-results+xml` to get results in XML. Set it to `application/sparql-results+json` to get results in JSON. 

**Note:** This endpoints supports [JSON-P](http://json-p.org/). In order to get a JSON-P response, set the query parameter `callback` to your preferred callback function name. The default function name is `callback()`. When using JSON-P, there is no need to set the `Accept` header because the response will always be in `application/javascript`.

## Query parameters

- `query` string, required
- `callback` string
- `infer` boolean

## Response `200`

success

- object

---

[API](https://skmtc.dev/aucklandmuseum/apis/auckland-museum-api.md) - [All operations](https://skmtc.dev/aucklandmuseum/apis/auckland-museum-api/llms.txt) - [OpenAPI document](https://skmtc.dev/aucklandmuseum/apis/auckland-museum-api/revisions/892a068b75e7?raw)
