{
  "openapi": "3.1.0",
  "x-zeroclick-navigation": {
    "fullSpec": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/openapi.json",
    "services": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/services",
    "serviceSpecTemplate": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/services/{slug}/openapi.json",
    "searchTemplate": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/openapi.json?q={text}",
    "operationTemplate": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/openapi.json?path={path}&method={method}",
    "firstPage": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/openapi.json?page=1",
    "instructions": [
      "Use this spec if it contains the operation and details you need. Otherwise, search or open a relevant service spec using the links below.",
      "Find service slugs in x-zeroclick-services or x-payment-info.rates[].service; use them in serviceSpecTemplate, never as request values.",
      "URL-encode template values. Search is ranked; service, path, and method filters are exact. Filters combine.",
      "Pages contain up to 10 operations; follow info.x-next or the Link header if you need more results. Shared operations retain all selector values."
    ]
  },
  "info": {
    "title": "Affiliate.com",
    "version": "1.0.0",
    "description": "Product catalog search across all Affiliate.com merchants. Search and retrieve products with structured queries, and look up the merchants behind the catalog. This server is a pay-per-use, transparent proxy in front of Affiliate.com's own API: it handles identity, payment, and proxying. Agents can purchase autonomously or with their human's approval. The complete verified paid surface is listed at /openapi.json, the source of truth for available operations. Each operation here carries its live price in x-payment-info. Use the operations and details here when they meet your needs. Filtered specs contain only matching operations; if you cannot find what you need here, use search or the service catalog. The live catalog at /manifest.json is authoritative for prices and any free included units (prices[].includedUnits) - some meters include free usage per account before any charge, reserved for agents claimed by a human with a verified email.",
    "x-guidance": "This is a filtered API reference. Request and response schemas are preserved. Shared operations retain selector values and prices for all their services; service slugs are pricing labels, never request values. If this spec lacks what you need, use the navigation links to search or open a relevant service spec."
  },
  "x-service-info": {
    "docs": {
      "homepage": "https://www.affiliate.com",
      "apiReference": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/openapi.json",
      "llms": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/llms.txt"
    }
  },
  "externalDocs": {
    "url": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/llms-full.txt",
    "description": "How to authenticate, pay, and call this API; links the upstream API reference."
  },
  "servers": [
    {
      "url": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4",
      "description": "Pay-per-use access to Affiliate.com's API"
    }
  ],
  "security": [
    {
      "payPerUse": []
    }
  ],
  "components": {
    "securitySchemes": {
      "payPerUse": {
        "type": "apiKey",
        "in": "header",
        "name": "x-payment",
        "description": "Pay-per-use access. An unpaid call returns 402 Payment Required with a signed challenge; settle it with a supported payment method (x402 or MPP today) and retry with the proof in this header (x402) or as an authorization bearer credential (MPP). No upstream API key is needed, and an agent without a payment method can set one up instantly at no cost."
      }
    }
  },
  "paths": {
    "/v1/products": {
      "post": {
        "x-zeroclick-services": [
          "product-search"
        ],
        "summary": "Search affiliate products",
        "description": "Search more than one billion affiliate products refreshed daily. Pass a plain search string or an array of field filters, or use the structured query rule builder for compound conditions. Results carry pricing, availability, commission URLs, and network and merchant attribution, with support for field selection, pagination, sorting, facets, and per network affiliate link configuration.",
        "parameters": [
          {
            "in": "header",
            "name": "X-End-User-Id",
            "schema": {
              "type": "string"
            },
            "example": "user-8421",
            "required": false,
            "description": "Attribute this request to a specific end user."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "search"
                ],
                "properties": {
                  "page": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "Page number to return."
                  },
                  "after": {
                    "type": "string",
                    "description": "Cursor token for pagination beyond 10000 results, returned as meta.after in a previous response."
                  },
                  "query": {
                    "type": "object",
                    "properties": {
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "conditions_operator",
                            "conditions"
                          ],
                          "properties": {
                            "conditions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "field",
                                  "operator",
                                  "value"
                                ],
                                "properties": {
                                  "field": {
                                    "type": "string",
                                    "description": "Product field to match."
                                  },
                                  "value": {
                                    "description": "Value to match."
                                  },
                                  "operator": {
                                    "type": "string",
                                    "description": "Comparison operator."
                                  }
                                }
                              }
                            },
                            "conditions_operator": {
                              "enum": [
                                "any",
                                "all"
                              ],
                              "type": "string",
                              "description": "How the conditions inside this rule combine."
                            }
                          }
                        }
                      },
                      "rules_operator": {
                        "enum": [
                          "any",
                          "all"
                        ],
                        "type": "string",
                        "description": "How rules combine. any means OR and all means AND. Defaults to all."
                      }
                    },
                    "description": "Structured rule based query builder for compound conditions. Mutually exclusive with search."
                  },
                  "facets": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Facet aggregations to include with the results, up to 20. Supports dot notation, for example merchant.product_count."
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Product fields to include in the response. All fields are returned when omitted."
                  },
                  "search": {
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "Free text search across product fields."
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "field",
                            "operator",
                            "value"
                          ],
                          "properties": {
                            "field": {
                              "type": "string",
                              "example": "name",
                              "description": "Product field to filter on. Common fields are any, name, brand, category, barcode, final_price, on_sale, availability, merchant.id, and merchant.name."
                            },
                            "value": {
                              "example": "wireless headphones",
                              "description": "Value to match against the field."
                            },
                            "operator": {
                              "type": "string",
                              "example": "LIKE",
                              "description": "Comparison operator supported by the field. Text fields accept =, !=, LIKE, and NOT LIKE. Numeric fields accept =, !=, >, <, >=, and <=."
                            }
                          }
                        },
                        "description": "Filter objects that are combined with AND."
                      }
                    ],
                    "example": "wireless headphones",
                    "description": "Search criteria. Pass a plain string for a broad match across product fields, or an array of filter objects for precise matching. Mutually exclusive with query."
                  },
                  "pool_id": {
                    "type": "string",
                    "description": "ULID of a pool that combines networks and merchants."
                  },
                  "sort_by": {
                    "enum": [
                      "relevance",
                      "id",
                      "barcode",
                      "name",
                      "description",
                      "commission_url",
                      "direct_url",
                      "image_url",
                      "currency",
                      "regular_price",
                      "final_price",
                      "on_sale",
                      "sale_discount",
                      "availability",
                      "stock_quantity",
                      "sku",
                      "brand",
                      "category",
                      "network",
                      "merchant",
                      "updated_at",
                      "started_at"
                    ],
                    "type": "string",
                    "description": "Field to sort results by."
                  },
                  "networks": {
                    "type": "object",
                    "description": "Per network configuration keyed by network id, each entry carrying affiliate_id and an optional sub_id. When provided, commission URLs are populated with your affiliate credentials.",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "sub_id": {
                          "type": "string",
                          "description": "Optional sub id for campaign tracking."
                        },
                        "affiliate_id": {
                          "type": "string",
                          "description": "Your affiliate id on this network."
                        }
                      }
                    }
                  },
                  "per_page": {
                    "type": "integer",
                    "default": 100,
                    "minimum": 1,
                    "description": "Number of results per page."
                  },
                  "sort_order": {
                    "enum": [
                      "asc",
                      "desc"
                    ],
                    "type": "string",
                    "description": "Sort direction."
                  },
                  "balanced_mix": {
                    "type": "object",
                    "description": "Round robin interleaving of results with optional weighting. Incompatible with duplicate_fields_to_exclude."
                  },
                  "click_tracking": {
                    "type": "boolean",
                    "default": false,
                    "description": "Replace the sub id with a click_id for consolidated reporting."
                  },
                  "duplicate_fields_to_exclude": {
                    "type": "string",
                    "description": "Collapse results that share the same value for this field. Incompatible with balanced_mix."
                  }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            {
              "mpp": {
                "method": "tempo",
                "intent": "charge",
                "currency": "USD"
              }
            },
            {
              "x402": {
                "network": "eip155:8453",
                "scheme": "exact",
                "currency": "USDC"
              }
            }
          ],
          "offers": [
            {
              "amount": "20000",
              "currency": "0x20C000000000000000000000b9537d11c60E8b50",
              "description": "$0.020000 per request (requests, service product-search)",
              "intent": "charge",
              "method": "tempo"
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "rates": [
            {
              "service": "product-search",
              "meter": "requests",
              "unit": "request",
              "unitSize": 1,
              "priceUsd": "0.020000",
              "includedUnits": 0
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique product identifier."
                          },
                          "sku": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "barcode": {
                            "type": "string",
                            "description": "UPC, EAN, ISBN, or GTIN."
                          },
                          "network": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "description": "Affiliate network attribution."
                          },
                          "on_sale": {
                            "type": "boolean"
                          },
                          "added_at": {
                            "type": "string",
                            "description": "UTC timestamp when the product was added."
                          },
                          "category": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string",
                            "description": "ISO 4217 currency code."
                          },
                          "merchant": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "name": {
                                "type": "string"
                              },
                              "canonical_id": {
                                "type": "string"
                              },
                              "canonical_name": {
                                "type": "string"
                              }
                            }
                          },
                          "image_url": {
                            "type": "string",
                            "description": "Primary image URL."
                          },
                          "direct_url": {
                            "type": "string",
                            "description": "Direct product link."
                          },
                          "updated_at": {
                            "type": "string",
                            "description": "UTC timestamp of the last refresh."
                          },
                          "description": {
                            "type": "string"
                          },
                          "final_price": {
                            "type": "number",
                            "description": "Current price after discounts."
                          },
                          "availability": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "InStock, OutOfStock, or null when unknown."
                          },
                          "regular_price": {
                            "type": "number",
                            "description": "Original retail price."
                          },
                          "sale_discount": {
                            "type": "number"
                          },
                          "commission_url": {
                            "type": "string",
                            "description": "Affiliate link. Contains placeholder tokens for the affiliate id and sub id unless network credentials were provided in the request."
                          },
                          "stock_quantity": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "commissionable_status": {
                            "type": "string",
                            "description": "One of commissionable, assumed_commissionable, or not_commissionable."
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "to": {
                          "type": "integer"
                        },
                        "from": {
                          "type": "integer"
                        },
                        "after": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Cursor for deep pagination."
                        },
                        "total": {
                          "type": "integer",
                          "description": "Total number of matching products."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "sort_by": {
                          "type": "string"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Request trace id for support."
                        },
                        "last_page": {
                          "type": "integer"
                        },
                        "sort_order": {
                          "type": "string"
                        },
                        "current_page": {
                          "type": "integer"
                        }
                      }
                    },
                    "facets": {
                      "type": "object",
                      "description": "Aggregated statistics for the requested facets."
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          }
        }
      }
    }
  },
  "x-zeroclick-navigation-footer": {
    "instructions": [
      "Use this spec if it contains the operation and details you need. Otherwise, search or open a relevant service spec using the links below.",
      "Find service slugs in x-zeroclick-services or x-payment-info.rates[].service; use them in serviceSpecTemplate, never as request values.",
      "URL-encode template values. Search is ranked; service, path, and method filters are exact. Filters combine.",
      "Pages contain up to 10 operations; follow info.x-next or the Link header if you need more results. Shared operations retain all selector values."
    ],
    "fullSpec": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/openapi.json",
    "services": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/services",
    "serviceSpecTemplate": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/services/{slug}/openapi.json",
    "searchTemplate": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/openapi.json?q={text}",
    "operationTemplate": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/openapi.json?path={path}&method={method}",
    "firstPage": "https://zeroclick.affiliate.com/zcj/n09siuvceyf4/openapi.json?page=1"
  }
}
