{
  "openapi": "3.1.0",
  "info": {
    "title": "iPand API",
    "version": "1.0.0",
    "description": "Read-only access to your iPand data: brands, visibility in AI answers (overall and day by day), market share of voice, prompts and their answers, cited sources, perception, recommendations, tasks, technical audit and, when the brand shares them, its Google data (AI traffic, Search Console).\n\n**Authentication.** Create a key in iPand (Settings \u203A API, organization administrators). Send it in every request: \u0060Authorization: Bearer ipk_live_\u2026\u0060. A key belongs to the organization, reads all its brands or the ones chosen at creation, and can expire. Keep it secret, on your server: the API is meant for server-to-server calls (no CORS, no cookie).\n\n**Limits.** 60 requests per minute and per key (headers \u0060X-RateLimit-Limit\u0060, \u0060X-RateLimit-Remaining\u0060, \u0060X-RateLimit-Reset\u0060, and \u0060429 rate_limited\u0060 with \u0060Retry-After\u0060 beyond). Each request on a brand counts in the monthly quota of its subscription, shared with the MCP connector (\u0022API and MCP requests\u0022, shared between the brands of an Agency plan). \u0060GET /brands\u0060 is free. Quota reached: \u0060429 quota_exceeded\u0060 with \u0060resetsAt\u0060.\n\n**Conventions.** JSON, UTF-8. Percentages from 0 to 100, at most one decimal. \u0060null\u0060 means not measured, \u00600\u0060 means measured and zero. Days are business days (\u0060YYYY-MM-DD\u0060, Europe/Paris), timestamps are UTC (ISO 8601). Periods: \u0060from\u0060 and \u0060to\u0060, the last 30 days by default, at most 90 days per request. Lists: \u0060{ \u0022data\u0022: [...], \u0022nextCursor\u0022: \u0022...\u0022 }\u0060. Pass \u0060nextCursor\u0060 as \u0060cursor\u0060, with the same \u0060limit\u0060 (50 by default, at most 200). Each market and each prompt carries \u0060location { country, city }\u0060. \u0060city\u0060 is \u0060{ id, name, country }\u0060 for a prompt that targets a city (or under the \u0060city\u0060 filter), and \u0060null\u0060 for a whole market or a prompt without a city. Pass a city id as \u0060city\u0060 on the routes that take \u0060market\u0060 to read only the prompts of that city. Errors: \u0060{ \u0022error\u0022: { \u0022code\u0022, \u0022message\u0022 } }\u0060 with 400, 401, 403, 404, 429 or 503. A brand outside the key\u0027s scope answers 404.\n\n**Versioning.** \u0060/v1\u0060 is stable: fields and routes may be added, nothing changes meaning or disappears before \u0060/v2\u0060.",
    "contact": {
      "name": "iPand",
      "url": "https://ipand.io"
    }
  },
  "servers": [
    {
      "url": "https://api.ipand.io/v1"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Brands"
    },
    {
      "name": "Visibility"
    },
    {
      "name": "Market"
    },
    {
      "name": "Prompts"
    },
    {
      "name": "Sources"
    },
    {
      "name": "Perception"
    },
    {
      "name": "Recommendations and tasks"
    },
    {
      "name": "Technical"
    },
    {
      "name": "AI traffic (Google)"
    }
  ],
  "paths": {
    "/brands": {
      "get": {
        "operationId": "listBrands",
        "tags": [
          "Brands"
        ],
        "summary": "List brands",
        "description": "Brands of the key\u0027s organization that the key can read: id, name, domain, status, markets (with the engines not available in their country) and tracked AI engines. Free: not counted in the monthly quota.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "domain": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "suspended"
                            ]
                          },
                          "markets": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "language": {
                                  "type": "string"
                                },
                                "primary": {
                                  "type": "boolean"
                                },
                                "unavailableEngines": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "location": {
                                  "$ref": "#/components/schemas/Location"
                                }
                              },
                              "required": [
                                "code",
                                "language",
                                "primary",
                                "unavailableEngines",
                                "location"
                              ]
                            }
                          },
                          "engines": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "domain",
                          "status",
                          "markets",
                          "engines"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass it as cursor to read the next page, null on the last page."
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/visibility": {
      "get": {
        "operationId": "getVisibility",
        "tags": [
          "Visibility"
        ],
        "summary": "Visibility summary",
        "description": "Visibility of the brand in AI answers over the period: overall and by engine, change against the previous period, top brands, products, sites and pages, average optimization score. Same data as the MCP tool get_visibility. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First day (YYYY-MM-DD, Europe/Paris), with to. Default: the last 30 days. At most 90 days per request.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last day, included (YYYY-MM-DD), with from.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "engine",
            "in": "query",
            "required": false,
            "description": "AI engine code (see engines of GET /brands), or several separated by commas. Default: all tracked engines.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "description": "Market country code (see markets of GET /brands). Default: the primary market.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "City id (location.city.id of a prompt): only the prompts of this city. Default: all the prompts of the market.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "$ref": "#/components/schemas/Scope"
                    },
                    "visibility": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Percentage from 0 to 100, null when not measured.",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "cited": {
                          "type": "boolean"
                        },
                        "delta": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "previousPeriod": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "from": {
                              "type": "string",
                              "format": "date"
                            },
                            "to": {
                              "type": "string",
                              "format": "date"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "cited",
                        "delta",
                        "previousPeriod"
                      ]
                    },
                    "byEngine": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "engine": {
                            "type": "string"
                          },
                          "value": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percentage from 0 to 100, null when not measured.",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "cited": {
                            "type": "boolean"
                          },
                          "band": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "responses": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "engine",
                          "value",
                          "cited",
                          "band",
                          "responses"
                        ]
                      }
                    },
                    "collectedDays": {
                      "type": "integer"
                    },
                    "topBrands": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "type": "integer"
                          },
                          "tied": {
                            "type": "boolean"
                          },
                          "name": {
                            "type": "string"
                          },
                          "relation": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "shareOfVoice": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percentage from 0 to 100, null when not measured.",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "visibility": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percentage from 0 to 100, null when not measured.",
                            "minimum": 0,
                            "maximum": 100
                          }
                        },
                        "required": [
                          "rank",
                          "tied",
                          "name",
                          "relation",
                          "shareOfVoice",
                          "visibility"
                        ]
                      }
                    },
                    "topProducts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "type": "integer"
                          },
                          "tied": {
                            "type": "boolean"
                          },
                          "name": {
                            "type": "string"
                          },
                          "relation": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "shareOfVoice": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percentage from 0 to 100, null when not measured.",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "visibility": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percentage from 0 to 100, null when not measured.",
                            "minimum": 0,
                            "maximum": 100
                          }
                        },
                        "required": [
                          "rank",
                          "tied",
                          "name",
                          "relation",
                          "shareOfVoice",
                          "visibility"
                        ]
                      }
                    },
                    "topSites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "type": "integer"
                          },
                          "domain": {
                            "type": "string"
                          },
                          "isMine": {
                            "type": "boolean"
                          },
                          "citationShare": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percentage from 0 to 100, null when not measured.",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "citations": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "rank",
                          "domain",
                          "isMine",
                          "citationShare",
                          "citations"
                        ]
                      }
                    },
                    "topPages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "type": "integer"
                          },
                          "url": {
                            "type": "string"
                          },
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "citations": {
                            "type": "integer"
                          },
                          "engines": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "rank",
                          "url",
                          "title",
                          "citations",
                          "engines"
                        ]
                      }
                    },
                    "optimization": {
                      "type": "object",
                      "properties": {
                        "score": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "band": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "pages": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "delta": {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "score",
                        "band",
                        "pages",
                        "delta"
                      ]
                    }
                  },
                  "required": [
                    "scope",
                    "visibility",
                    "byEngine",
                    "collectedDays",
                    "topBrands",
                    "topProducts",
                    "topSites",
                    "topPages",
                    "optimization"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/visibility/daily": {
      "get": {
        "operationId": "getVisibilityDaily",
        "tags": [
          "Visibility"
        ],
        "summary": "Daily visibility",
        "description": "One row per day, engine and market: visibility (share of answers that mention the brand), mentions, answers and average position of the brand. A day without collection has responses 0 and null values (not measured). Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First day (YYYY-MM-DD, Europe/Paris), with to. Default: the last 30 days. At most 90 days per request.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last day, included (YYYY-MM-DD), with from.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "engine",
            "in": "query",
            "required": false,
            "description": "AI engine code (see engines of GET /brands), or several separated by commas. Default: all tracked engines.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "description": "Market country code. Default: all markets.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "City id (location.city.id of a prompt): only the prompts of this city. Default: all the prompts of the market.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page (default 50, at most 200).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor of the previous page, with the same limit.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "description": "Business day (Europe/Paris).",
                            "format": "date"
                          },
                          "engine": {
                            "type": "string"
                          },
                          "market": {
                            "type": "string"
                          },
                          "location": {
                            "$ref": "#/components/schemas/Location"
                          },
                          "visibility": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Share of the day\u0027s answers that mention the brand, null without answers.",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "mentions": {
                            "type": "integer",
                            "description": "Answers that mention the brand."
                          },
                          "responses": {
                            "type": "integer",
                            "description": "Answers collected and analyzed."
                          },
                          "averagePosition": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Average rank of the brand among the brands an answer cites, where it is ranked, null when never ranked."
                          }
                        },
                        "required": [
                          "date",
                          "engine",
                          "market",
                          "location",
                          "visibility",
                          "mentions",
                          "responses",
                          "averagePosition"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass it as cursor to read the next page, null on the last page."
                    },
                    "total": {
                      "type": "integer",
                      "description": "Rows of the whole series."
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string",
                          "format": "date"
                        },
                        "to": {
                          "type": "string",
                          "format": "date"
                        },
                        "engines": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "markets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "location": {
                                "$ref": "#/components/schemas/Location"
                              }
                            },
                            "required": [
                              "code",
                              "location"
                            ]
                          }
                        }
                      },
                      "required": [
                        "from",
                        "to",
                        "engines",
                        "markets"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total",
                    "scope"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/market": {
      "get": {
        "operationId": "listMarketActors",
        "tags": [
          "Market"
        ],
        "summary": "Market share of voice",
        "description": "Brands (or products) cited by AI answers, ranked by visibility, with their share of voice and mentions. Same data as the MCP tool list_market_actors. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "brands (default) or products.",
            "schema": {
              "type": "string",
              "enum": [
                "brands",
                "products"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First day (YYYY-MM-DD, Europe/Paris), with to. Default: the last 30 days. At most 90 days per request.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last day, included (YYYY-MM-DD), with from.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "engine",
            "in": "query",
            "required": false,
            "description": "AI engine code (see engines of GET /brands), or several separated by commas. Default: all tracked engines.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "description": "Market country code (see markets of GET /brands). Default: the primary market.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "City id (location.city.id of a prompt): only the prompts of this city. Default: all the prompts of the market.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page (default 50, at most 200).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor of the previous page, with the same limit.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "type": "integer"
                          },
                          "tied": {
                            "type": "boolean"
                          },
                          "name": {
                            "type": "string"
                          },
                          "relation": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "visibility": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percentage from 0 to 100, null when not measured.",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "shareOfVoice": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percentage from 0 to 100, null when not measured.",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "mentions": {
                            "type": "integer"
                          },
                          "engines": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "rank",
                          "tied",
                          "name",
                          "relation",
                          "visibility",
                          "shareOfVoice",
                          "mentions",
                          "engines"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass it as cursor to read the next page, null on the last page."
                    },
                    "scope": {
                      "$ref": "#/components/schemas/Scope"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "scope",
                    "kind",
                    "total"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/market/daily": {
      "get": {
        "operationId": "getMarketDaily",
        "tags": [
          "Market"
        ],
        "summary": "Daily share of voice",
        "description": "One row per day, market and tracked brand (yours and your competitors): mentions, visibility and share of voice among all the brands the answers cite. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First day (YYYY-MM-DD, Europe/Paris), with to. Default: the last 30 days. At most 90 days per request.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last day, included (YYYY-MM-DD), with from.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "engine",
            "in": "query",
            "required": false,
            "description": "AI engine code (see engines of GET /brands), or several separated by commas. Default: all tracked engines.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "description": "Market country code. Default: all markets.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "City id (location.city.id of a prompt): only the prompts of this city. Default: all the prompts of the market.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page (default 50, at most 200).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor of the previous page, with the same limit.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "description": "Business day (Europe/Paris).",
                            "format": "date"
                          },
                          "market": {
                            "type": "string"
                          },
                          "location": {
                            "$ref": "#/components/schemas/Location"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "relation": {
                            "type": "string",
                            "description": "mine or competitor."
                          },
                          "isOwn": {
                            "type": "boolean",
                            "description": "The brand itself."
                          },
                          "mentions": {
                            "type": "integer"
                          },
                          "responses": {
                            "type": "integer"
                          },
                          "visibility": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percentage from 0 to 100, null when not measured.",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "shareOfVoice": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Mentions of this brand among the mentions of all the brands cited that day, null without answers.",
                            "minimum": 0,
                            "maximum": 100
                          }
                        },
                        "required": [
                          "date",
                          "market",
                          "location",
                          "brand",
                          "relation",
                          "isOwn",
                          "mentions",
                          "responses",
                          "visibility",
                          "shareOfVoice"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass it as cursor to read the next page, null on the last page."
                    },
                    "total": {
                      "type": "integer",
                      "description": "Rows of the whole series."
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string",
                          "format": "date"
                        },
                        "to": {
                          "type": "string",
                          "format": "date"
                        },
                        "engines": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "markets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "location": {
                                "$ref": "#/components/schemas/Location"
                              }
                            },
                            "required": [
                              "code",
                              "location"
                            ]
                          }
                        }
                      },
                      "required": [
                        "from",
                        "to",
                        "engines",
                        "markets"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total",
                    "scope"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/prompts": {
      "get": {
        "operationId": "listPrompts",
        "tags": [
          "Prompts"
        ],
        "summary": "List prompts",
        "description": "Tracked prompts (questions asked to the AI engines) with their visibility, cited flag, answers, average position and most mentioned brands. Same data as the MCP tool list_prompts. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "visibility (default) or position.",
            "schema": {
              "type": "string",
              "enum": [
                "visibility",
                "position"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First day (YYYY-MM-DD, Europe/Paris), with to. Default: the last 30 days. At most 90 days per request.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last day, included (YYYY-MM-DD), with from.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "engine",
            "in": "query",
            "required": false,
            "description": "AI engine code (see engines of GET /brands), or several separated by commas. Default: all tracked engines.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "description": "Market country code. Default: all markets.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "City id (location.city.id of a prompt): only the prompts of this city. Default: all the prompts of the market.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page (default 50, at most 200).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor of the previous page, with the same limit.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "market": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "city": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/City"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cityMode": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "explicit (the city is in the text) or near_me (the question is placed in the city), null without a city."
                          },
                          "location": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Location"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "visibility": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percentage from 0 to 100, null when not measured.",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "cited": {
                            "type": "boolean"
                          },
                          "responses": {
                            "type": "integer"
                          },
                          "position": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "topBrands": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/TopBrand"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "text",
                          "market",
                          "city",
                          "cityMode",
                          "location",
                          "visibility",
                          "cited",
                          "responses",
                          "position",
                          "topBrands"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass it as cursor to read the next page, null on the last page."
                    },
                    "scope": {
                      "$ref": "#/components/schemas/Scope"
                    },
                    "visibility": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Percentage from 0 to 100, null when not measured.",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "cited": {
                          "type": "boolean",
                          "description": "True when cited at least once, even if the rounded value is 0."
                        },
                        "delta": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Change in points against the previous period."
                        }
                      },
                      "required": [
                        "value",
                        "cited",
                        "delta"
                      ]
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "scope",
                    "visibility",
                    "total"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/prompts/{promptId}": {
      "get": {
        "operationId": "getPrompt",
        "tags": [
          "Prompts"
        ],
        "summary": "Get a prompt",
        "description": "One prompt with its answers: visibility by engine, brands mentioned, sites and pages cited, searches the engines ran. Same data as the MCP tool get_prompt. Market and engines are those of the prompt. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "description": "Prompt id from GET /prompts.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First day (YYYY-MM-DD, Europe/Paris), with to. Default: the last 30 days. At most 90 days per request.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last day, included (YYYY-MM-DD), with from.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "$ref": "#/components/schemas/Scope"
                    },
                    "prompt": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        },
                        "market": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "city": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/City"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "cityMode": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "location": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/Location"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "url": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "text",
                        "market",
                        "city",
                        "cityMode",
                        "location",
                        "status",
                        "url"
                      ]
                    },
                    "visibility": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Percentage from 0 to 100, null when not measured.",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "cited": {
                      "type": "boolean"
                    },
                    "responses": {
                      "type": "integer"
                    },
                    "position": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "byEngine": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "engine": {
                            "type": "string"
                          },
                          "value": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percentage from 0 to 100, null when not measured.",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "responses": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "engine",
                          "value",
                          "responses"
                        ]
                      }
                    },
                    "topBrands": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TopBrand"
                      }
                    },
                    "citations": {
                      "type": "integer"
                    },
                    "sites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "host": {
                            "type": "string"
                          },
                          "share": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percentage from 0 to 100, null when not measured.",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "citations": {
                            "type": "integer"
                          },
                          "isMine": {
                            "type": "boolean"
                          },
                          "engines": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "host",
                          "share",
                          "citations",
                          "isMine",
                          "engines"
                        ]
                      }
                    },
                    "pages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string"
                          },
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "citations": {
                            "type": "integer"
                          },
                          "isMine": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "title",
                          "citations",
                          "isMine"
                        ]
                      }
                    },
                    "searches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string"
                          },
                          "answers": {
                            "type": "integer"
                          },
                          "engines": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "text",
                          "answers",
                          "engines"
                        ]
                      }
                    }
                  },
                  "required": [
                    "scope",
                    "prompt",
                    "visibility",
                    "cited",
                    "responses",
                    "position",
                    "byEngine",
                    "topBrands",
                    "citations",
                    "sites",
                    "pages",
                    "searches"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/sources": {
      "get": {
        "operationId": "listSources",
        "tags": [
          "Sources"
        ],
        "summary": "List cited sources",
        "description": "Sites (view=domains, default) or pages (view=pages) cited by the AI answers, with their share and citations. type filters by source type. Same data as the MCP tool list_sources. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "view",
            "in": "query",
            "required": false,
            "description": "domains (default) or pages.",
            "schema": {
              "type": "string",
              "enum": [
                "domains",
                "pages"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Site type filter: commerce, media, community, review, reference, brand, institutional, education, culture, blog, social, place (map listing), product_listing (Google Shopping product page), other or uncategorized. Default: all.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First day (YYYY-MM-DD, Europe/Paris), with to. Default: the last 30 days. At most 90 days per request.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last day, included (YYYY-MM-DD), with from.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "engine",
            "in": "query",
            "required": false,
            "description": "AI engine code (see engines of GET /brands), or several separated by commas. Default: all tracked engines.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "description": "Market country code (see markets of GET /brands). Default: the primary market.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "City id (location.city.id of a prompt): only the prompts of this city. Default: all the prompts of the market.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page (default 50, at most 200).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor of the previous page, with the same limit.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "A site (host, type, isMine, share, citations, engines) or a page (url, title, host, isMine, citations, engines, presence)."
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass it as cursor to read the next page, null on the last page."
                    },
                    "scope": {
                      "$ref": "#/components/schemas/Scope"
                    },
                    "view": {
                      "type": "string",
                      "enum": [
                        "domains",
                        "pages"
                      ]
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "scope",
                    "view",
                    "total"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/perception": {
      "get": {
        "operationId": "getPerception",
        "tags": [
          "Perception"
        ],
        "summary": "Perception",
        "description": "How the AI answers describe the brand: terms by family, expected terms never associated, sentiment, negative and positive themes. Same data as the MCP tool get_perception. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First day (YYYY-MM-DD, Europe/Paris), with to. Default: the last 30 days. At most 90 days per request.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last day, included (YYYY-MM-DD), with from.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "engine",
            "in": "query",
            "required": false,
            "description": "AI engine code (see engines of GET /brands), or several separated by commas. Default: all tracked engines.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "description": "Market country code (see markets of GET /brands). Default: the primary market.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "City id (location.city.id of a prompt): only the prompts of this city. Default: all the prompts of the market.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "$ref": "#/components/schemas/Scope"
                    },
                    "termCount": {
                      "type": "integer"
                    },
                    "families": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "family": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "termCount": {
                            "type": "integer"
                          },
                          "terms": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "term": {
                                  "type": "string",
                                  "description": "Term id, for GET /perception/terms/{termId}."
                                },
                                "label": {
                                  "type": "string"
                                },
                                "responses": {
                                  "type": "integer"
                                },
                                "status": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "mineShare": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Percentage from 0 to 100, null when not measured.",
                                  "minimum": 0,
                                  "maximum": 100
                                },
                                "othersShare": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Percentage from 0 to 100, null when not measured.",
                                  "minimum": 0,
                                  "maximum": 100
                                },
                                "unbrandedShare": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Percentage from 0 to 100, null when not measured.",
                                  "minimum": 0,
                                  "maximum": 100
                                },
                                "mineResponses": {
                                  "type": "integer"
                                },
                                "othersResponses": {
                                  "type": "integer"
                                },
                                "ignored": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "term",
                                "label",
                                "responses",
                                "status",
                                "mineShare",
                                "othersShare",
                                "unbrandedShare",
                                "mineResponses",
                                "othersResponses",
                                "ignored"
                              ]
                            }
                          }
                        },
                        "required": [
                          "family",
                          "termCount",
                          "terms"
                        ]
                      }
                    },
                    "expectedNeverAssociated": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "sentiment": {
                      "type": "object",
                      "description": "Score, band, passages, sufficient, negative, neutral and positive shares."
                    },
                    "negativeThemes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "label",
                          "count"
                        ]
                      }
                    },
                    "positiveThemes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "label",
                          "count"
                        ]
                      }
                    }
                  },
                  "required": [
                    "scope",
                    "termCount",
                    "families",
                    "expectedNeverAssociated",
                    "sentiment",
                    "negativeThemes",
                    "positiveThemes"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/perception/terms/{termId}": {
      "get": {
        "operationId": "getPerceptionTerm",
        "tags": [
          "Perception"
        ],
        "summary": "Perception term",
        "description": "One term of the perception: shares, brands it is associated with, engines and sources. Same data as get_perception with a termId. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "termId",
            "in": "path",
            "required": true,
            "description": "Term id from GET /perception.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First day (YYYY-MM-DD, Europe/Paris), with to. Default: the last 30 days. At most 90 days per request.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last day, included (YYYY-MM-DD), with from.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "engine",
            "in": "query",
            "required": false,
            "description": "AI engine code (see engines of GET /brands), or several separated by commas. Default: all tracked engines.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "description": "Market country code (see markets of GET /brands). Default: the primary market.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "City id (location.city.id of a prompt): only the prompts of this city. Default: all the prompts of the market.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "$ref": "#/components/schemas/Scope"
                    },
                    "term": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "family": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "responses": {
                      "type": "integer"
                    },
                    "mineShare": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Percentage from 0 to 100, null when not measured.",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "othersShare": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Percentage from 0 to 100, null when not measured.",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "unbrandedShare": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Percentage from 0 to 100, null when not measured.",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "brands": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "ignored": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "scope",
                    "term",
                    "label",
                    "family",
                    "status",
                    "responses",
                    "mineShare",
                    "othersShare",
                    "unbrandedShare",
                    "brands",
                    "ignored"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/recommendations": {
      "get": {
        "operationId": "listRecommendations",
        "tags": [
          "Recommendations and tasks"
        ],
        "summary": "List recommendations",
        "description": "Pending recommendations of the week, by priority. Same data as the MCP tool list_recommendations. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "category": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "priority": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "markets": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "locations": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/Location"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "description",
                          "category",
                          "priority",
                          "markets",
                          "locations"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass it as cursor to read the next page, null on the last page."
                    },
                    "pending": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "pending",
                    "truncated",
                    "url"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/tasks": {
      "get": {
        "operationId": "listTasks",
        "tags": [
          "Recommendations and tasks"
        ],
        "summary": "List tasks",
        "description": "Tasks of the GEO board, in column order, with the page published for a treated topic. Same data as the MCP tool list_tasks. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Keep one column. Default: all.",
            "schema": {
              "type": "string",
              "enum": [
                "todo",
                "in_progress",
                "done"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page (default 50, at most 200).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor of the previous page, with the same limit.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "priority": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "category": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "markets": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "locations": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/Location"
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "UTC timestamp (ISO 8601).",
                            "format": "date-time"
                          },
                          "doneAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "UTC timestamp (ISO 8601), null when absent.",
                            "format": "date-time"
                          },
                          "published": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Page published for a treated topic: url, on, citedOn, citedEngine."
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "status",
                          "priority",
                          "category",
                          "markets",
                          "locations",
                          "createdAt",
                          "doneAt",
                          "published"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass it as cursor to read the next page, null on the last page."
                    },
                    "counts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "status",
                          "count"
                        ]
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "counts",
                    "total",
                    "url"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/technical/pages": {
      "get": {
        "operationId": "listTechnicalPages",
        "tags": [
          "Technical"
        ],
        "summary": "List technical pages",
        "description": "Pages followed by the technical audit, with their score, and the average optimization score. Same data as the MCP tool list_technical_pages. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page (default 50, at most 200).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor of the previous page, with the same limit.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "score": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "band": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "analyzedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "UTC timestamp (ISO 8601), null when absent.",
                            "format": "date-time"
                          },
                          "detailUrl": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "url",
                          "label",
                          "score",
                          "band",
                          "analyzedAt",
                          "detailUrl"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass it as cursor to read the next page, null on the last page."
                    },
                    "averageScore": {
                      "type": "object",
                      "properties": {
                        "score": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "band": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "pages": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "delta": {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "score",
                        "band",
                        "pages",
                        "delta"
                      ]
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "averageScore",
                    "total"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/technical/pages/{pageId}": {
      "get": {
        "operationId": "getTechnicalPage",
        "tags": [
          "Technical"
        ],
        "summary": "Get a technical page",
        "description": "Criteria of an audited page, the ones to fix first. Same data as the MCP tool get_technical_page. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "description": "Page id from GET /technical/pages.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "failedOnly",
            "in": "query",
            "required": false,
            "description": "Only the criteria to fix (default true).",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "score": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "band": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "analyzedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "UTC timestamp (ISO 8601), null when absent.",
                      "format": "date-time"
                    },
                    "detailUrl": {
                      "type": "string"
                    },
                    "checks": {
                      "type": "object",
                      "description": "passed, total and failed checks."
                    },
                    "families": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "criteria": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "criterion": {
                            "type": "string",
                            "description": "Criterion slug."
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "importance": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "actionRequired": {
                            "type": "boolean"
                          },
                          "docUrl": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "criterion",
                          "name",
                          "status",
                          "importance",
                          "actionRequired",
                          "docUrl"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "url",
                    "label",
                    "score",
                    "band",
                    "analyzedAt",
                    "detailUrl",
                    "checks",
                    "families",
                    "criteria"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/traffic/ai": {
      "get": {
        "operationId": "getAiTrafficReport",
        "tags": [
          "AI traffic (Google)"
        ],
        "summary": "AI traffic report",
        "description": "Visits from AI assistants measured by Google Analytics 4 (same data as the MCP tool get_ai_traffic_report). Only when the brand shares its Google data with MCP and the API, otherwise 403 google_not_connected or google_data_disabled. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "Period: 7d, 14d, 30d (default), 90d, 3m, 6m, 12m or 16m.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dimension",
            "in": "query",
            "required": false,
            "description": "source (default: AI assistants), landingPage, country, city, device, userType, keyEvent, channel or date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "description": "session (default) or firstUser.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Keep one AI assistant (source code from the source dimension).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "landingPage",
            "in": "query",
            "required": false,
            "description": "Keep the landing pages whose path contains this text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO 3166-1 alpha-2 country code (FR, US\u2026).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "device",
            "in": "query",
            "required": false,
            "description": "desktop, mobile or tablet.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort: sessions (default), engagedSessions, engagementRate, users, newUsers, views, keyEvents, keyEventRate, revenue or sessionsChange.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Same object as the MCP tool get_ai_traffic_report."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/GoogleForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/traffic/ai/daily": {
      "get": {
        "operationId": "getAiTrafficDaily",
        "tags": [
          "AI traffic (Google)"
        ],
        "summary": "Daily AI traffic",
        "description": "One row per day of the period: visits from AI assistants measured by Google Analytics 4 (sessions, engaged sessions, users of the day, new users, views, key events, revenue), the sessions of the whole site and the AI share, as the AI traffic screen shows them. Only when the brand shares its Google data with MCP and the API, otherwise 403 google_not_connected or google_data_disabled. Without readable Google data (connection to redo), no rows and status says why. Counts as one request in the monthly quota. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "First day (YYYY-MM-DD, Europe/Paris), with to. Default: the last 30 days. At most 90 days per request.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Last day, included (YYYY-MM-DD), with from.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page (default 50, at most 200).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor of the previous page, with the same limit.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "description": "Business day of the Google Analytics property.",
                            "format": "date"
                          },
                          "sessions": {
                            "type": "integer",
                            "description": "Sessions from AI assistants."
                          },
                          "engagedSessions": {
                            "type": "integer"
                          },
                          "users": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Users of the day (never added up from one day to another by Google)."
                          },
                          "newUsers": {
                            "type": "integer"
                          },
                          "views": {
                            "type": "integer"
                          },
                          "keyEvents": {
                            "type": "integer"
                          },
                          "revenue": {
                            "type": "number"
                          },
                          "siteSessions": {
                            "type": "integer",
                            "description": "Sessions of the whole site that day."
                          },
                          "aiShare": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Share of the site sessions that came from AI assistants, null without site sessions.",
                            "minimum": 0,
                            "maximum": 100
                          }
                        },
                        "required": [
                          "date",
                          "sessions",
                          "engagedSessions",
                          "users",
                          "newUsers",
                          "views",
                          "keyEvents",
                          "revenue",
                          "siteSessions",
                          "aiShare"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass it as cursor to read the next page, null on the last page."
                    },
                    "total": {
                      "type": "integer",
                      "description": "Days of the whole series."
                    },
                    "status": {
                      "type": "string",
                      "description": "ok, or why the Google data cannot be read (not_connected, not_selected, reauthorize...)."
                    },
                    "scope": {
                      "type": "object",
                      "description": "Period read from Google Analytics 4 (from, to, days), filters, sampling and thresholds."
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total",
                    "status",
                    "scope"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/GoogleForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/traffic/search-console": {
      "get": {
        "operationId": "getSearchConsoleReport",
        "tags": [
          "AI traffic (Google)"
        ],
        "summary": "Search Console report",
        "description": "Google Search Console queries and pages (same data as the MCP tool get_search_console_report). Only with the brand\u0027s Google option on. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "Period: 7d, 14d, 30d (default), 90d, 3m, 6m, 12m or 16m.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Search type: web (default), image, video, news, discover or googleNews.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dimension",
            "in": "query",
            "required": false,
            "description": "query (default), page, country, device, appearance or date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Keep the queries that contain this text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Keep the pages whose URL contains this text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO 3166-1 alpha-3 country code (fra, usa\u2026).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "device",
            "in": "query",
            "required": false,
            "description": "desktop, mobile or tablet.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort: clicks (default), impressions, ctr, position, clicksChange, impressionsChange or positionChange.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Same object as the MCP tool get_search_console_report."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/GoogleForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/traffic/opportunities": {
      "get": {
        "operationId": "getTrafficOpportunities",
        "tags": [
          "AI traffic (Google)"
        ],
        "summary": "Traffic opportunities",
        "description": "Opportunities read from the Google data (same data as the MCP tool get_traffic_opportunities). Only with the brand\u0027s Google option on. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "Period: 7d, 14d, 30d (default), 90d, 3m, 6m, 12m or 16m.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Same object as the MCP tool get_traffic_opportunities."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/GoogleForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/traffic/pages": {
      "get": {
        "operationId": "getTrafficPages",
        "tags": [
          "AI traffic (Google)"
        ],
        "summary": "Traffic pages",
        "description": "Pages of the site with their Google traffic and AI citations (same data as the MCP tool get_traffic_pages). Only with the brand\u0027s Google option on. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "Period: 7d, 14d, 30d (default), 90d, 3m, 6m, 12m or 16m.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort: clicks (default), impressions, ctr, position, aiSessions, aiKeyEvents, aiCitations or score.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Same object as the MCP tool get_traffic_pages."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/GoogleForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/brands/{brandId}/traffic/indexing": {
      "get": {
        "operationId": "getIndexing",
        "tags": [
          "AI traffic (Google)"
        ],
        "summary": "Google indexing",
        "description": "Google indexing of the site\u0027s pages (same data as the MCP tool get_indexing). Only with the brand\u0027s Google option on. Counts as one request in the monthly quota.",
        "parameters": [
          {
            "name": "brandId",
            "in": "path",
            "required": true,
            "description": "Brand id from GET /brands.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for the key.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "End of the current minute (Unix time, seconds).",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Same object as the MCP tool get_indexing."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/GoogleForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "ipk_live_ followed by 52 characters",
        "description": "API key of the organization, created in iPand (Settings \u203A API)."
      }
    },
    "schemas": {
      "Location": {
        "type": "object",
        "description": "Where a market or a prompt is measured. city is the city of a prompt, or of the city filter, and null for a whole market or a prompt without a city.",
        "properties": {
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 3166-1 alpha-2 country code of the market."
          },
          "city": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/City"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "country",
          "city"
        ]
      },
      "City": {
        "type": "object",
        "description": "A city a prompt is collected for. Its id is stable and can be passed as the city filter.",
        "properties": {
          "id": {
            "type": "string",
            "description": "City id."
          },
          "name": {
            "type": "string",
            "description": "City name, in the language of the market."
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code."
          }
        },
        "required": [
          "id",
          "name",
          "country"
        ]
      },
      "Scope": {
        "type": "object",
        "description": "Filters actually applied to the read (server-resolved) and the number of AI answers behind it.",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "market": {
            "type": [
              "string",
              "null"
            ],
            "description": "Market code, null for all markets."
          },
          "city": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/City"
              },
              {
                "type": "null"
              }
            ]
          },
          "location": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Location"
              },
              {
                "type": "null"
              }
            ]
          },
          "engines": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "responses": {
            "type": "integer",
            "description": "AI answers read."
          },
          "pendingAnalysis": {
            "type": "integer",
            "description": "Answers collected but not analyzed yet: the figures are provisional while it is above 0."
          }
        },
        "required": [
          "from",
          "to",
          "market",
          "city",
          "location",
          "engines",
          "responses",
          "pendingAnalysis"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable error code."
              },
              "message": {
                "type": "string",
                "description": "Human-readable message, in English."
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "TopBrand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "relation": {
            "type": [
              "string",
              "null"
            ],
            "description": "mine, competitor or other."
          },
          "mentions": {
            "type": "integer"
          }
        },
        "required": [
          "name",
          "relation",
          "mentions"
        ]
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid parameter (invalid_request, with the parameter name in field). Codes: invalid_request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing, invalid, revoked or expired API key. Codes: missing_api_key, invalid_api_key, api_key_revoked, api_key_expired.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "GoogleForbidden": {
        "description": "The brand has not connected Google, or does not share its Google data with MCP and the API. Codes: google_not_connected, google_data_disabled.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Unknown id, or a brand outside the key\u0027s scope. Codes: not_found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit (60 requests per minute and per key) or monthly quota reached. quota_exceeded carries resetsAt (UTC). Codes: rate_limited, quota_exceeded.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute for the key.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests left in the current minute.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Reset": {
            "description": "End of the current minute (Unix time, seconds).",
            "schema": {
              "type": "integer"
            }
          },
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          }
        }
      },
      "Unavailable": {
        "description": "The API is temporarily turned off (api_disabled), or the read took more than 30 s (timeout). Codes: api_disabled, timeout.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute for the key.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests left in the current minute.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Reset": {
            "description": "End of the current minute (Unix time, seconds).",
            "schema": {
              "type": "integer"
            }
          },
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          }
        }
      }
    }
  }
}
