How to request element optimisation
Element optimisation requests use AI to generate better title, meta description and H1 tag for a page, based on the search queries.
To create an element optimisation request, an Account must have AI features enabled. Additionally, your Account role must be an Editor or higher.
Requesting element optimisation and retrieving the results using API is done in 3 steps:
1. Create an element optimisation request
Use the createElementOptimisationRequest
mutation to create an element optimisation request and start the generation
process.
Input requires you to pass Crawl.id
and CrawlUrl.urlDigest
. Optionally, you can pass up to 5
CrawlSearchQuery.searchQueryDigest
values to pick the search queries you want to optimise the page for. By default,
the generation process uses the top 5 search queries ordered by clicks.
- Mutation
- Variables
- Response
mutation CreateElementOptimisationRequest($input: CreateElementOptimisationRequestInput!) {
createElementOptimisationRequest(input: $input) {
elementOptimisationRequest {
id
searchQueryDigests
status
url
urlDigest
}
}
}
{
"input": {
"crawlId": "TjAwNUNyYXdsMTg1MjEzNw",
"urlDigest": "iXQqtG5t5FIj9f7FDB4POsOXJXKiKWgI7f2baE6Y+zrSmTL4qdCqBg0KYupgTOqQTFcZPuqrsejjJgbn3UejRA=="
}
}
{
"data": {
"createElementOptimisationRequest": {
"id": "TjAyNkVsZW1lbnRPcHRpbWlzYXRpb25SZXF1ZXN0MTU3",
"searchQueryDigests": [
"PH3HwdRWPe931b4rp44NFBOCWaUoLWft/Z6ab9KVgsFAhf7D3wPT4ReuuPTs4vvSKirKF5d0jKGm6K9j7qR/QA=="
],
"status": "Created",
"url": "https://www.lumar.io/blog/industry-news/ai-search-seo-for-llms-ai-overviews/",
"urlDigest": "iXQqtG5t5FIj9f7FDB4POsOXJXKiKWgI7f2baE6Y+zrSmTL4qdCqBg0KYupgTOqQTFcZPuqrsejjJgbn3UejRA=="
}
}
}
2. Wait for the generation to finish
At first, element optimisation request status will be Created
. When the generation process starts, it will change to
Generating
. Finally, after the process finishes, the value will be Generated
. The whole process usually takes just
a couple of seconds.
3. Retrieve the element optimisation request results
Use the getElementOptimisationRequest
query to retrieve element optimisation request by id
.
- Query
- Variables
- Response
query GetElementOptimisationRequest($id: ObjectID!) {
getElementOptimisationRequest(id: $id) {
generatedAt
generatingAt
id
result {
descriptionRelevance
h1TagRelevance
optimisedDescription
optimisedDescriptionRelevance
optimisedH1Tag
optimisedH1TagRelevance
optimisedPageTitle
optimisedPageTitleRelevance
pageTitleRelevance
}
searchQueryDigests
status
url
urlDigest
}
}
{
"id": "TjAyNkVsZW1lbnRPcHRpbWlzYXRpb25SZXF1ZXN0MTU3"
}
{
"data": {
"getElementOptimisationRequest": {
"generatedAt": "2025-07-24T07:36:17.000Z",
"generatingAt": "2025-07-24T07:36:15.000Z",
"id": "TjAyNkVsZW1lbnRPcHRpbWlzYXRpb25SZXF1ZXN0MTU3",
"result": {
"descriptionRelevance": 0.25587881213577446,
"h1TagRelevance": 0.3500410134239185,
"optimisedDescription": "Discover the latest LLM SEO trends for 2025 and learn how to optimize your strategy for AI search platforms like Perplexity and ChatGPT Search.",
"optimisedDescriptionRelevance": 0.6826555846420062,
"optimisedH1Tag": "LLM SEO Trends in 2025: AI Search, GEO Strategies, and AI Insights – Sign Up for Updates",
"optimisedH1TagRelevance": 0.7562610596680486,
"optimisedPageTitle": "LLM SEO Trends 2025: AI Search and GEO Insights for AI",
"optimisedPageTitleRelevance": 0.7156167354199888,
"pageTitleRelevance": 0.3977227645924948
},
"searchQueryDigests": [
"PH3HwdRWPe931b4rp44NFBOCWaUoLWft/Z6ab9KVgsFAhf7D3wPT4ReuuPTs4vvSKirKF5d0jKGm6K9j7qR/QA=="
],
"status": "Generated",
"url": "https://www.lumar.io/blog/industry-news/ai-search-seo-for-llms-ai-overviews/",
"urlDigest": "iXQqtG5t5FIj9f7FDB4POsOXJXKiKWgI7f2baE6Y+zrSmTL4qdCqBg0KYupgTOqQTFcZPuqrsejjJgbn3UejRA=="
}
}
}
Results include relevance values calculated for the chosen search queries, suggested optimised elements, and the relevance of the optimised elements.
You can create multiple element optimisation requests for each crawl URL, using different search queries. To retrieve multiple element optimisation requests, you need to get a report stat and filter crawl URLs by the URL digest.
- Query
- Variables
- Response
query GetCrawlUrlElementOptimisationRequests(
$crawlId: ObjectID!
$reportTemplateCode: String!
$urlDigest: String!
) {
getReportStat(
input: { crawlId: $crawlId, reportTemplateCode: $reportTemplateCode }
) {
crawlUrls(filter: { urlDigest: { eq: $urlDigest } }) {
nodes {
elementOptimisationRequests {
nodes {
generatedAt
generatingAt
id
result {
descriptionRelevance
h1TagRelevance
optimisedDescription
optimisedDescriptionRelevance
optimisedH1Tag
optimisedH1TagRelevance
optimisedPageTitle
optimisedPageTitleRelevance
pageTitleRelevance
}
searchQueryDigests
status
}
}
url
urlDigest
}
}
}
}
{
"crawlId": "TjAwNUNyYXdsMTg1MjEzNw",
"reportTemplateCode": "all_pages",
"urlDigest": "iXQqtG5t5FIj9f7FDB4POsOXJXKiKWgI7f2baE6Y+zrSmTL4qdCqBg0KYupgTOqQTFcZPuqrsejjJgbn3UejRA=="
}
{
"data": {
"getReportStat": {
"crawlUrls": {
"nodes": [
{
"elementOptimisationRequests": {
"nodes": [
{
"generatedAt": "2025-07-24T07:36:17.000Z",
"generatingAt": "2025-07-24T07:36:15.000Z",
"id": "TjAyNkVsZW1lbnRPcHRpbWlzYXRpb25SZXF1ZXN0MTU3",
"result": {
"descriptionRelevance": 0.25587881213577446,
"h1TagRelevance": 0.3500410134239185,
"optimisedDescription": "Discover the latest LLM SEO trends for 2025 and learn how to optimize your strategy for AI search platforms like Perplexity and ChatGPT Search.",
"optimisedDescriptionRelevance": 0.6826555846420062,
"optimisedH1Tag": "LLM SEO Trends in 2025: AI Search, GEO Strategies, and AI Insights – Sign Up for Updates",
"optimisedH1TagRelevance": 0.7562610596680486,
"optimisedPageTitle": "LLM SEO Trends 2025: AI Search and GEO Insights for AI",
"optimisedPageTitleRelevance": 0.7156167354199888,
"pageTitleRelevance": 0.3977227645924948
},
"searchQueryDigests": [
"PH3HwdRWPe931b4rp44NFBOCWaUoLWft/Z6ab9KVgsFAhf7D3wPT4ReuuPTs4vvSKirKF5d0jKGm6K9j7qR/QA=="
],
"status": "Generated"
}
]
},
"url": "https://www.lumar.io/blog/industry-news/ai-search-seo-for-llms-ai-overviews/",
"urlDigest": "iXQqtG5t5FIj9f7FDB4POsOXJXKiKWgI7f2baE6Y+zrSmTL4qdCqBg0KYupgTOqQTFcZPuqrsejjJgbn3UejRA=="
}
]
}
}
}
}