{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/creatordb-app/json-schema/creatordb-app-instagram-performance-data-schema.json",
  "title": "InstagramPerformanceData",
  "description": "The Instagram performance data.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/creatordb-app-openapi.yaml#/components/schemas/InstagramPerformanceData",
  "type": "object",
  "properties": {
    "contentCountByDays": {
      "type": "object",
      "description": "Published Instagram posts over different time intervals.",
      "properties": {
        "7d": {
          "type": "integer",
          "description": "Number of posts published in the past 7 days.",
          "minimum": 0
        },
        "30d": {
          "type": "integer",
          "description": "Number of posts published in the past 30 days.",
          "minimum": 0
        },
        "90d": {
          "type": "integer",
          "description": "Number of posts published in the past 90 days.",
          "minimum": 0
        }
      },
      "required": [
        "7d",
        "30d",
        "90d"
      ]
    },
    "ranking": {
      "type": "object",
      "description": "Percentile rankings for various performance metrics, benchmarked at the global, country, or language level. A value of `1.0` indicates top 1%, while `0.5` represents the median.",
      "properties": {
        "totalFollowers": {
          "type": "object",
          "description": "Percentile rank of the total follower count.",
          "properties": {
            "global": {
              "type": "number",
              "description": "Percentile rank compared to all creators in CreatorDB's database.",
              "minimum": 0,
              "maximum": 1
            },
            "country": {
              "type": "number",
              "description": "Percentile rank among creators from the same country.",
              "minimum": 0,
              "maximum": 1
            },
            "language": {
              "type": "number",
              "description": "Percentile rank among creators using the same primary language.",
              "minimum": 0,
              "maximum": 1
            }
          },
          "required": [
            "global",
            "country",
            "language"
          ]
        },
        "avgEngagementRate": {
          "type": "object",
          "description": "Percentile rank of the average engagement rate, calculated based on the creator's recent posts.",
          "properties": {
            "global": {
              "type": "number",
              "description": "Percentile rank compared to all creators in CreatorDB's database.",
              "minimum": 0,
              "maximum": 1
            },
            "country": {
              "type": "number",
              "description": "Percentile rank among creators from the same country.",
              "minimum": 0,
              "maximum": 1
            },
            "language": {
              "type": "number",
              "description": "Percentile rank among creators using the same primary language.",
              "minimum": 0,
              "maximum": 1
            }
          },
          "required": [
            "global",
            "country",
            "language"
          ]
        }
      },
      "required": [
        "totalFollowers",
        "avgEngagementRate"
      ]
    },
    "imagesPerformanceRecent": {
      "type": "object",
      "description": "Performance metrics of the creator's recent Instagram image posts.",
      "properties": {
        "likes": {
          "type": "object",
          "properties": {
            "all": {
              "type": "integer",
              "description": "Total number of likes.",
              "minimum": 0
            },
            "avg": {
              "type": "number",
              "description": "Average number of likes per image post, rounded to an integer.",
              "minimum": 0
            },
            "median": {
              "type": "number",
              "description": "Median number of likes.",
              "minimum": 0
            },
            "min": {
              "type": "number",
              "description": "Minimum number of likes.",
              "minimum": 0
            },
            "max": {
              "type": "number",
              "description": "Maximum number of likes.",
              "minimum": 0
            }
          },
          "required": [
            "all",
            "avg",
            "median",
            "min",
            "max"
          ]
        },
        "comments": {
          "type": "object",
          "properties": {
            "all": {
              "type": "integer",
              "description": "Total number of comments.",
              "minimum": 0
            },
            "avg": {
              "type": "number",
              "description": "Average number of comments per image post, rounded to an integer.",
              "minimum": 0
            },
            "median": {
              "type": "number",
              "description": "Median number of comments.",
              "minimum": 0
            },
            "min": {
              "type": "number",
              "description": "Minimum number of comments.",
              "minimum": 0
            },
            "max": {
              "type": "number",
              "description": "Maximum number of comments.",
              "minimum": 0
            }
          },
          "required": [
            "all",
            "avg",
            "median",
            "min",
            "max"
          ]
        },
        "engagement": {
          "type": "object",
          "description": "Engagement performance metrics including rates, per-follower statistics, and consistency analysis.",
          "properties": {
            "avgEngagementRate": {
              "type": "number",
              "description": "Average engagement rate per image post (excluding older pinned image posts), rounded to 4th decimal place. <br />\n  - *Engagement Rate &#61; (Likes + Comments)/ Followers*",
              "minimum": 0
            },
            "likesPerFollower": {
              "type": "number",
              "description": "Average number of likes per follower, rounded to 4th decimal place.",
              "minimum": 0
            },
            "commentsPerFollower": {
              "type": "number",
              "description": "Average number of comments per follower, rounded to 4th decimal place.",
              "minimum": 0
            },
            "engagementConsistency": {
              "type": "object",
              "description": "Consistency of engagement performance.",
              "properties": {
                "cv": {
                  "type": "number",
                  "description": "*cv &#61; Standard Deviation of Engagement Rate/ Mean Engagement Rate* <br />\n- The value is rounded to 4th decimal place. <br />\n- Lower values indicate more consistent performance. <br />\n- *A value of `0` indicates insufficient data.*",
                  "minimum": 0
                },
                "medianVsMean": {
                  "type": "number",
                  "description": "*medianVsMean &#61; Median Engagement Rate/ Mean Engagement Rate* <br />\n- The value is rounded to 4th decimal place <br />\n- Values closer to `1` indicate more consistent performance. <br />\n- *A value of `0` indicates insufficient data*.",
                  "minimum": 0
                },
                "topBottomRatio": {
                  "type": "number",
                  "description": "*topBottomRatio &#61; avg(Top 3 Engagement)/avg(Bottom 3 Engagement)* <br />\n- The value is rounded to 4th decimal place. <br />\n- Lower ratios indicate more consistent performance. <br />\n- *A value of `0` indicates insufficient data*.",
                  "minimum": 0
                },
                "consistencyScore": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "*consistencyScore &#61; 100 - [(cvScore\\*weight_cv) + (topBottomScore\\*weight_topBottom) + (medianVsMeanScore\\*weight_medianVsMean)]* <br />\n- The score is rounded to an integer. <br />\n- A higher score indicates more stable and consistent performance. <br />\n- Returns `null` when any of the three indicators (`cv`, `medianVsMean`, `topBottomRatio`) is `0`, indicating insufficient data.",
                  "minimum": 0,
                  "maximum": 100
                },
                "consistencyLevel": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "high",
                    "moderate",
                    "low",
                    null
                  ],
                  "description": "A qualitative label based on the `consistencyScore`: <br />\n- high: 81 - 100 <br />\n- moderate: 51 - 80 <br />\n- low: 1 - 50 <br />\n- Returns `null` when `consistencyScore` is `null`, indicating insufficient data."
                }
              },
              "required": [
                "cv",
                "medianVsMean",
                "topBottomRatio",
                "consistencyScore",
                "consistencyLevel"
              ]
            }
          },
          "required": [
            "avgEngagementRate",
            "likesPerFollower",
            "commentsPerFollower",
            "engagementConsistency"
          ]
        }
      },
      "required": [
        "likes",
        "comments",
        "engagement"
      ]
    },
    "reelsPerformanceRecent": {
      "type": "object",
      "description": "Performance metrics of the creator's recent Instagram reels.",
      "properties": {
        "likes": {
          "type": "object",
          "properties": {
            "all": {
              "type": "integer",
              "description": "Total number of likes.",
              "minimum": 0
            },
            "avg": {
              "type": "number",
              "description": "Average number of likes per reel, rounded to an integer.",
              "minimum": 0
            },
            "median": {
              "type": "number",
              "description": "Median number of likes.",
              "minimum": 0
            },
            "min": {
              "type": "number",
              "description": "Minimum number of likes.",
              "minimum": 0
            },
            "max": {
              "type": "number",
              "description": "Maximum number of likes.",
              "minimum": 0
            }
          },
          "required": [
            "all",
            "avg",
            "median",
            "min",
            "max"
          ]
        },
        "comments": {
          "type": "object",
          "properties": {
            "all": {
              "type": "integer",
              "description": "Total number of comments.",
              "minimum": 0
            },
            "avg": {
              "type": "number",
              "description": "Average number of comments per Instagram reel, rounded to an integer.",
              "minimum": 0
            },
            "median": {
              "type": "number",
              "description": "Median number of comments.",
              "minimum": 0
            },
            "min": {
              "type": "number",
              "description": "Minimum number of comments.",
              "minimum": 0
            },
            "max": {
              "type": "number",
              "description": "Maximum number of comments.",
              "minimum": 0
            }
          },
          "required": [
            "all",
            "avg",
            "median",
            "min",
            "max"
          ]
        },
        "views": {
          "type": "object",
          "properties": {
            "all": {
              "type": "integer",
              "description": "Total number of views.",
              "minimum": 0
            },
            "avg": {
              "type": "number",
              "description": "Average number of views per reel, rounded to an integer.",
              "minimum": 0
            },
            "median": {
              "type": "number",
              "description": "Median number of views.",
              "minimum": 0
            },
            "min": {
              "type": "number",
              "description": "Minimum number of views.",
              "minimum": 0
            },
            "max": {
              "type": "number",
              "description": "Maximum number of views.",
              "minimum": 0
            }
          },
          "required": [
            "all",
            "avg",
            "median",
            "min",
            "max"
          ]
        },
        "engagement": {
          "type": "object",
          "description": "Engagement performance metrics of Instagram reels, including standard engagement metrics and views per follower.",
          "properties": {
            "avgEngagementRate": {
              "type": "number",
              "description": "Average engagement rate per reel (excluding older pinned reels), rounded to 4th decimal place. <br />\n- *Engagement Rate &#61; (Likes + Comments)/ Views*",
              "minimum": 0
            },
            "likesPerFollower": {
              "type": "number",
              "description": "Average number of likes per follower, rounded to 4th decimal place.",
              "minimum": 0
            },
            "commentsPerFollower": {
              "type": "number",
              "description": "Average number of comments per follower, rounded to 4th decimal place.",
              "minimum": 0
            },
            "viewsPerFollower": {
              "type": "number",
              "description": "Average number of views per follower, rounded to 4th decimal place.",
              "minimum": 0
            },
            "engagementConsistency": {
              "type": "object",
              "description": "Consistency of engagement performance.",
              "properties": {
                "cv": {
                  "type": "number",
                  "description": "*cv &#61; Standard Deviation of Engagement Rate/ Mean Engagement Rate* <br />\n- The value is rounded to 4th decimal place. <br />\n- Lower values indicate more consistent performance. <br />\n- *A value of `0` indicates insufficient data.*",
                  "minimum": 0
                },
                "medianVsMean": {
                  "type": "number",
                  "description": "*medianVsMean &#61; Median Engagement Rate/ Mean Engagement Rate* <br />\n- The value is rounded to 4th decimal place. <br />\n- Values closer to `1` indicate more consistent performance. <br />\n- *A value of `0` indicates insufficient data.*",
                  "minimum": 0
                },
                "topBottomRatio": {
                  "type": "number",
                  "description": "*topBottomRatio &#61; avg(Top 3 Engagement)/avg(Bottom 3 Engagement)* <br />\n- The value is rounded to 4th decimal place. <br />\n- Lower ratios indicate more consistent performance. <br />\n- *A value of `0` indicates insufficient data.*",
                  "minimum": 0
                },
                "consistencyScore": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "*consistencyScore &#61; 100 - [(cvScore\\*weight_cv) + (topBottomScore\\*weight_topBottom) + (medianVsMeanScore\\*weight_medianVsMean)]* <br />\n- The score is rounded to an integer. <br />\n- A higher score indicates more stable and consistent performance. <br />\n- Returns `null` when any of the three indicators (`cv`, `medianVsMean`, `topBottomRatio`) is `0`, indicating insufficient data.",
                  "minimum": 0,
                  "maximum": 100
                },
                "consistencyLevel": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "high",
                    "moderate",
                    "low",
                    null
                  ],
                  "description": "A qualitative label based on the `consistencyScore`: <br />\n- high: 81 - 100 <br />\n- moderate: 51 - 80 <br />\n- low: 1 - 50 <br />\n- Returns `null` when `consistencyScore` is `null`, indicating insufficient data."
                }
              },
              "required": [
                "cv",
                "medianVsMean",
                "topBottomRatio",
                "consistencyScore",
                "consistencyLevel"
              ]
            }
          },
          "required": [
            "avgEngagementRate",
            "likesPerFollower",
            "commentsPerFollower",
            "viewsPerFollower",
            "engagementConsistency"
          ]
        }
      },
      "required": [
        "likes",
        "comments",
        "views",
        "engagement"
      ]
    },
    "recentImagesGrowth": {
      "type": "object",
      "description": "Growth metrics for recent Instagram image posts across 7, 30, and 90-day periods.",
      "properties": {
        "g7": {
          "type": "object",
          "description": "Growth metrics over 7 days.",
          "properties": {
            "engagementRate": {
              "type": "number",
              "description": "Growth rate of engagement rate, rounded to 4th decimal place."
            }
          },
          "required": [
            "engagementRate"
          ]
        },
        "g30": {
          "type": "object",
          "description": "Growth metrics over 30 days.",
          "properties": {
            "engagementRate": {
              "type": "number",
              "description": "Growth rate of engagement rate, rounded to 4th decimal place."
            }
          },
          "required": [
            "engagementRate"
          ]
        },
        "g90": {
          "type": "object",
          "description": "Growth metrics over 90 days.",
          "properties": {
            "engagementRate": {
              "type": "number",
              "description": "Growth rate of engagement rate, rounded to 4th decimal place."
            }
          },
          "required": [
            "engagementRate"
          ]
        }
      },
      "required": [
        "g7",
        "g30",
        "g90"
      ]
    },
    "recentReelsGrowth": {
      "type": "object",
      "description": "Growth metrics for recent Instagram reels across 7, 30, and 90-day periods.",
      "properties": {
        "g7": {
          "type": "object",
          "description": "Growth metrics over 7 days.",
          "properties": {
            "avgViews": {
              "type": "number",
              "description": "Growth rate of average views, rounded to 4th decimal place."
            },
            "engagementRate": {
              "type": "number",
              "description": "Growth rate of engagement rate, rounded to 4th decimal place."
            }
          },
          "required": [
            "avgViews",
            "engagementRate"
          ]
        },
        "g30": {
          "type": "object",
          "description": "Growth metrics over 30 days.",
          "properties": {
            "avgViews": {
              "type": "number",
              "description": "Growth rate of average views, rounded to 4th decimal place."
            },
            "engagementRate": {
              "type": "number",
              "description": "Growth rate of engagement rate, rounded to 4th decimal place."
            }
          },
          "required": [
            "avgViews",
            "engagementRate"
          ]
        },
        "g90": {
          "type": "object",
          "description": "Growth metrics over 90 days.",
          "properties": {
            "avgViews": {
              "type": "number",
              "description": "Growth rate of average views, rounded to 4th decimal place."
            },
            "engagementRate": {
              "type": "number",
              "description": "Growth rate of engagement rate, rounded to 4th decimal place."
            }
          },
          "required": [
            "avgViews",
            "engagementRate"
          ]
        }
      },
      "required": [
        "g7",
        "g30",
        "g90"
      ]
    }
  }
}