Google Ads Customers.shared Criteria API

The customers.sharedCriteria API from Google Ads — 1 operation(s) for customers.sharedcriteria.

Operations 1

POST /v25/customers/{customersId}/sharedCriteria:mutate Creates or removes shared criteria #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-ads-customers-sharedcriteria-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-ads-customers-sharedcriteria-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Ads Customers.shared Criteria API
  description: Manage your Google Ads accounts, campaigns, and reports with this API.
  version: v25
  x-discovery-revision: '20260721'
  contact:
    name: Google
    url: https://developers.google.com/google-ads/api/
  termsOfService: https://developers.google.com/terms
servers:
- url: https://googleads.googleapis.com
  description: Google Ads API production server
security:
- oauth2:
  - https://www.googleapis.com/auth/adwords
tags:
- name: customers.sharedCriteria
paths:
  /v25/customers/{customersId}/sharedCriteria:mutate:
    parameters:
    - name: upload_protocol
      in: query
      required: false
      schema:
        type: string
      description: Upload protocol for media (e.g. "raw", "multipart").
    - name: quotaUser
      in: query
      required: false
      schema:
        type: string
      description: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    - name: fields
      in: query
      required: false
      schema:
        type: string
      description: Selector specifying which fields to include in a partial response.
    - name: $.xgafv
      in: query
      required: false
      schema:
        type: string
        enum:
        - '1'
        - '2'
        x-enumDescriptions:
        - v1 error format
        - v2 error format
      description: V1 error format.
    - name: callback
      in: query
      required: false
      schema:
        type: string
      description: JSONP
    - name: prettyPrint
      in: query
      required: false
      schema:
        type: boolean
        default: 'true'
      description: Returns response with indentations and line breaks.
    - name: access_token
      in: query
      required: false
      schema:
        type: string
      description: OAuth access token.
    - name: uploadType
      in: query
      required: false
      schema:
        type: string
      description: Legacy upload protocol for media (e.g. "media", "multipart").
    - name: key
      in: query
      required: false
      schema:
        type: string
      description: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    - name: oauth_token
      in: query
      required: false
      schema:
        type: string
      description: OAuth 2.0 token for the current user.
    - name: alt
      in: query
      required: false
      schema:
        x-enumDescriptions:
        - Responses with Content-Type of application/json
        - Media download with context-dependent Content-Type
        - Responses with Content-Type of application/x-protobuf
        type: string
        default: json
        enum:
        - json
        - media
        - proto
      description: Data format for response.
    post:
      operationId: googleads_customers_sharedCriteria_mutate
      summary: Creates or removes shared criteria
      tags:
      - customers.sharedCriteria
      description: 'Creates or removes shared criteria. Operation statuses are returned. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [CriterionError]() [DatabaseError]() [DistinctError]() [FieldError]() [HeaderError]() [IdError]() [InternalError]() [MutateError]() [NotEmptyError]() [NullError]() [OperatorError]() [QuotaError]() [RangeError]() [RequestError]() [ResourceCountLimitExceededError]() [SizeLimitError]() [StringFormatError]() [StringLengthError]()'
      parameters:
      - name: customerId
        in: path
        required: true
        schema:
          pattern: ^[^/]+$
          type: string
        description: Required. The ID of the customer whose shared criteria are being modified.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAdsGoogleadsV25Services__MutateSharedCriteriaRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAdsGoogleadsV25Services__MutateSharedCriteriaResponse'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/adwords
