<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2023 Workiva-->
<!--r:49879df5-5754-47af-be5f-8a0fa80d9f34,g:560b7e1e-d352-412b-8c76-2ba592b7dffe-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:pubm="http://pubmatic.com/20221231" xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:dtr-types="http://www.xbrl.org/dtr/type/2020-01-21" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://pubmatic.com/20221231">
  <xs:import namespace="http://fasb.org/srt/2022" schemaLocation="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd"/>
  <xs:import namespace="http://fasb.org/us-gaap/2022" schemaLocation="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd"/>
  <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="http://www.xbrl.org/2003/xlink-2003-12-31.xsd"/>
  <xs:import namespace="http://www.xbrl.org/2003/instance" schemaLocation="http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd"/>
  <xs:import namespace="http://www.xbrl.org/2003/linkbase" schemaLocation="http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd"/>
  <xs:import namespace="http://www.xbrl.org/dtr/type/2020-01-21" schemaLocation="https://www.xbrl.org/dtr/type/2020-01-21/types.xsd"/>
  <xs:import namespace="http://xbrl.sec.gov/country/2022" schemaLocation="https://xbrl.sec.gov/country/2022/country-2022.xsd"/>
  <xs:import namespace="http://xbrl.sec.gov/dei/2022" schemaLocation="https://xbrl.sec.gov/dei/2022/dei-2022.xsd"/>
  <xs:annotation>
    <xs:appinfo>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="pubm-20221231_lab.xml" xlink:role="http://www.xbrl.org/2003/role/labelLinkbaseRef" xlink:type="simple"/>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="pubm-20221231_pre.xml" xlink:role="http://www.xbrl.org/2003/role/presentationLinkbaseRef" xlink:type="simple"/>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="pubm-20221231_cal.xml" xlink:role="http://www.xbrl.org/2003/role/calculationLinkbaseRef" xlink:type="simple"/>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="pubm-20221231_def.xml" xlink:role="http://www.xbrl.org/2003/role/definitionLinkbaseRef" xlink:type="simple"/>
      <link:roleType id="Cover" roleURI="http://pubmatic.com/role/Cover">
        <link:definition>0000001 - Document - Cover</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AuditInformation" roleURI="http://pubmatic.com/role/AuditInformation">
        <link:definition>0000002 - Document - Audit Information</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CONDENSEDCONSOLIDATEDBALANCESHEETS" roleURI="http://pubmatic.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETS">
        <link:definition>0000003 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical" roleURI="http://pubmatic.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical">
        <link:definition>0000004 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONS" roleURI="http://pubmatic.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONS">
        <link:definition>0000005 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CONDENSEDCONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME" roleURI="http://pubmatic.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME">
        <link:definition>0000006 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY" roleURI="http://pubmatic.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY">
        <link:definition>0000007 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS&#8217; EQUITY</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS" roleURI="http://pubmatic.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS">
        <link:definition>0000008 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="OrganizationandDescriptionofBusiness" roleURI="http://pubmatic.com/role/OrganizationandDescriptionofBusiness">
        <link:definition>0000009 - Disclosure - Organization and Description of Business</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BasisofPresentationandSummaryofSignificantAccountingPolicies" roleURI="http://pubmatic.com/role/BasisofPresentationandSummaryofSignificantAccountingPolicies">
        <link:definition>0000010 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="FairValueMeasurements" roleURI="http://pubmatic.com/role/FairValueMeasurements">
        <link:definition>0000011 - Disclosure - Fair Value Measurements</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BalanceSheetComponents" roleURI="http://pubmatic.com/role/BalanceSheetComponents">
        <link:definition>0000012 - Disclosure - Balance Sheet Components</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LoanandSecurityAgreementandSeniorSecuredCreditFacilitiesAgreement" roleURI="http://pubmatic.com/role/LoanandSecurityAgreementandSeniorSecuredCreditFacilitiesAgreement">
        <link:definition>0000013 - Disclosure - Loan and Security Agreement and Senior Secured Credit Facilities Agreement</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="Leases" roleURI="http://pubmatic.com/role/Leases">
        <link:definition>0000014 - Disclosure - Leases</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BusinessCombination" roleURI="http://pubmatic.com/role/BusinessCombination">
        <link:definition>0000015 - Disclosure - Business Combination</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillandAcquisitionrelatedIntangibleAssetsNet" roleURI="http://pubmatic.com/role/GoodwillandAcquisitionrelatedIntangibleAssetsNet">
        <link:definition>0000016 - Disclosure - Goodwill and Acquisition-related Intangible Assets, Net</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingencies" roleURI="http://pubmatic.com/role/CommitmentsandContingencies">
        <link:definition>0000017 - Disclosure - Commitments and Contingencies</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockholdersEquityandEquityIncentivePlans" roleURI="http://pubmatic.com/role/StockholdersEquityandEquityIncentivePlans">
        <link:definition>0000018 - Disclosure - Stockholders&#8217; Equity and Equity Incentive Plans</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="NetIncomePerShareAttributabletoCommonStockholders" roleURI="http://pubmatic.com/role/NetIncomePerShareAttributabletoCommonStockholders">
        <link:definition>0000019 - Disclosure - Net Income Per Share Attributable to Common Stockholders</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxes" roleURI="http://pubmatic.com/role/IncomeTaxes">
        <link:definition>0000020 - Disclosure - Income Taxes</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentInformation" roleURI="http://pubmatic.com/role/SegmentInformation">
        <link:definition>0000021 - Disclosure - Segment Information</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="A401kPlan" roleURI="http://pubmatic.com/role/A401kPlan">
        <link:definition>0000022 - Disclosure - 401(k) Plan</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SubsequentEvents" roleURI="http://pubmatic.com/role/SubsequentEvents">
        <link:definition>0000023 - Disclosure - Subsequent Events</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies" roleURI="http://pubmatic.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies">
        <link:definition>0000024 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies (Policies)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BasisofPresentationandSummaryofSignificantAccountingPoliciesTables" roleURI="http://pubmatic.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesTables">
        <link:definition>0000025 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="FairValueMeasurementsTables" roleURI="http://pubmatic.com/role/FairValueMeasurementsTables">
        <link:definition>0000026 - Disclosure - Fair Value Measurements (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BalanceSheetComponentsTables" roleURI="http://pubmatic.com/role/BalanceSheetComponentsTables">
        <link:definition>0000027 - Disclosure - Balance Sheet Components (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesTables" roleURI="http://pubmatic.com/role/LeasesTables">
        <link:definition>0000028 - Disclosure - Leases (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillandAcquisitionrelatedIntangibleAssetsNetTables" roleURI="http://pubmatic.com/role/GoodwillandAcquisitionrelatedIntangibleAssetsNetTables">
        <link:definition>0000029 - Disclosure - Goodwill and Acquisition-related Intangible Assets, Net (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingenciesTables" roleURI="http://pubmatic.com/role/CommitmentsandContingenciesTables">
        <link:definition>0000030 - Disclosure - Commitments and Contingencies (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockholdersEquityandEquityIncentivePlansTables" roleURI="http://pubmatic.com/role/StockholdersEquityandEquityIncentivePlansTables">
        <link:definition>0000031 - Disclosure - Stockholders&#8217; Equity and Equity Incentive Plans (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="NetIncomePerShareAttributabletoCommonStockholdersTables" roleURI="http://pubmatic.com/role/NetIncomePerShareAttributabletoCommonStockholdersTables">
        <link:definition>0000032 - Disclosure - Net Income Per Share Attributable to Common Stockholders (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesTables" roleURI="http://pubmatic.com/role/IncomeTaxesTables">
        <link:definition>0000033 - Disclosure - Income Taxes (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentReportingTables" roleURI="http://pubmatic.com/role/SegmentReportingTables">
        <link:definition>0000034 - Disclosure - Segment Reporting (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BasisofPresentationandSummaryofSignificantAccountingPoliciesAllowanceforDoubtfulAccountsDetails" roleURI="http://pubmatic.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesAllowanceforDoubtfulAccountsDetails">
        <link:definition>0000035 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies - Allowance for Doubtful Accounts (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyandEquipmentDetails" roleURI="http://pubmatic.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyandEquipmentDetails">
        <link:definition>0000036 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies - Property and Equipment (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BasisofPresentationandSummaryofSignificantAccountingPoliciesInternalUseSoftwareDevelopmentCostsDetails" roleURI="http://pubmatic.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesInternalUseSoftwareDevelopmentCostsDetails">
        <link:definition>0000037 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies - Internal Use Software Development Costs (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BasisofPresentationandSummaryofSignificantAccountingPoliciesImpairmentofEquityDetails" roleURI="http://pubmatic.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesImpairmentofEquityDetails">
        <link:definition>0000038 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies - Impairment of Equity (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BasisofPresentationandSummaryofSignificantAccountingPoliciesAdvertisingCostsDetails" roleURI="http://pubmatic.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesAdvertisingCostsDetails">
        <link:definition>0000039 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies - Advertising Costs (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BasisofPresentationandSummaryofSignificantAccountingPoliciesForeignCurrencyTranslationDetails" roleURI="http://pubmatic.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesForeignCurrencyTranslationDetails">
        <link:definition>0000040 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies - Foreign Currency Translation (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BasisofPresentationandSummaryofSignificantAccountingPoliciesSegmentInformationDetails" roleURI="http://pubmatic.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesSegmentInformationDetails">
        <link:definition>0000041 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies - Segment Information (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BasisofPresentationandSummaryofSignificantAccountingPoliciesConcentrationRiskPercentageDetails" roleURI="http://pubmatic.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesConcentrationRiskPercentageDetails">
        <link:definition>0000042 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies - Concentration Risk Percentage (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BasisofPresentationandSummaryofSignificantAccountingPoliciesRecentlyAdoptedAccountingPronouncementsDetails" roleURI="http://pubmatic.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesRecentlyAdoptedAccountingPronouncementsDetails">
        <link:definition>0000043 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies - Recently Adopted Accounting Pronouncements (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="FairValueMeasurementsFinancialAssetsandLiabilitiesDetails" roleURI="http://pubmatic.com/role/FairValueMeasurementsFinancialAssetsandLiabilitiesDetails">
        <link:definition>0000044 - Disclosure - Fair Value Measurements - Financial Assets and Liabilities (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BalanceSheetComponentsSummaryofMarketableSecuritiesDetails" roleURI="http://pubmatic.com/role/BalanceSheetComponentsSummaryofMarketableSecuritiesDetails">
        <link:definition>0000045 - Disclosure - Balance Sheet Components - Summary of Marketable Securities (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BalanceSheetComponentsScheduleofPropertyEquipmentandSoftwareNetDetails" roleURI="http://pubmatic.com/role/BalanceSheetComponentsScheduleofPropertyEquipmentandSoftwareNetDetails">
        <link:definition>0000046 - Disclosure - Balance Sheet Components - Schedule of Property, Equipment and Software, Net (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BalanceSheetComponentsNarrativeDetails" roleURI="http://pubmatic.com/role/BalanceSheetComponentsNarrativeDetails">
        <link:definition>0000047 - Disclosure - Balance Sheet Components - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BalanceSheetComponentsScheduleofAccountsPayableDetails" roleURI="http://pubmatic.com/role/BalanceSheetComponentsScheduleofAccountsPayableDetails">
        <link:definition>0000048 - Disclosure - Balance Sheet Components - Schedule of Accounts Payable (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BalanceSheetComponentsScheduleofAccruedExpensesDetails" roleURI="http://pubmatic.com/role/BalanceSheetComponentsScheduleofAccruedExpensesDetails">
        <link:definition>0000049 - Disclosure - Balance Sheet Components - Schedule of Accrued Expenses (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LoanandSecurityAgreementandSeniorSecuredCreditFacilitiesAgreementDetails" roleURI="http://pubmatic.com/role/LoanandSecurityAgreementandSeniorSecuredCreditFacilitiesAgreementDetails">
        <link:definition>0000050 - Disclosure - Loan and Security Agreement and Senior Secured Credit Facilities Agreement (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesNarrativeDetails" roleURI="http://pubmatic.com/role/LeasesNarrativeDetails">
        <link:definition>0000051 - Disclosure - Leases - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesLeaseCostDetails" roleURI="http://pubmatic.com/role/LeasesLeaseCostDetails">
        <link:definition>0000052 - Disclosure - Leases - Lease Cost (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesSupplementalCashFlowsDetails" roleURI="http://pubmatic.com/role/LeasesSupplementalCashFlowsDetails">
        <link:definition>0000053 - Disclosure - Leases - Supplemental Cash Flows (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesSupplementalBalanceSheetDetails" roleURI="http://pubmatic.com/role/LeasesSupplementalBalanceSheetDetails">
        <link:definition>0000054 - Disclosure - Leases - Supplemental Balance Sheet (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesLeaseMaturityDetails" roleURI="http://pubmatic.com/role/LeasesLeaseMaturityDetails">
        <link:definition>0000055 - Disclosure - Leases - Lease Maturity (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesLeaseMaturityDetails_1" roleURI="http://pubmatic.com/role/LeasesLeaseMaturityDetails_1">
        <link:definition>0000055 - Disclosure - Leases - Lease Maturity (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="BusinessCombinationDetails" roleURI="http://pubmatic.com/role/BusinessCombinationDetails">
        <link:definition>0000056 - Disclosure - Business Combination (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillandAcquisitionrelatedIntangibleAssetsNetGoodwillDetails" roleURI="http://pubmatic.com/role/GoodwillandAcquisitionrelatedIntangibleAssetsNetGoodwillDetails">
        <link:definition>0000057 - Disclosure - Goodwill and Acquisition-related Intangible Assets, Net - Goodwill (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillandAcquisitionrelatedIntangibleAssetsNetAcquisitionRelatedIntangibleAssetsNetDetails" roleURI="http://pubmatic.com/role/GoodwillandAcquisitionrelatedIntangibleAssetsNetAcquisitionRelatedIntangibleAssetsNetDetails">
        <link:definition>0000058 - Disclosure - Goodwill and Acquisition-related Intangible Assets, Net - Acquisition-Related Intangible Assets, Net (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillandAcquisitionrelatedIntangibleAssetsNetNarrativeDetails" roleURI="http://pubmatic.com/role/GoodwillandAcquisitionrelatedIntangibleAssetsNetNarrativeDetails">
        <link:definition>0000059 - Disclosure - Goodwill and Acquisition-related Intangible Assets, Net - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillandAcquisitionrelatedIntangibleAssetsNetEstimatedFutureAmortizationDetails" roleURI="http://pubmatic.com/role/GoodwillandAcquisitionrelatedIntangibleAssetsNetEstimatedFutureAmortizationDetails">
        <link:definition>0000060 - Disclosure - Goodwill and Acquisition-related Intangible Assets, Net - Estimated Future Amortization (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingenciesFutureMinimumCommitmentsDetails" roleURI="http://pubmatic.com/role/CommitmentsandContingenciesFutureMinimumCommitmentsDetails">
        <link:definition>0000061 - Disclosure - Commitments and Contingencies - Future Minimum Commitments (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingenciesNarrativeDetails" roleURI="http://pubmatic.com/role/CommitmentsandContingenciesNarrativeDetails">
        <link:definition>0000062 - Disclosure - Commitments and Contingencies - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockholdersEquityandEquityIncentivePlansNarrativeDetails" roleURI="http://pubmatic.com/role/StockholdersEquityandEquityIncentivePlansNarrativeDetails">
        <link:definition>0000063 - Disclosure - Stockholders&#8217; Equity and Equity Incentive Plans - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockholdersEquityandEquityIncentivePlansSummaryofStockOptionActivityandRelatedInformationDetails" roleURI="http://pubmatic.com/role/StockholdersEquityandEquityIncentivePlansSummaryofStockOptionActivityandRelatedInformationDetails">
        <link:definition>0000064 - Disclosure - Stockholders&#8217; Equity and Equity Incentive Plans - Summary of Stock Option Activity and Related Information (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockholdersEquityandEquityIncentivePlansWeightedAverageAssumptionsDetails" roleURI="http://pubmatic.com/role/StockholdersEquityandEquityIncentivePlansWeightedAverageAssumptionsDetails">
        <link:definition>0000065 - Disclosure - Stockholders&#8217; Equity and Equity Incentive Plans - Weighted-Average Assumptions (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockholdersEquityandEquityIncentivePlansSummaryofRestrictedStockUnitsandRelatedInformationDetails" roleURI="http://pubmatic.com/role/StockholdersEquityandEquityIncentivePlansSummaryofRestrictedStockUnitsandRelatedInformationDetails">
        <link:definition>0000066 - Disclosure - Stockholders&#8217; Equity and Equity Incentive Plans - Summary of Restricted Stock Units and Related Information (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockholdersEquityandEquityIncentivePlansStockbasedCompensationExpenseDetails" roleURI="http://pubmatic.com/role/StockholdersEquityandEquityIncentivePlansStockbasedCompensationExpenseDetails">
        <link:definition>0000067 - Disclosure - Stockholders&#8217; Equity and Equity Incentive Plans - Stock-based Compensation Expense (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="NetIncomePerShareAttributabletoCommonStockholdersBasicandDilutedNetIncomeperShareDetails" roleURI="http://pubmatic.com/role/NetIncomePerShareAttributabletoCommonStockholdersBasicandDilutedNetIncomeperShareDetails">
        <link:definition>0000068 - Disclosure - Net Income Per Share Attributable to Common Stockholders - Basic and Diluted Net Income per Share (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="NetIncomePerShareAttributabletoCommonStockholdersScheduleofAntidilutiveSecuritiesExcludedfromComputationofEarningsperShareDetails" roleURI="http://pubmatic.com/role/NetIncomePerShareAttributabletoCommonStockholdersScheduleofAntidilutiveSecuritiesExcludedfromComputationofEarningsperShareDetails">
        <link:definition>0000069 - Disclosure - Net Income Per Share Attributable to Common Stockholders - Schedule of Antidilutive Securities Excluded from Computation of Earnings per Share (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesIncomeBeforeProvisionforIncomeTaxesDetails" roleURI="http://pubmatic.com/role/IncomeTaxesIncomeBeforeProvisionforIncomeTaxesDetails">
        <link:definition>0000070 - Disclosure - Income Taxes - Income Before Provision for Income Taxes (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesProvisionforIncomeTaxesDetails" roleURI="http://pubmatic.com/role/IncomeTaxesProvisionforIncomeTaxesDetails">
        <link:definition>0000071 - Disclosure - Income Taxes - Provision for Income Taxes (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesEffectiveIncomeAfterTaxRateDetails" roleURI="http://pubmatic.com/role/IncomeTaxesEffectiveIncomeAfterTaxRateDetails">
        <link:definition>0000072 - Disclosure - Income Taxes - Effective Income After-Tax Rate (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesDeferredIncomeTaxAssetsLiabilitiesDetails" roleURI="http://pubmatic.com/role/IncomeTaxesDeferredIncomeTaxAssetsLiabilitiesDetails">
        <link:definition>0000073 - Disclosure - Income Taxes - Deferred Income Tax Assets (Liabilities) (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesNarrativeDetails" roleURI="http://pubmatic.com/role/IncomeTaxesNarrativeDetails">
        <link:definition>0000074 - Disclosure - Income Taxes - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesUnrecognizedIncomeTaxBenefitsDetails" roleURI="http://pubmatic.com/role/IncomeTaxesUnrecognizedIncomeTaxBenefitsDetails">
        <link:definition>0000075 - Disclosure - Income Taxes - Unrecognized Income Tax Benefits (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentReportingDetails" roleURI="http://pubmatic.com/role/SegmentReportingDetails">
        <link:definition>0000076 - Disclosure - Segment Reporting (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="A401kPlanNarrativeDetails" roleURI="http://pubmatic.com/role/A401kPlanNarrativeDetails">
        <link:definition>0000077 - Disclosure - 401(k) Plan - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SubsequentEventsDetails" roleURI="http://pubmatic.com/role/SubsequentEventsDetails">
        <link:definition>0000078 - Disclosure - Subsequent Events (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
    </xs:appinfo>
  </xs:annotation>
  <xs:element id="pubm_ShareBasedPaymentArrangementTaxBenefit" abstract="false" name="ShareBasedPaymentArrangementTaxBenefit" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_A2023RepurchaseProgramMember" abstract="true" name="A2023RepurchaseProgramMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_DeferredTaxLiabilitiesUnrealizedLossesOnEquityInvestment" abstract="false" name="DeferredTaxLiabilitiesUnrealizedLossesOnEquityInvestment" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_TechnologyAndDevelopmentCostsPolicyPolicyTextBlock" abstract="false" name="TechnologyAndDevelopmentCostsPolicyPolicyTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="pubm_LesseeOperatingAndFinanceLeaseLiabilityToBePaidYearThree" abstract="false" name="LesseeOperatingAndFinanceLeaseLiabilityToBePaidYearThree" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_NonCashLeaseExpense" abstract="false" name="NonCashLeaseExpense" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_ESPPMember" abstract="true" name="ESPPMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_ProceedsFromRepaymentsOfStockholdersNotesReceivable" abstract="false" name="ProceedsFromRepaymentsOfStockholdersNotesReceivable" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_DeferredTaxLiabilitiesRightOfUseAsset" abstract="false" name="DeferredTaxLiabilitiesRightOfUseAsset" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_OnePublisherMember" abstract="true" name="OnePublisherMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_FinanceLeaseAssetsAndLiabilitiesLesseeAbstract" abstract="true" name="FinanceLeaseAssetsAndLiabilitiesLesseeAbstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="pubm_ShareBasedCompensationArrangementByShareBasedPaymentAwardOfferingPeriod" abstract="false" name="ShareBasedCompensationArrangementByShareBasedPaymentAwardOfferingPeriod" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:durationItemType"/>
  <xs:element id="pubm_LeasesWeightedAverageDiscountRateAbstract" abstract="true" name="LeasesWeightedAverageDiscountRateAbstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="pubm_RestOfTheWorldMember" abstract="true" name="RestOfTheWorldMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_ShareBasedCompensationArrangementByShareBasedPaymentAwardPurchasePeriod" abstract="false" name="ShareBasedCompensationArrangementByShareBasedPaymentAwardPurchasePeriod" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:durationItemType"/>
  <xs:element id="pubm_IncrementalCommonSharesAttributableToRestrictedStock" abstract="false" name="IncrementalCommonSharesAttributableToRestrictedStock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:sharesItemType"/>
  <xs:element id="pubm_OperatingLeaseAssetsAndLiabilitiesLesseeAbstract" abstract="true" name="OperatingLeaseAssetsAndLiabilitiesLesseeAbstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="pubm_SiliconValleyBankMember" abstract="true" name="SiliconValleyBankMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_NumberOfDebtInstruments" abstract="false" name="NumberOfDebtInstruments" nillable="true" xbrli:periodType="instant" substitutionGroup="xbrli:item" type="xbrli:integerItemType"/>
  <xs:element id="pubm_PaymentsForCancelationOfStockOptions" abstract="false" name="PaymentsForCancelationOfStockOptions" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_TemporaryEquityStockIssuedDuringPeriodValueConversionOfConvertibleSecurities" abstract="false" name="TemporaryEquityStockIssuedDuringPeriodValueConversionOfConvertibleSecurities" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_ShareBasedCompensationArrangementByShareBasedPaymentAwardAmountWithheldForEmployeeStockPurchasePlan" abstract="false" name="ShareBasedCompensationArrangementByShareBasedPaymentAwardAmountWithheldForEmployeeStockPurchasePlan" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_EffectiveIncomeTaxRateReconciliationDeductionCoverEmployeesPercent" abstract="false" name="EffectiveIncomeTaxRateReconciliationDeductionCoverEmployeesPercent" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="pubm_AssetsAndLiabilitiesLesseeTableTextBlock" abstract="false" name="AssetsAndLiabilitiesLesseeTableTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="pubm_LesseeOperatingAndFinanceLeaseLiabilityToBePaidYearTwo" abstract="false" name="LesseeOperatingAndFinanceLeaseLiabilityToBePaidYearTwo" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_IncrementalCommonSharesAttributableToEmployeeStockPurchasePlanShares" abstract="false" name="IncrementalCommonSharesAttributableToEmployeeStockPurchasePlanShares" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:sharesItemType"/>
  <xs:element id="pubm_TemporaryEquityStockIssuedDuringPeriodSharesConversionOfConvertibleSecurities" abstract="false" name="TemporaryEquityStockIssuedDuringPeriodSharesConversionOfConvertibleSecurities" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:sharesItemType"/>
  <xs:element id="pubm_PropertyAndEquipmentIncludedInAccountsPayableAndAccruedExpenses" abstract="false" name="PropertyAndEquipmentIncludedInAccountsPayableAndAccruedExpenses" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_DeferredOfferingCostsIncurredDuringThePeriodIncludedInAccountsPayableAndAccruedExpenses" abstract="false" name="DeferredOfferingCostsIncurredDuringThePeriodIncludedInAccountsPayableAndAccruedExpenses" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_SecuredOvernightFinancingRateSOFRMember" abstract="true" name="SecuredOvernightFinancingRateSOFRMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_LesseeOperatingAndFinanceLeaseLiabilityUndiscountedExcessAmount" abstract="false" name="LesseeOperatingAndFinanceLeaseLiabilityUndiscountedExcessAmount" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_IrrevocableLettersOfCreditDueJuly2028Member" abstract="true" name="IrrevocableLettersOfCreditDueJuly2028Member" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_MartinMember" abstract="true" name="MartinMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_IncrementalCommonSharesAttributableToDilutiveEffectOfCallOptions" abstract="false" name="IncrementalCommonSharesAttributableToDilutiveEffectOfCallOptions" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:sharesItemType"/>
  <xs:element id="pubm_LesseeOperatingAndFinanceLeaseLiabilityToBePaidYearFour" abstract="false" name="LesseeOperatingAndFinanceLeaseLiabilityToBePaidYearFour" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_TotalOperatingAndFinanceLeasesAbstract" abstract="true" name="TotalOperatingAndFinanceLeasesAbstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="pubm_CreditAgreementMember" abstract="true" name="CreditAgreementMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_ShareBasedCompensationArrangementAutomaticAnnualIncreaseTerm" abstract="false" name="ShareBasedCompensationArrangementAutomaticAnnualIncreaseTerm" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:integerItemType"/>
  <xs:element id="pubm_StockBasedCompensationCapitalizedAsInternalUseSoftwareCosts" abstract="false" name="StockBasedCompensationCapitalizedAsInternalUseSoftwareCosts" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_RepaymentOfStockholdersNotesReceivableAndAccruedInterestAmount" abstract="false" name="RepaymentOfStockholdersNotesReceivableAndAccruedInterestAmount" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_DeferredTaxAssetsUnrealizedGainsOnEquityInvestment" abstract="false" name="DeferredTaxAssetsUnrealizedGainsOnEquityInvestment" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_BusinessCombinationAcquisitionCostsPaymentTerm" abstract="false" name="BusinessCombinationAcquisitionCostsPaymentTerm" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:durationItemType"/>
  <xs:element id="pubm_DeferredTaxAssetsLeaseObligation" abstract="false" name="DeferredTaxAssetsLeaseObligation" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_SwinglineSubFacilityMember" abstract="true" name="SwinglineSubFacilityMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_AlternateBaseRateMember" abstract="true" name="AlternateBaseRateMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_LesseeOperatingAndFinanceLeaseLiabilityToBePaidYearOne" abstract="false" name="LesseeOperatingAndFinanceLeaseLiabilityToBePaidYearOne" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_LesseeOperatingAndFinanceLeaseLiabilityToBePaid" abstract="false" name="LesseeOperatingAndFinanceLeaseLiabilityToBePaid" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_BuyerOneMember" abstract="true" name="BuyerOneMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_RepaymentOfStockholdersNotesReceivableAndAccruedInterestShares" abstract="false" name="RepaymentOfStockholdersNotesReceivableAndAccruedInterestShares" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:sharesItemType"/>
  <xs:element id="pubm_LesseeOperatingAndFinanceLeaseLiabilityToBePaidAfterYearFive" abstract="false" name="LesseeOperatingAndFinanceLeaseLiabilityToBePaidAfterYearFive" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_CashFlowLesseeAbstract" abstract="true" name="CashFlowLesseeAbstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="pubm_LineOfCreditFacilityBorrowingCapacityPercentageOfEligibleAccountsReceivableNet" abstract="false" name="LineOfCreditFacilityBorrowingCapacityPercentageOfEligibleAccountsReceivableNet" nillable="true" xbrli:periodType="instant" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="pubm_AuditorInformationAbstract" abstract="true" name="AuditorInformationAbstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="pubm_AdjustmentsToAdditionalPaidInCapitalIncreaseForRepaymentOfNotesReceivable" abstract="false" name="AdjustmentsToAdditionalPaidInCapitalIncreaseForRepaymentOfNotesReceivable" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_BuyerTwoMember" abstract="true" name="BuyerTwoMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_DeferredIncomeTaxExpenseBenefitExcludingNetDeferredTaxLiabilityFromAcquisition" abstract="false" name="DeferredIncomeTaxExpenseBenefitExcludingNetDeferredTaxLiabilityFromAcquisition" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_StockIssuedDuringPeriodSharesReclassification" abstract="false" name="StockIssuedDuringPeriodSharesReclassification" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:sharesItemType"/>
  <xs:element id="pubm_OperatingAndFinanceLeaseLiability" abstract="false" name="OperatingAndFinanceLeaseLiability" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_LineOfCreditFacilityAccordionFeatureIncreaseLimit" abstract="false" name="LineOfCreditFacilityAccordionFeatureIncreaseLimit" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_EffectiveIncomeTaxRateReconciliationTransferPricingReservePercent" abstract="false" name="EffectiveIncomeTaxRateReconciliationTransferPricingReservePercent" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="pubm_IrrevocableLettersOfCreditDueApril2025Member" abstract="true" name="IrrevocableLettersOfCreditDueApril2025Member" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_StockIssuedDuringPeriodValueReclassification" abstract="false" name="StockIssuedDuringPeriodValueReclassification" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_LesseeOperatingAndFinanceLeaseLiabilityToBePaidYearFive" abstract="false" name="LesseeOperatingAndFinanceLeaseLiabilityToBePaidYearFive" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_IrrevocableLettersOfCreditDueJuly2022Member" abstract="true" name="IrrevocableLettersOfCreditDueJuly2022Member" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_WeightedAverageRemainingLeaseTermAbstract" abstract="true" name="WeightedAverageRemainingLeaseTermAbstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="pubm_LesseeOperatingLeaseTermOfContractExtensionPeriod" abstract="false" name="LesseeOperatingLeaseTermOfContractExtensionPeriod" nillable="true" xbrli:periodType="instant" substitutionGroup="xbrli:item" type="xbrli:durationItemType"/>
  <xs:element id="pubm_RedeemableCommonStockMember" abstract="true" name="RedeemableCommonStockMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_BuyerThreeMember" abstract="true" name="BuyerThreeMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_RightOfUseAssetObtainedInExchangeForLeaseLiabilityAbstract" abstract="true" name="RightOfUseAssetObtainedInExchangeForLeaseLiabilityAbstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="pubm_ShareBasedPaymentArrangementExpenseNet" abstract="false" name="ShareBasedPaymentArrangementExpenseNet" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_LineOfCreditFacilityBorrowingCapacityUnusedCapacityFeeClosingBalanceThreshold" abstract="false" name="LineOfCreditFacilityBorrowingCapacityUnusedCapacityFeeClosingBalanceThreshold" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_IrrevocableLettersOfCreditDueJune2022Member" abstract="true" name="IrrevocableLettersOfCreditDueJune2022Member" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="pubm_NoncashOrPartNoncashAcquisitionIndemnificationClaimsHoldback" abstract="false" name="NoncashOrPartNoncashAcquisitionIndemnificationClaimsHoldback" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="pubm_CapitalizedComputerSoftwareFullyAmortizedCostsRemoved" abstract="false" name="CapitalizedComputerSoftwareFullyAmortizedCostsRemoved" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
</xs:schema>
