{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usenotra-com/json-schema/usenotra-com-geo-content-gaps-response-schema.json",
  "title": "GeoContentGapsResponse",
  "description": "The project's content gaps from scan answers, Search Console and AI web searches, and the workspace they belong to.",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usenotra-com-openapi.json#/components/schemas/GeoContentGapsResponse",
  "type": "object",
  "properties": {
    "promptGaps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Tracked prompt id, or the scan prompt id for prompts that are not tracked. Use as promptId with updateGeoContentGap, or as sourceId with sourceKind gap when planning a brief."
          },
          "prompt": {
            "type": "string",
            "description": "Prompt text the engines answered."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Suggested headline for an article that could win this prompt, or `null`."
          },
          "engines": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Engines whose latest answer from the last 30 days did not mention the brand."
          },
          "mentionedEngines": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Engines whose latest answer from the last 30 days mentioned the brand."
          },
          "competitors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tracked competitors named in answers that left out the brand, or whose website an engine searched directly for them."
          },
          "discoveredCompetitors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Other brands named in answers that left out the brand and are not tracked as competitors."
          },
          "searchQueries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Web searches AI engines ran while answering this prompt. Searches restricted to one website with `site:` are left out and reported in `siteSearches`."
          },
          "siteSearches": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Other websites AI engines searched directly with a `site:` search in answers that left out the brand."
          },
          "ownSiteSearched": {
            "type": "boolean",
            "description": "True when an engine searched the brand's own website with a `site:` search and still left the brand out of its answer."
          },
          "ownMentionRate": {
            "type": "number",
            "description": "Share of checked engines that mentioned the brand, from 0 to 1."
          },
          "engineCoverage": {
            "type": "number",
            "description": "Number of engines with an answer for this prompt."
          },
          "opportunity": {
            "type": "number",
            "description": "Relative priority: grows with missing mentions, engines checked and competitors named. Gaps are sorted by it, highest first; 0 when won."
          },
          "won": {
            "type": "boolean",
            "description": "True when most engines now mention the brand; the gap stays listed because a brief was planned for it."
          },
          "brief": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "briefId": {
                "type": "string",
                "description": "Use with getGeoContentBrief and approveGeoContentBrief."
              },
              "status": {
                "type": "string",
                "enum": [
                  "draft",
                  "approved",
                  "writing",
                  "completed",
                  "failed"
                ],
                "description": "`draft` until approved, `approved` or `writing` while the writer drafts the post, `completed` once the draft post is written, `failed` when the last writer run failed."
              },
              "postId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Draft post created for the brief. Null when none is linked."
              },
              "workingTitle": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Planned article title, or `null` when the brief has none."
              },
              "publishedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO timestamp of when the brief's post was published. Null until then."
              },
              "baseline": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "mentionedEngines": {
                    "type": "number",
                    "description": "Engines that mentioned the brand when the brief was planned."
                  },
                  "totalEngines": {
                    "type": "number",
                    "description": "Engines checked when the brief was planned."
                  }
                },
                "required": [
                  "mentionedEngines",
                  "totalEngines"
                ],
                "description": "Engine coverage captured when the brief was planned, to compare against after publishing. Only set for briefs planned from a prompt gap or prompt with scan results from the last 30 days; null otherwise."
              },
              "rescanned": {
                "type": "boolean",
                "description": "True once a rescan of the source prompt was started after the post was published."
              }
            },
            "required": [
              "briefId",
              "status",
              "postId",
              "workingTitle",
              "publishedAt",
              "baseline",
              "rescanned"
            ],
            "description": "The most recently updated brief planned from this gap. Null when none exists."
          },
          "claim": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "agent": {
                "type": "string",
                "description": "Name of the agent writing the article."
              },
              "expiresAt": {
                "type": "string",
                "description": "ISO timestamp when the claim lapses unless renewed."
              }
            },
            "required": [
              "agent",
              "expiresAt"
            ],
            "description": "Set while an agent holds a claim on it with claimGeoContent. Notra's writer and Autopilot leave it alone until the claim is released or expires. Null when unclaimed."
          },
          "recommendation": {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "create",
                  "update",
                  "merge",
                  "ignore"
                ],
                "description": "What to do with this query cluster: create a new page, update the page Google already ranks or the strongest existing page, merge overlapping pages, or ignore thin demand."
              },
              "reason": {
                "type": "string",
                "description": "Plain-language explanation of the recommended action."
              },
              "targets": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "page",
                        "post"
                      ],
                      "description": "page: a page from the brand's sitemap; post: a Notra post."
                    },
                    "id": {
                      "type": "string",
                      "description": "Sitemap page id or post id. For a Google-ranked page Notra has not crawled, the page URL."
                    },
                    "url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the page or post, or `null` when the post has no public URL."
                    },
                    "title": {
                      "type": "string",
                      "description": "Title of the page or post."
                    },
                    "score": {
                      "type": "number",
                      "description": "How much of the gap's terms this page already covers, from 0 to 1."
                    },
                    "googlePosition": {
                      "type": "number",
                      "description": "Google position of the gap's queries on this page, when Search Console shows it already ranks there."
                    }
                  },
                  "required": [
                    "kind",
                    "id",
                    "url",
                    "title",
                    "score"
                  ]
                },
                "description": "Existing pages to update or merge, best match first. For create, the closest existing page when there is one; empty for ignore."
              }
            },
            "required": [
              "action",
              "reason",
              "targets"
            ],
            "description": "Whether to create a page or work on existing ones, from how well the brand's sitemap pages and posts already cover the prompt and its web searches. Never ignore, since prompt gaps carry no Search Console demand. Missing on snapshots built before it was added."
          }
        },
        "required": [
          "id",
          "prompt",
          "title",
          "engines",
          "mentionedEngines",
          "competitors",
          "discoveredCompetitors",
          "searchQueries",
          "ownMentionRate",
          "engineCoverage",
          "opportunity",
          "won",
          "brief"
        ]
      },
      "description": "Prompts where at least half of the engines answering in the last 30 days left out the brand, plus won gaps that have a brief, highest opportunity first. Ignored gaps are excluded."
    },
    "searchGaps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Search Console prompt suggestion id. Use as sourceId with sourceKind search_console when planning a brief."
          },
          "prompt": {
            "type": "string",
            "description": "Suggested prompt."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Suggested headline for an article that could win this prompt, or `null`."
          },
          "impressions": {
            "type": [
              "number",
              "null"
            ],
            "description": "Google impressions summed across the queries. Null when no query data is stored."
          },
          "clicks": {
            "type": [
              "number",
              "null"
            ],
            "description": "Google clicks summed across the queries. Null when no query data is stored."
          },
          "position": {
            "type": [
              "number",
              "null"
            ],
            "description": "Impression-weighted average Google position across the queries, rounded to one decimal. Null when no query data is stored."
          },
          "queries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "query": {
                  "type": "string",
                  "description": "Google search query from Search Console."
                },
                "clicks": {
                  "type": "number",
                  "description": "Google clicks for this query."
                },
                "impressions": {
                  "type": "number",
                  "description": "Google impressions for this query."
                },
                "position": {
                  "type": "number",
                  "description": "Average Google position for this query."
                },
                "page": {
                  "type": "string",
                  "description": "Page Google showed most for this query."
                },
                "pagePosition": {
                  "type": "number",
                  "description": "Google position of that page for this query."
                },
                "pageImpressions": {
                  "type": "number",
                  "description": "Impressions of that page for this query."
                }
              },
              "required": [
                "query",
                "clicks",
                "impressions",
                "position"
              ]
            },
            "description": "Search Console queries the suggestion was derived from."
          },
          "brief": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "briefId": {
                "type": "string",
                "description": "Use with getGeoContentBrief and approveGeoContentBrief."
              },
              "status": {
                "type": "string",
                "enum": [
                  "draft",
                  "approved",
                  "writing",
                  "completed",
                  "failed"
                ],
                "description": "`draft` until approved, `approved` or `writing` while the writer drafts the post, `completed` once the draft post is written, `failed` when the last writer run failed."
              },
              "postId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Draft post created for the brief. Null when none is linked."
              },
              "workingTitle": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Planned article title, or `null` when the brief has none."
              },
              "publishedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO timestamp of when the brief's post was published. Null until then."
              },
              "baseline": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "mentionedEngines": {
                    "type": "number",
                    "description": "Engines that mentioned the brand when the brief was planned."
                  },
                  "totalEngines": {
                    "type": "number",
                    "description": "Engines checked when the brief was planned."
                  }
                },
                "required": [
                  "mentionedEngines",
                  "totalEngines"
                ],
                "description": "Engine coverage captured when the brief was planned, to compare against after publishing. Only set for briefs planned from a prompt gap or prompt with scan results from the last 30 days; null otherwise."
              },
              "rescanned": {
                "type": "boolean",
                "description": "True once a rescan of the source prompt was started after the post was published."
              }
            },
            "required": [
              "briefId",
              "status",
              "postId",
              "workingTitle",
              "publishedAt",
              "baseline",
              "rescanned"
            ],
            "description": "The most recently updated brief planned from this gap. Null when none exists."
          },
          "claim": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "agent": {
                "type": "string",
                "description": "Name of the agent writing the article."
              },
              "expiresAt": {
                "type": "string",
                "description": "ISO timestamp when the claim lapses unless renewed."
              }
            },
            "required": [
              "agent",
              "expiresAt"
            ],
            "description": "Set while an agent holds a claim on it with claimGeoContent. Notra's writer and Autopilot leave it alone until the claim is released or expires. Null when unclaimed."
          },
          "recommendation": {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "create",
                  "update",
                  "merge",
                  "ignore"
                ],
                "description": "What to do with this query cluster: create a new page, update the page Google already ranks or the strongest existing page, merge overlapping pages, or ignore thin demand."
              },
              "reason": {
                "type": "string",
                "description": "Plain-language explanation of the recommended action."
              },
              "targets": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "page",
                        "post"
                      ],
                      "description": "page: a page from the brand's sitemap; post: a Notra post."
                    },
                    "id": {
                      "type": "string",
                      "description": "Sitemap page id or post id. For a Google-ranked page Notra has not crawled, the page URL."
                    },
                    "url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the page or post, or `null` when the post has no public URL."
                    },
                    "title": {
                      "type": "string",
                      "description": "Title of the page or post."
                    },
                    "score": {
                      "type": "number",
                      "description": "How much of the gap's terms this page already covers, from 0 to 1."
                    },
                    "googlePosition": {
                      "type": "number",
                      "description": "Google position of the gap's queries on this page, when Search Console shows it already ranks there."
                    }
                  },
                  "required": [
                    "kind",
                    "id",
                    "url",
                    "title",
                    "score"
                  ]
                },
                "description": "Existing pages to update or merge, best match first. For create, the closest existing page when there is one; empty for ignore."
              }
            },
            "required": [
              "action",
              "reason",
              "targets"
            ],
            "description": "Whether to create a page or work on existing ones, from how well the brand's sitemap pages and posts already cover the gap."
          }
        },
        "required": [
          "id",
          "prompt",
          "title",
          "impressions",
          "clicks",
          "position",
          "queries",
          "brief",
          "recommendation"
        ]
      },
      "description": "Pending prompt suggestions from Google Search Console queries. Clicks, impressions and positions are from the Search Console data covering 31 to 3 days before the suggestion was generated, and are not refreshed later."
    },
    "aiSearchGaps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Use as sourceId with sourceKind ai_search when planning a brief."
          },
          "query": {
            "type": "string",
            "description": "Most common wording of the web search."
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Other wordings of the same search."
          },
          "prompts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Prompt texts whose answers ran this search."
          },
          "engines": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Engines that ran this search without mentioning the brand or citing its site."
          },
          "searches": {
            "type": "number",
            "description": "Scan answers in which an engine ran this web search without mentioning the brand or citing its site."
          },
          "ownMentionRate": {
            "type": "number",
            "description": "Share of answers that ran this search and still mentioned the brand or cited its site, from 0 to 1."
          },
          "competitors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tracked competitors named in the answers that missed the brand."
          },
          "discoveredCompetitors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Other brands named in the answers that missed the brand and are not tracked as competitors."
          },
          "opportunity": {
            "type": "number",
            "description": "Relative priority: grows with missing mentions, searches and competitors named. Sorted highest first."
          },
          "brief": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "briefId": {
                "type": "string",
                "description": "Use with getGeoContentBrief and approveGeoContentBrief."
              },
              "status": {
                "type": "string",
                "enum": [
                  "draft",
                  "approved",
                  "writing",
                  "completed",
                  "failed"
                ],
                "description": "`draft` until approved, `approved` or `writing` while the writer drafts the post, `completed` once the draft post is written, `failed` when the last writer run failed."
              },
              "postId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Draft post created for the brief. Null when none is linked."
              },
              "workingTitle": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Planned article title, or `null` when the brief has none."
              },
              "publishedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO timestamp of when the brief's post was published. Null until then."
              },
              "baseline": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "mentionedEngines": {
                    "type": "number",
                    "description": "Engines that mentioned the brand when the brief was planned."
                  },
                  "totalEngines": {
                    "type": "number",
                    "description": "Engines checked when the brief was planned."
                  }
                },
                "required": [
                  "mentionedEngines",
                  "totalEngines"
                ],
                "description": "Engine coverage captured when the brief was planned, to compare against after publishing. Only set for briefs planned from a prompt gap or prompt with scan results from the last 30 days; null otherwise."
              },
              "rescanned": {
                "type": "boolean",
                "description": "True once a rescan of the source prompt was started after the post was published."
              }
            },
            "required": [
              "briefId",
              "status",
              "postId",
              "workingTitle",
              "publishedAt",
              "baseline",
              "rescanned"
            ],
            "description": "The most recently updated brief planned from this gap. Null when none exists."
          },
          "claim": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "agent": {
                "type": "string",
                "description": "Name of the agent writing the article."
              },
              "expiresAt": {
                "type": "string",
                "description": "ISO timestamp when the claim lapses unless renewed."
              }
            },
            "required": [
              "agent",
              "expiresAt"
            ],
            "description": "Set while an agent holds a claim on it with claimGeoContent. Notra's writer and Autopilot leave it alone until the claim is released or expires. Null when unclaimed."
          }
        },
        "required": [
          "id",
          "query",
          "variants",
          "prompts",
          "engines",
          "searches",
          "ownMentionRate",
          "competitors",
          "discoveredCompetitors",
          "opportunity",
          "brief"
        ]
      },
      "description": "Web searches AI engines ran in scan answers without mentioning the brand or citing its site."
    },
    "hasScanData": {
      "type": "boolean",
      "description": "False until the project has at least one scan result."
    },
    "snapshotReady": {
      "type": "boolean",
      "description": "False while the project's content gaps snapshot is being prepared."
    },
    "organization": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Workspace ID. Account API keys can send it, or the slug, as X-Notra-Organization-Id."
        },
        "slug": {
          "type": "string",
          "description": "URL-safe workspace handle, unique across Notra."
        },
        "name": {
          "type": "string",
          "description": "Workspace display name."
        },
        "logo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Workspace logo image URL. Null when none is set."
        }
      },
      "required": [
        "id",
        "slug",
        "name",
        "logo"
      ],
      "description": "Workspace the request ran in."
    }
  },
  "required": [
    "promptGaps",
    "searchGaps",
    "aiSearchGaps",
    "hasScanData",
    "snapshotReady",
    "organization"
  ]
}