components:
  schemas:
    GoogleAdsGoogleadsV25Services__SharedCriterionOperation:
      type: object
      properties:
        create:
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Resources__SharedCriterion'
          description: 'Create operation: No resource name is expected for the new shared criterion.'
        remove:
          type: string
          description: 'Remove operation: A resource name for the removed shared criterion is expected, in this format: `customers/{customer_id}/sharedCriteria/{shared_set_id}~{criterion_id}`'
      description: A single operation (create, remove) on an shared criterion.
    GoogleAdsGoogleadsV25Common__RetailTag:
      type: object
      properties:
        value:
          type: string
          description: The value of the tag. It can contain at most 50 characters. All Unicode characters except comma and newline are allowed. This field is required.
        expressionName:
          description: The name of the expression this tag belongs to. If empty, the tag is a top-level condition.
          type: string
      description: Represents a Retail Filter Tag.
    GoogleRpc__Status:
      description: 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).'
      type: object
      properties:
        message:
          description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
          type: string
        code:
          type: integer
          description: The status code, which should be an enum value of google.rpc.Code.
          format: int32
        details:
          type: array
          description: A list of messages that carry the error details. There is a common set of message types for APIs to use.
          items:
            type: object
            additionalProperties:
              description: Properties of the object. Contains field @type with type URL.
    GoogleAdsGoogleadsV25Common__RetailFilterExpression:
      type: object
      properties:
        name:
          description: The name of the expression. This name is used for grouping Retail Tags into one logical expression with OR operator. The name can contain at most 20 characters. Only lowercase latin letters, underscores, and numbers are allowed. This field is required and must be unique within the shared set.
          type: string
      description: Represents a Retail Filter Expression. Tags grouped within an expression are joined with OR operator. A product needs to have any of these tags to satisfy expression condition.
    GoogleAdsGoogleadsV25Common__PlacementInfo:
      description: A placement criterion. This can be used to modify bids for sites when targeting the content network.
      type: object
      properties:
        url:
          type: string
          description: URL of the placement. For example, "http://www.domain.com".
    GoogleAdsGoogleadsV25Common__MobileApplicationInfo:
      type: object
      properties:
        appId:
          description: A string that uniquely identifies a mobile application to Google Ads API. The format of this string is "{platform}-{platform_native_id}", where platform is "1" for iOS apps and "2" for Android apps, and where platform_native_id is the mobile application identifier native to the corresponding platform. For iOS, this native identifier is the 9 digit string that appears at the end of an App Store URL (for example, "476943146" for "Flood-It! 2" whose App Store link is "http://itunes.apple.com/us/app/flood-it!-2/id476943146"). For Android, this native identifier is the application's package name (for example, "com.labpixies.colordrips" for "Color Drips" given Google Play link "https://play.google.com/store/apps/details?id=com.labpixies.colordrips"). A well formed app id for Google Ads API would thus be "1-476943146" for iOS and "2-com.labpixies.colordrips" for Android. This field is required and must be set in CREATE operations.
          type: string
        name:
          description: Name of this mobile application.
          type: string
      description: A mobile application criterion.
    GoogleAdsGoogleadsV25Services__MutateSharedCriteriaRequest:
      description: Request message for SharedCriterionService.MutateSharedCriteria.
      type: object
      properties:
        partialFailure:
          type: boolean
          description: If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. Default is false.
        validateOnly:
          description: If true, the request is validated but not executed. Only errors are returned, not results.
          type: boolean
        responseContentType:
          description: The response content type setting. Determines whether the mutable resource or just the resource name should be returned post mutation.
          type: string
          x-enumDescriptions:
          - Not specified. Will return the resource name only in the response.
          - The mutate response will be the resource name.
          - The mutate response will contain the resource name and the resource with mutable fields if possible. Otherwise, only the resource name will be returned.
          enum:
          - UNSPECIFIED
          - RESOURCE_NAME_ONLY
          - MUTABLE_RESOURCE
        operations:
          description: Required. The list of operations to perform on individual shared criteria.
          items:
            $ref: '#/components/schemas/GoogleAdsGoogleadsV25Services__SharedCriterionOperation'
          type: array
    GoogleAdsGoogleadsV25Common__WebpageSampleInfo:
      type: object
      properties:
        sampleUrls:
          type: array
          description: Webpage sample urls
          items:
            type: string
      description: List of sample urls that match the website target
    GoogleAdsGoogleadsV25Common__KeywordInfo:
      type: object
      properties:
        text:
          type: string
          description: The text of the keyword (at most 80 characters and 10 words).
        matchType:
          x-enumDescriptions:
          - Not specified.
          - Used for return value only. Represents value unknown in this version.
          - Exact match.
          - Phrase match.
          - Broad match.
          enum:
          - UNSPECIFIED
          - UNKNOWN
          - EXACT
          - PHRASE
          - BROAD
          type: string
          description: The match type of the keyword.
      description: A keyword criterion.
    GoogleAdsGoogleadsV25Common__WebpageConditionInfo:
      type: object
      properties:
        operator:
          type: string
          description: Operator of webpage targeting condition.
          x-enumDescriptions:
          - Not specified.
          - Used for return value only. Represents value unknown in this version.
          - The argument web condition is equal to the compared web condition.
          - The argument web condition is part of the compared web condition.
          enum:
          - UNSPECIFIED
          - UNKNOWN
          - EQUALS
          - CONTAINS
        operand:
          x-enumDescriptions:
          - Not specified.
          - Used for return value only. Represents value unknown in this version.
          - Operand denoting a webpage URL targeting condition.
          - Operand denoting a webpage category targeting condition.
          - Operand denoting a webpage title targeting condition.
          - Operand denoting a webpage content targeting condition.
          - Operand denoting a webpage custom label targeting condition.
          enum:
          - UNSPECIFIED
          - UNKNOWN
          - URL
          - CATEGORY
          - PAGE_TITLE
          - PAGE_CONTENT
          - CUSTOM_LABEL
          description: Operand of webpage targeting condition.
          type: string
        argument:
          description: Argument of webpage targeting condition.
          type: string
      description: Logical expression for targeting webpages of an advertiser's website.
    GoogleAdsGoogleadsV25Common__YouTubeVideoInfo:
      description: A YouTube Video criterion.
      type: object
      properties:
        videoId:
          type: string
          description: YouTube video id as it appears on the YouTube watch page.
    GoogleAdsGoogleadsV25Common__RetailFilter:
      type: object
      properties:
        expression:
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__RetailFilterExpression'
          description: An expression node. At this time, this can only be an OR node.
        tag:
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__RetailTag'
          description: A tag node.
      description: Represents a Retail Filter.
    GoogleAdsGoogleadsV25Services__MutateSharedCriteriaResponse:
      type: object
      properties:
        partialFailureError:
          $ref: '#/components/schemas/GoogleRpc__Status'
          description: Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (for example, auth errors), we return an RPC level error.
        results:
          description: All results for the mutate.
          items:
            $ref: '#/components/schemas/GoogleAdsGoogleadsV25Services__MutateSharedCriterionResult'
          type: array
      description: Response message for a shared criterion mutate.
    GoogleAdsGoogleadsV25Resources__SharedCriterion:
      type: object
      properties:
        youtubeChannel:
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__YouTubeChannelInfo'
          description: Immutable. YouTube Channel.
        criterionId:
          format: int64
          type: string
          description: Output only. The ID of the criterion. This field is ignored for mutates.
        sharedSet:
          description: Immutable. The shared set to which the shared criterion belongs.
          type: string
        mobileAppCategory:
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__MobileAppCategoryInfo'
          description: Immutable. Mobile App Category.
        brand:
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__BrandInfo'
          description: Immutable. Brand.
        youtubeVideo:
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__YouTubeVideoInfo'
          description: Immutable. YouTube Video.
        retailFilter:
          description: Immutable. Retail Filter.
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__RetailFilter'
        verticalAdsItemGroupRule:
          description: Immutable. Vertical ads item group rule.
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__VerticalAdsItemGroupRuleInfo'
        webpage:
          description: Immutable. Webpage.
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__WebpageInfo'
        negative:
          description: Immutable. If true, the criterion is excluded. If false, the criterion is targeted.
          type: boolean
        resourceName:
          description: 'Immutable. The resource name of the shared criterion. Shared set resource names have the form: `customers/{customer_id}/sharedCriteria/{shared_set_id}~{criterion_id}`'
          type: string
        placement:
          description: Immutable. Placement.
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__PlacementInfo'
        type:
          description: Output only. The type of the criterion.
          type: string
          enum:
          - UNSPECIFIED
          - UNKNOWN
          - KEYWORD
          - PLACEMENT
          - MOBILE_APP_CATEGORY
          - MOBILE_APPLICATION
          - DEVICE
          - LOCATION
          - LISTING_GROUP
          - AD_SCHEDULE
          - AGE_RANGE
          - GENDER
          - INCOME_RANGE
          - PARENTAL_STATUS
          - YOUTUBE_VIDEO
          - YOUTUBE_CHANNEL
          - USER_LIST
          - PROXIMITY
          - TOPIC
          - LISTING_SCOPE
          - LANGUAGE
          - IP_BLOCK
          - CONTENT_LABEL
          - CARRIER
          - USER_INTEREST
          - WEBPAGE
          - OPERATING_SYSTEM_VERSION
          - APP_PAYMENT_MODEL
          - MOBILE_DEVICE
          - CUSTOM_AFFINITY
          - CUSTOM_INTENT
          - LOCATION_GROUP
          - CUSTOM_AUDIENCE
          - COMBINED_AUDIENCE
          - KEYWORD_THEME
          - AUDIENCE
          - NEGATIVE_KEYWORD_LIST
          - LOCAL_SERVICE_ID
          - SEARCH_THEME
          - BRAND
          - BRAND_LIST
          - LIFE_EVENT
          - WEBPAGE_LIST
          - VIDEO_LINEUP
          - PLACEMENT_LIST
          - VERTICAL_ADS_ITEM_GROUP_RULE_LIST
          - VERTICAL_ADS_ITEM_GROUP_RULE
          - RETAIL_FILTER_BUNDLE
          - RETAIL_FILTER
          x-enumDescriptions:
          - Not specified.
          - Used for return value only. Represents value unknown in this version.
          - Keyword, for example, 'mars cruise'.
          - Placement, also known as Website, for example, 'www.flowers4sale.com'
          - Mobile application categories to target.
          - Mobile applications to target.
          - Devices to target.
          - Locations to target.
          - Listing groups to target.
          - Ad Schedule.
          - Age range.
          - Gender.
          - Income Range.
          - Parental status.
          - YouTube Video.
          - YouTube Channel.
          - User list.
          - Proximity.
          - A topic target on the display network (for example, "Pets & Animals").
          - Listing scope to target.
          - Language.
          - IpBlock.
          - Content Label for category exclusion.
          - Carrier.
          - A category the user is interested in.
          - Webpage criterion for dynamic search ads.
          - Operating system version.
          - App payment model.
          - Mobile device.
          - Custom affinity.
          - Custom intent.
          - Location group.
          - Custom audience
          - Combined audience
          - Smart Campaign keyword theme
          - Audience
          - Negative Keyword List
          - Local Services Ads Service ID.
          - Search Theme.
          - Brand
          - Brand List
          - Life Event
          - Webpage List
          - Video lineup
          - Placement List
          - A list of rules for item groups in Vertical Ads.
          - A rule for an item group in Vertical Ads.
          - Retail Filter Bundle for linking a retail filter shared set to an ad group.
          - Retail Filter for defining individual tag rules or expressions within a shared set.
        keyword:
          description: Immutable. Keyword.
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__KeywordInfo'
        mobileApplication:
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__MobileApplicationInfo'
          description: Immutable. Mobile application.
      description: A criterion belonging to a shared set.
    GoogleAdsGoogleadsV25Common__WebpageInfo:
      type: object
      properties:
        criterionName:
          description: The name of the criterion that is defined by this parameter. The name value will be used for identifying, sorting and filtering criteria with this type of parameters. This field is required for CREATE operations and is prohibited on UPDATE operations.
          type: string
        coveragePercentage:
          description: Website criteria coverage percentage. This is the computed percentage of website coverage based on the website target, negative website target and negative keywords in the ad group and campaign. For instance, when coverage returns as 1, it indicates it has 100% coverage. This field is read-only.
          type: number
          format: double
        conditions:
          description: Conditions, or logical expressions, for webpage targeting. The list of webpage targeting conditions are and-ed together when evaluated for targeting. An empty list of conditions indicates all pages of the campaign's website are targeted. This field is required for CREATE operations and is prohibited on UPDATE operations.
          items:
            $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__WebpageConditionInfo'
          type: array
        sample:
          description: List of sample urls that match the website target. This field is read-only.
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Common__WebpageSampleInfo'
      description: Represents a criterion for targeting webpages of an advertiser's website.
    GoogleAdsGoogleadsV25Common__VerticalAdsItemGroupRuleInfo:
      description: A criterion to represent a single item group rule in Vertical Ads.
      type: object
      properties:
        itemCode:
          type: string
          description: The id specifying a particular Vertical Ad listing.
        hotelClass:
          format: int64
          description: Integer value specifying the class rating for a hotel. Ranges from 1 to 5 stars.
          type: string
        venue:
          type: string
          description: A name for a specific location, like the venue for a concert event.
        countryCriterionId:
          type: string
          description: The resource name of the Geo Target Constant for the country.
        userRating:
          format: int64
          description: Integer value specifying the user rating for a Vertical Ad listing. Ranges from 1 to 5, where 5 is the best.
          type: string
        eventParticipantDisplayName:
          type: string
          description: The name of an associated participant for a given event. For example, headliner for a concert event.
        cityCriterionId:
          description: The resource name of the Geo Target Constant for the city.
          type: string
        regionCriterionId:
          type: string
          description: The resource name of the Geo Target Constant for the region.
    GoogleAdsGoogleadsV25Services__MutateSharedCriterionResult:
      type: object
      properties:
        sharedCriterion:
          description: The mutated shared criterion with only mutable fields after mutate. The field will only be returned when response_content_type is set to "MUTABLE_RESOURCE".
          $ref: '#/components/schemas/GoogleAdsGoogleadsV25Resources__SharedCriterion'
        resourceName:
          type: string
          description: Returned for successful operations.
      description: The result for the shared criterion mutate.
    GoogleAdsGoogleadsV25Common__YouTubeChannelInfo:
      type: object
      properties:
        channelId:
          type: string
          description: The YouTube uploader channel id or the channel code of a YouTube channel.
      description: A YouTube Channel criterion.
    GoogleAdsGoogleadsV25Common__MobileAppCategoryInfo:
      description: A mobile app category criterion.
      type: object
      properties:
        mobileAppCategoryConstant:
          type: string
          description: The mobile app category constant resource name.
    GoogleAdsGoogleadsV25Common__BrandInfo:
      description: Represents a Brand Criterion used for targeting based on commercial knowledge graph.
      type: object
      properties:
        entityId:
          type: string
          description: The Commercial KG MID for the brand.
        status:
          description: Output only. The status of a brand.
          type: string
          enum:
          - UNSPECIFIED
          - UNKNOWN
          - ENABLED
          - DEPRECATED
          - UNVERIFIED
          - APPROVED
          - CANCELLED
          - REJECTED
          x-enumDescriptions:
          - No value has been specified.
          - Used for return value only. Represents value unknown in this version.
          - Brand is verified and globally available for selection
          - Brand was globally available in past but is no longer a valid brand (based on business criteria)
          - Brand is unverified and customer scoped, but can be selected by customer (only who requested for same) for targeting
          - Was a customer-scoped (unverified) brand, which got approved by business and added to the global list. Its assigned CKG MID should be used instead of this
          - Was a customer-scoped (unverified) brand, but the request was canceled by customer and this brand id is no longer valid
          - Was a customer-scoped (unverified) brand, but the request was rejected by internal business team and this brand id is no longer valid
        rejectionReason:
          description: Output only. The rejection reason when a brand status is REJECTED.
          type: string
          enum:
          - UNSPECIFIED
          - UNKNOWN
          - EXISTING_BRAND
          - EXISTING_BRAND_VARIANT
          - INCORRECT_INFORMATION
          - NOT_A_BRAND
          x-enumDescriptions:
          - No value has been specified.
          - Used for return value only. Represents value unknown in this version.
          - Brand is already present in the commercial brand set.
          - Brand is already present in the commercial brand set, but is a variant.
          - 'Brand information is not correct (eg: URL and name don''t match).'
          - Not a valid brand as per Google policy.
        primaryUrl:
          type: string
          description: Output only. The primary url of a brand.
        displayName:
          description: Output only. A text representation of a brand.
          type: string
  securitySchemes:
    oauth2:
      type: oauth2
      description: Google OAuth 2.0. Google Ads API additionally requires a developer token in the developer-token header.
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/adwords: See, edit, create, and delete your Google Ads accounts and data.
externalDocs:
  url: https://developers.google.com/google-ads/api/
x-source: https://googleads.googleapis.com/$discovery/rest?version=v25
x-generated-by: API Evangelist enrichment pipeline — mechanical conversion of the first-party Google API Discovery Document