{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/upriver-ai/json-schema/upriver-ai-simplified-partner-search-response-schema.json",
  "title": "SimplifiedPartnerSearchResponse",
  "description": "Response for simplified partner search by industry",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/upriver-ai-sponsorships-api-openapi.yml#/components/schemas/SimplifiedPartnerSearchResponse",
  "properties": {
    "results": {
      "items": {
        "$ref": "#/$defs/SimplifiedPartnerSearchResult"
      },
      "type": "array",
      "title": "Results",
      "description": "List of partner content results"
    },
    "total_count": {
      "type": "integer",
      "title": "Total Count",
      "description": "Number of results in the current page (not a grand total)"
    },
    "industry_category": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Industry Category",
      "description": "The industry category searched"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor",
      "description": "Cursor for fetching the next page of results"
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More",
      "description": "Whether there are more results available",
      "default": false
    },
    "next_sync_token": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Sync Token",
      "description": "Token for starting the next sponsor activity request. Save it after processing the results from this response that you intend to keep. Returned only for activity searches."
    }
  },
  "type": "object",
  "required": [
    "results",
    "total_count"
  ],
  "$defs": {
    "AdEvidence": {
      "properties": {
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source",
          "description": "Origin of the evidence (e.g., 'transcript', 'description', 'post_body', 'title')."
        },
        "excerpt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Excerpt",
          "description": "Short excerpt around the sponsor mention. May be raw text or HTML depending on source."
        },
        "offset_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Offset Seconds",
          "description": "Approximate timestamp in seconds when source is 'transcript'. Null for sources without timing (e.g., description)."
        },
        "confidence": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Confidence",
          "description": "Detection confidence for this specific piece of evidence (0-1), when available."
        }
      },
      "type": "object",
      "title": "AdEvidence",
      "description": "Structured evidence about where/how the sponsor was detected."
    },
    "MostRecentAd": {
      "properties": {
        "publication_name": {
          "type": "string",
          "title": "Publication Name",
          "description": "Name of the publication where the ad appeared"
        },
        "publication_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Publication Url",
          "description": "URL of the publication"
        },
        "publication_categories": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Publication Categories",
          "description": "Categories of the publication"
        },
        "publication_platform": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Publication Platform",
          "description": "Platform of the publication"
        },
        "content_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Content Url",
          "description": "URL of the specific content containing the ad, if available"
        },
        "sponsor_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sponsor Type",
          "description": "Legacy single-label sponsorship category for the most recent ad (for example explicit_ad, implicit_ad, affiliate, promotion, or unknown), kept for backward compatibility. It groups several available signals into one value; for example, explicit_ad does not prove a cash payment."
        },
        "monetization_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Monetization Type",
          "description": "Likely type of deal for the most recent ad: paid_partnership, affiliate, gifted, or unknown (some older placements carry promotion, self_promotion, or merch_store). It does not confirm a private contract or payment. Omitted when it was not populated."
        },
        "disclosure_tier": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Disclosure Tier",
          "description": "Strongest evidence found for the most recent ad's creator-sponsor relationship: platform_verified, creator_disclosed, commercial_signal, or inferred. Omitted when it was not populated."
        },
        "published_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Published Date",
          "description": "Date when this ad was published (YYYY-MM-DD)"
        },
        "evidence": {
          "anyOf": [
            {
              "$ref": "#/$defs/AdEvidence"
            },
            {
              "type": "null"
            }
          ],
          "description": "Structured evidence for the most recent ad, including source and offsets. Returned only when 'include_evidence=true'."
        }
      },
      "type": "object",
      "required": [
        "publication_name"
      ],
      "title": "MostRecentAd",
      "description": "Details from the partner's most recent advertisement"
    },
    "SimplifiedPartnerSearchResult": {
      "properties": {
        "partner_name": {
          "type": "string",
          "title": "Partner Name",
          "description": "Name of the partner/sponsor entity"
        },
        "sponsor_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sponsor Id",
          "description": "Canonical identifier for this sponsor. Store it and use it for later sponsor-specific searches, saved filters, and deduplication. Results on this endpoint remain grouped by sponsor name, so two results may share one sponsor_id. It may be null when unavailable."
        },
        "sponsor_domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sponsor Domain",
          "description": "Canonical apex domain associated with the sponsor when available"
        },
        "sponsor_linkedin_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sponsor Linkedin Url",
          "description": "LinkedIn company profile URL for the sponsor when available"
        },
        "sponsor_description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sponsor Description",
          "description": "Brief description of the sponsor brand when available"
        },
        "total_ads_found": {
          "type": "integer",
          "title": "Total Ads Found",
          "description": "Total number of sponsored content pieces found across all publications",
          "default": 1
        },
        "sponsorships_in_window": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sponsorships In Window",
          "description": "Number of sponsorships for this sponsor in the requested activity window. Returned only for activity requests."
        },
        "most_recent_ad": {
          "$ref": "#/$defs/MostRecentAd"
        }
      },
      "type": "object",
      "required": [
        "partner_name",
        "most_recent_ad"
      ],
      "title": "SimplifiedPartnerSearchResult",
      "description": "Partner search result showing aggregated sponsorship data"
    }
  }
}