{
  "openapi": "3.1.0",
  "info": {
    "title": "MartechList API",
    "version": "1.0",
    "description": "Read-only access to a directory of marketing technology (Martech) products and editor-reviewed guides. Unknown values are null and listed in unknown_fields. Third-party ratings are labelled as snapshots. has_pricing_page only means a pricing page exists. Commercial relationships (affiliate, sponsored) are flagged and never affect ranking. Please link to the url field when citing.",
    "termsOfService": "https://martechlist.org/terms#api",
    "contact": {
      "url": "https://martechlist.org/contact"
    }
  },
  "servers": [
    {
      "url": "https://martechlist.org"
    }
  ],
  "paths": {
    "/api/v1/search": {
      "get": {
        "operationId": "searchProducts",
        "summary": "Search and filter products",
        "description": "Full-text search over product names, descriptions, categories and editorial summaries. Without q, lists products in the chosen sort order. If no product matches every word, results match any word and query.relaxed_match is true.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 120
            },
            "description": "Free text, e.g. \"email automation for ecommerce\". Product names match first."
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Main category or subcategory slug from /api/v1/categories."
          },
          {
            "name": "subcategory",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Subcategory slug, e.g. \"email-marketing\"."
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Headquarters country, exact English name, e.g. \"Germany\"."
          },
          {
            "name": "min_rating",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "3",
                "3.5",
                "4",
                "4.5",
                "rated"
              ]
            },
            "description": "Minimum G2 rating (third-party snapshot). \"rated\" = has any rating."
          },
          {
            "name": "size",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "small",
                "medium",
                "large",
                "enterprise"
              ]
            },
            "description": "small: 1–50 people; medium: 51–200 people; large: 201–1,000 people; enterprise: 1,001+ people"
          },
          {
            "name": "has_pricing_page",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Only products with a collected pricing page."
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "relevance",
                "popular",
                "rating",
                "reviews",
                "newest",
                "name"
              ]
            },
            "description": "Default: relevance with q, popular without."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "next_cursor from the previous page."
          },
          {
            "name": "facets",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "subcategory"
              ]
            },
            "description": "Include counts of matching products per subcategory."
          }
        ],
        "responses": {
          "200": {
            "description": "Matching products",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "total",
                    "next_cursor",
                    "query",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductSummary"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass as cursor to get the next page. Null on the last page."
                    },
                    "query": {
                      "type": "object"
                    },
                    "suggested_categories": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "facets": {
                      "type": "object"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse"
          },
          "429": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/products/{slug}": {
      "get": {
        "operationId": "getProduct",
        "summary": "Full product record with provenance",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Product slug (e.g. \"mailchimp\") or stable id (e.g. \"vdr_00010869\"). Old slugs resolve to the current product.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Product",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Product"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/compare": {
      "get": {
        "operationId": "compareProducts",
        "summary": "Compare 2–5 products field by field",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated slugs or ids."
          }
        ],
        "responses": {
          "200": {
            "description": "Comparison",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Product"
                      }
                    },
                    "comparison": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/categories": {
      "get": {
        "operationId": "listCategories",
        "summary": "Category tree with product counts and valid country names",
        "responses": {
          "200": {
            "description": "Categories"
          }
        }
      }
    },
    "/api/v1/guides": {
      "get": {
        "operationId": "listGuides",
        "summary": "Published editorial guides",
        "responses": {
          "200": {
            "description": "Guides"
          }
        }
      }
    },
    "/api/v1/guides/{slug}": {
      "get": {
        "operationId": "getGuide",
        "summary": "A guide with ranked picks, rationale, evidence levels and sources",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Guide"
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse"
          },
          "410": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "ErrorResponse": {
        "description": "Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Meta": {
        "type": "object",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "status": {
                "type": "integer"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "CategoryRef": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ProductSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier. Never changes."
          },
          "slug": {
            "type": "string",
            "description": "URL slug. May change; old slugs redirect."
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "MartechList page. Link here when citing."
          },
          "website_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Official vendor website."
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short vendor-provided description."
          },
          "category": {
            "$ref": "#/components/schemas/CategoryRef"
          },
          "subcategory": {
            "$ref": "#/components/schemas/CategoryRef"
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "Headquarters country."
          },
          "founded_year": {
            "type": [
              "integer",
              "null"
            ]
          },
          "employee_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "g2_rating": {
            "type": [
              "number",
              "null"
            ],
            "description": "G2 rating 0–5 from the Spring 2026 snapshot. Not a MartechList score."
          },
          "g2_review_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "has_pricing_page": {
            "type": "boolean",
            "description": "A pricing page was found. Says nothing about price."
          },
          "editorial_reviewed": {
            "type": "boolean",
            "description": "True if a MartechList editor has reviewed this product."
          },
          "match": {
            "type": "array",
            "description": "Why this result matched the query.",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "exact",
                    "prefix",
                    "term"
                  ]
                },
                "terms": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "Product": {
        "type": "object",
        "description": "Every fact group carries its source. Values we do not know are null and named in unknown_fields.",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "markdown_url": {
            "type": "string"
          },
          "description": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "text": {
                "type": "string"
              },
              "source": {
                "type": "string"
              },
              "evidence_level": {
                "type": "string",
                "enum": [
                  "vendor_claim"
                ]
              },
              "fetched_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "company": {
            "type": "object"
          },
          "third_party_signals": {
            "type": "object"
          },
          "pricing": {
            "type": "object"
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "editorial": {
            "type": "object",
            "description": "status is \"reviewed\" or \"not_reviewed\". Capabilities carry evidence_level: vendor_claim, verified or tested."
          },
          "guides": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "alternatives": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "commercial": {
            "type": "object",
            "properties": {
              "affiliate": {
                "type": "boolean"
              },
              "sponsored": {
                "type": "boolean"
              }
            }
          },
          "quality": {
            "type": "object"
          },
          "provenance": {
            "type": "object"
          },
          "unknown_fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "citation": {
            "type": "object"
          }
        }
      }
    }
  }
}