{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain Trademark Watch — OEPM BOPI New Filings & Conflicts",
    "description": "Official OEPM BOPI feed of new Spanish trademark and trade-name applications, plus watch: phonetic and spelling similarity, Nice class overlap and opposition deadline. Schedule weekdays with onlyNew and pay only for new filings or conflicts. Companies only, persons redacted.",
    "version": "0.1",
    "x-build-id": "qUzCEswtehl0P5XNM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/icarodata~spain-trademark-watch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-icarodata-spain-trademark-watch",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/icarodata~spain-trademark-watch/runs": {
      "post": {
        "operationId": "runs-sync-icarodata-spain-trademark-watch",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/icarodata~spain-trademark-watch/run-sync": {
      "post": {
        "operationId": "run-sync-icarodata-spain-trademark-watch",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "feed",
              "watch"
            ],
            "type": "string",
            "description": "<b>feed</b>: every new Spanish trademark / trade-name application published in the BOPI for the dates and filters you choose (billed per application). <b>watch</b>: compare new applications with YOUR marks and return only possible conflicts with a similarity score and explanation (billed per conflict found).",
            "default": "feed"
          },
          "watchMarks": {
            "title": "Marks to watch (watch mode)",
            "type": "array",
            "description": "Your / your clients' marks. Each item: name (required), niceClasses (array of numbers), clientRef (your reference, optional), owner (the holder's company name: their own new filings are ignored, optional)."
          },
          "watchMarksSimple": {
            "title": "Marks to watch — simple list (watch mode)",
            "type": "array",
            "description": "Alternative to the JSON list, one mark per line: <code>NAME | Nice classes | client reference | owner</code>. Example: <code>MAHOU | 32, 33 | cliente-17</code>. Only the name is required.",
            "items": {
              "type": "string"
            }
          },
          "similarityThreshold": {
            "title": "Minimum conflict score (0-100)",
            "minimum": 50,
            "maximum": 100,
            "type": "integer",
            "description": "Only conflicts with a score at or above this value are returned. 80 is a good balance; use 75 for a wider net or 88 for only strong matches.",
            "default": 80
          },
          "classScope": {
            "title": "Nice class comparison",
            "enum": [
              "related",
              "same",
              "any"
            ],
            "type": "string",
            "description": "<b>related</b> (recommended): same or commercially related Nice classes (e.g. 25 clothing ↔ 18 leather goods ↔ 35 retail). <b>same</b>: only identical classes. <b>any</b>: report similar names in any class (scored lower when classes differ).",
            "default": "related"
          },
          "dateFrom": {
            "title": "BOPI publication date from",
            "type": "string",
            "description": "YYYY-MM-DD. Leave empty to use the latest published BOPI (or 'Days back'). The BOPI is published on Spanish working days."
          },
          "dateTo": {
            "title": "BOPI publication date to",
            "type": "string",
            "description": "YYYY-MM-DD. Leave empty for the latest published BOPI. Maximum range 93 days per run."
          },
          "daysBack": {
            "title": "Days back (if no 'date from')",
            "minimum": 0,
            "maximum": 93,
            "type": "integer",
            "description": "Number of calendar days to cover, ending at the latest BOPI. For a daily schedule use 3 together with 'Only new' so holidays and weekends never leave gaps.",
            "default": 1
          },
          "onlyNew": {
            "title": "Only new (skip what earlier runs already delivered)",
            "type": "boolean",
            "description": "Remembers delivered applications / conflicts in a named key-value store, so scheduled runs only return and bill what is new. State is kept per configuration for 150 days.",
            "default": false
          },
          "niceClasses": {
            "title": "Nice classes (feed mode)",
            "type": "array",
            "description": "Only applications that include at least one of these Nice classes (1-45). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (feed mode)",
            "type": "array",
            "description": "Only applications whose mark name, applicant company or goods/services contain any of these words (accents and case ignored).",
            "items": {
              "type": "string"
            }
          },
          "applicantType": {
            "title": "Applicant type",
            "enum": [
              "any",
              "company",
              "natural_person"
            ],
            "type": "string",
            "description": "<b>company</b>: only applications filed by companies and other organisations (useful for B2B prospecting). Natural persons' names are always redacted.",
            "default": "any"
          },
          "kinds": {
            "title": "Kinds",
            "type": "array",
            "description": "trademark = Marca (M), trade_name = Nombre comercial (N).",
            "items": {
              "type": "string",
              "enum": [
                "trademark",
                "trade_name"
              ],
              "enumTitles": [
                "Trademark (marca)",
                "Trade name (nombre comercial)"
              ]
            },
            "default": [
              "trademark",
              "trade_name"
            ]
          },
          "markTypes": {
            "title": "Mark types (feed mode)",
            "type": "array",
            "description": "Empty = all. word = denominativa, figurative = figurativa / mixta.",
            "items": {
              "type": "string",
              "enum": [
                "word",
                "figurative",
                "three_dimensional",
                "sound",
                "position",
                "pattern",
                "colour",
                "motion",
                "hologram",
                "multimedia",
                "other"
              ]
            }
          },
          "provinces": {
            "title": "Applicant provinces (feed mode)",
            "type": "array",
            "description": "Only company applicants located in these Spanish provinces, e.g. MADRID, BARCELONA, VALENCIA.",
            "items": {
              "type": "string"
            }
          },
          "includeGoodsAndServices": {
            "title": "Include goods & services text",
            "type": "boolean",
            "description": "Adds the full list of goods/services per class. Turn off for smaller rows.",
            "default": true
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many applications (feed) or conflicts (watch). 0 = no limit.",
            "default": 0
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}