A partir del
8 de septiembre de 2025, cada elemento de la línea nuevo deberá declarar si publicará anuncios políticos de la Unión Europea (UE). Las cargas de la API de Display & Video 360 y del SDF que no proporcionen declaraciones fallarán. Consulta nuestra
página de bajas para obtener más detalles sobre cómo actualizar tu integración y realizar esta declaración.
Method: advertisers.negativeKeywordLists.negativeKeywords.replace
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Reemplaza todas las palabras clave negativas en una sola lista de palabras clave negativas.
La operación reemplazará las palabras clave de una lista de palabras clave negativas por las palabras clave proporcionadas en ReplaceNegativeKeywordsRequest.new_negative_keywords
.
Solicitud HTTP
POST https://displayvideo.googleapis.com/v4/advertisers/{advertiserId}/negativeKeywordLists/{negativeKeywordListId}/negativeKeywords:replace
La URL usa la sintaxis de la transcodificación gRPC.
Parámetros de ruta de acceso
Parámetros |
advertiserId |
string (int64 format)
Obligatorio. Es el ID del anunciante de DV360 al que pertenece la lista de palabras clave negativas superior.
|
negativeKeywordListId |
string (int64 format)
Obligatorio. Es el ID de la lista de palabras clave negativas superior a la que pertenecen las palabras clave negativas.
|
Cuerpo de la solicitud
El cuerpo de la solicitud contiene datos con la siguiente estructura:
Representación JSON |
{
"newNegativeKeywords": [
{
object (NegativeKeyword )
}
]
} |
Campos |
newNegativeKeywords[] |
object (NegativeKeyword )
Las palabras clave negativas que reemplazarán las palabras clave existentes en la lista de palabras clave negativas, especificadas como una lista de NegativeKeywords .
|
Cuerpo de la respuesta
Mensaje de respuesta para NegativeKeywordService.ReplaceNegativeKeywords.
Si se ejecuta correctamente, el cuerpo de la respuesta contendrá datos con la siguiente estructura:
Representación JSON |
{
"negativeKeywords": [
{
object (NegativeKeyword )
}
]
} |
Campos |
negativeKeywords[] |
object (NegativeKeyword )
La lista completa de palabras clave negativas ahora se encuentra en la lista de palabras clave negativas.
|
Permisos de autorización
Requiere el siguiente alcance de OAuth:
https://www.googleapis.com/auth/display-video
Para obtener más información, consulta OAuth 2.0 Overview.
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-25 (UTC)
[null,null,["Última actualización: 2025-07-25 (UTC)"],[],["The Display & Video 360 API v4 allows replacing all negative keywords in a list using a POST request to a specific URL. This action requires the `advertiserId` and `negativeKeywordListId` as path parameters. The request body should include a JSON array of `newNegativeKeywords`, which will replace the existing ones. Upon successful execution, the response body returns a JSON array containing the complete, updated list of `negativeKeywords`. Authorization requires the `https://www.googleapis.com/auth/display-video` OAuth scope.\n"],null,["# Method: advertisers.negativeKeywordLists.negativeKeywords.replace\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ReplaceNegativeKeywordsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReplaces all negative keywords in a single negative keyword list.\n\nThe operation will replace the keywords in a negative keyword list with keywords provided in [ReplaceNegativeKeywordsRequest.new_negative_keywords](/display-video/api/reference/rest/v4/advertisers.negativeKeywordLists.negativeKeywords/replace#body.request_body.FIELDS.new_negative_keywords).\n\n### HTTP request\n\n`POST https://displayvideo.googleapis.com/v4/advertisers/{advertiserId}/negativeKeywordLists/{negativeKeywordListId}/negativeKeywords:replace`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `advertiserId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The ID of the DV360 advertiser to which the parent negative keyword list belongs. |\n| `negativeKeywordListId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The ID of the parent negative keyword list to which the negative keywords belong. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"newNegativeKeywords\": [ { object (/display-video/api/reference/rest/v4/advertisers.negativeKeywordLists.negativeKeywords#NegativeKeyword) } ] } ``` |\n\n| Fields ||\n|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `newNegativeKeywords[]` | `object (`[NegativeKeyword](/display-video/api/reference/rest/v4/advertisers.negativeKeywordLists.negativeKeywords#NegativeKeyword)`)` The negative keywords that will replace the existing keywords in the negative keyword list, specified as a list of [NegativeKeywords](/display-video/api/reference/rest/v4/advertisers.negativeKeywordLists.negativeKeywords#NegativeKeyword). |\n\n### Response body\n\nResponse message for NegativeKeywordService.ReplaceNegativeKeywords.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"negativeKeywords\": [ { object (/display-video/api/reference/rest/v4/advertisers.negativeKeywordLists.negativeKeywords#NegativeKeyword) } ] } ``` |\n\n| Fields ||\n|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `negativeKeywords[]` | `object (`[NegativeKeyword](/display-video/api/reference/rest/v4/advertisers.negativeKeywordLists.negativeKeywords#NegativeKeyword)`)` The full list of negative keywords now present in the negative keyword list. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/display-video`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]