curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"result": {
"entities": [
{
"confidence": 0.85,
"entity_name": "Product",
"field_mapping": {
"name": "title"
},
"json_ld_template": {
"@context": "https://schema.org",
"@type": "Product",
"name": "{title}"
},
"schema_type": "Product"
}
]
}
}Preview JSON-LD
Returns the Schema.org markup Base44 generates from the app’s entities, so you can see it before publishing it.
Base44 matches each entity to the Schema.org type its fields look most like, and leaves out any entity it can’t match with reasonable confidence, so an app whose entities are all app-specific returns an empty list.
Each entry’s json_ld_template marks which entity field fills each property using a placeholder. For example, {"name": "{title}"} means name comes from this entity’s title field.
There’s no mechanism that fills in a placeholder for you. To use a field, edit json_ld_template yourself before saving it with Update SEO settings, replacing {title} with an actual value, for example {"name": "Acme CRM"} instead of {"name": "{title}"}. Base44 injects whatever you save exactly as written, on every page the entry applies to. There’s no per-record substitution, so a hardcoded value shows up identically everywhere rather than varying by record.
Save the whole entry, including its json_ld_template key, as one of the objects in custom_json_ld with Update SEO settings. Saving alone isn’t enough for the markup to appear on the page. See When JSON-LD markup goes live for what else has to be true.
Save confidence as a string, or leave it out.
curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/seo/preview/json-ld")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"result": {
"entities": [
{
"confidence": 0.85,
"entity_name": "Product",
"field_mapping": {
"name": "title"
},
"json_ld_template": {
"@context": "https://schema.org",
"@type": "Product",
"name": "{title}"
},
"schema_type": "Product"
}
]
}
}Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Path Parameters
ID of the app.
Response
The generated Schema.org markup.
The preview.
The generated markup.
Show child attributes
Show child attributes
Was this page helpful?