---
title: "Given a query subgraph, find the most similar subgraph in the existing dataset."
method: POST
path: "/dataset/match"
tags: ["dataset"]
---

# Given a query subgraph, find the most similar subgraph in the existing dataset.

`POST /dataset/match`

Returns: The matched subgraph and a score for the match.

## Request body

- SubgraphQuery
  - `dataset` string, required — The dataset to match against
  - `match_threshold` number, double
  - `query_kg` LLMKnowledgeGraph, required — Knowledge graph info structured to deserialize and display in the same format that the LLM outputs. Also the first representation of an LLM output in the pipeline from raw tool output to being merged into a DB
    - `entities` LLMEntity[], required
      - `id` integer, required
      - `properties` object, required
      - `type` string, required
    - `relationships` LLMRelationship[]
      - `properties` object
      - `source` integer, required
      - `target` integer, required
      - `type` string, required

## Response `200`

Match correspondences

- object

---

[API](https://skmtc.dev/structifyai/apis/structify.md) · [All operations](https://skmtc.dev/structifyai/apis/structify/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/structifyai/structify/revisions/1364930b6980/schema)
