API Reference Get Component Catalogue
Get Component Catalogue
Every MDX component and prop, every frontmatter key and every icon name — the catalogue the compiler checks pages against
Returns the catalogue the compiler uses to check pages: every MDX component
with its props and allowed values, every page frontmatter key, and every icon
name. Editors and tools can use it to offer completion and catch typos without
guessing — it is the same data stx check and the hosted build validate
against.
Authentication
None. Public, with the same caching headers as
Get syntext.json Schema
(Content-Type: application/json).
Response
NameDescription
versionThe catalogue format version (
1).componentsOne entry per component.
Show 12 child attributesobject[]
nameThe tag name as written in MDX, e.g.
Card.categoryThe group it belongs to in the component docs:
callout, layout, navigation, code, api, content or other.summaryOne line, in plain words.
descriptionOne to three sentences.
props{ name, type, values?, default?, required?, description }. type is
string, number, boolean, enum (see values), expression,
icon or href.childrennone for a self-closing tag, markdown for free content, or the
component names allowed inside.parentThe component this one must sit inside, if any.
inlineTrue for a component used inside a line of prose.
snippetMinimal valid MDX to insert.
insertableWhether an insert-block picker offers it.
noteWhere rendering differs from the docs, or a limit worth knowing. Optional.
deprecatedFor a deprecated component, what to write instead. Deprecated entries are never offered in pickers. Optional.
frontmatterOne entry per page frontmatter key:
{ key, type, values?, required?, description, protocol?, note?, deprecated? }.
type is string, number, boolean, enum, string[], object, href
or icon. protocol names the protocol value an API key is read under
(rest, websocket, graphql, grpc, event); deprecated names the
replacement key.iconsEvery icon name a component's
icon prop or the icon frontmatter key accepts.Related
Was this page helpful? Yes No
Previous
Next
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request GET \
--url 'https://api.syntext.dev/v1/schema/components.json'
const response = await fetch('https://api.syntext.dev/v1/schema/components.json', {
method: 'GET',
});
const data = await response.json();
console.log(response.status, data);
import requests
url = "https://api.syntext.dev/v1/schema/components.json"
response = requests.get(url)
print(response.status_code)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.syntext.dev/v1/schema/components.json", nil)
if err != nil {
panic(err)
}
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println(res.Status)
fmt.Println(string(body))
}
require "net/http"
require "uri"
uri = URI("https://api.syntext.dev/v1/schema/components.json")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Get.new(uri)
response = http.request(request)
puts response.code
puts response.body
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.syntext.dev/v1/schema/components.json',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
echo $status, PHP_EOL, $response, PHP_EOL;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.syntext.dev/v1/schema/components.json"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
using System.Net.Http;
using System.Text;
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.syntext.dev/v1/schema/components.json");
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Responseapplication/json
200OK
{
"version": 0,
"components": [
{
"name": "string",
"category": "string",
"summary": "string",
"description": "string",
"props": [],
"children": [],
"parent": "string",
"inline": true,
"snippet": "string",
"insertable": true,
"note": "string",
"deprecated": "string"
}
],
"frontmatter": [],
"icons": []
}