{
  "openapi": "3.1.0",
  "info": {
    "title": "gimmeproxy API",
    "version": "2.0.0",
    "summary": "Free rotating proxy API: one random, verified public proxy per request.",
    "description": "One GET returns one random public proxy that carried a real HTTPS request within the last 60 minutes. Every call draws again from the verified pool, which is the rotation; a later call can return the same proxy. 50 requests per IP per day need no key. The proxies are public open proxies: shared, sometimes slow, and able to go offline at any time. gimmeproxy hands out addresses and does not carry your traffic.",
    "termsOfService": "https://gimmeproxy.com/terms",
    "contact": { "name": "gimmeproxy support", "url": "https://gimmeproxy.com/contact" }
  },
  "externalDocs": { "description": "API reference with recipes", "url": "https://gimmeproxy.com/docs" },
  "servers": [{ "url": "https://gimmeproxy.com" }],
  "paths": {
    "/api/getProxy": {
      "get": {
        "operationId": "getProxy",
        "summary": "Get one random verified proxy",
        "description": "Returns one random proxy that matches every filter. Only the first value of a repeated parameter is used. When nothing matches, the answer is still HTTP 200, with an error body.",
        "parameters": [
          { "name": "country", "in": "query", "description": "Only these countries: ISO 3166-1 alpha-2 codes, comma-separated.", "schema": { "type": "string" }, "example": "US,DE" },
          { "name": "notCountry", "in": "query", "description": "Not these countries: ISO codes, comma-separated.", "schema": { "type": "string" }, "example": "CN" },
          { "name": "protocol", "in": "query", "description": "The proxy protocol. http proxies tunnel with CONNECT.", "schema": { "type": "string", "enum": ["http", "socks4", "socks5"] } },
          { "name": "port", "in": "query", "description": "An exact port.", "schema": { "type": "integer", "minimum": 1, "maximum": 65535 }, "example": 8080 },
          { "name": "minSpeed", "in": "query", "description": "Minimum measured download speed in KB/s.", "schema": { "type": "number" }, "example": 100 },
          { "name": "maxCheckPeriod", "in": "query", "description": "Only proxies verified at most this many seconds ago.", "schema": { "type": "integer", "default": 3600 }, "example": 600 },
          { "name": "anonymityLevel", "in": "query", "description": "1: the destination saw the proxy's address, not ours. 0: the proxy passed our address on.", "schema": { "type": "integer", "enum": [0, 1] } },
          { "name": "websites", "in": "query", "description": "Only proxies that reached this website in our test. Needs a paid api_key.", "schema": { "type": "string", "enum": ["example", "google", "amazon", "yelp"] } },
          { "name": "get", "in": "query", "description": "Capability filter; only the value true applies it.", "schema": { "type": "string", "enum": ["true"] } },
          { "name": "post", "in": "query", "description": "Capability filter; only the value true applies it.", "schema": { "type": "string", "enum": ["true"] } },
          { "name": "cookies", "in": "query", "description": "Capability filter; only the value true applies it.", "schema": { "type": "string", "enum": ["true"] } },
          { "name": "referer", "in": "query", "description": "Capability filter; only the value true applies it.", "schema": { "type": "string", "enum": ["true"] } },
          { "name": "user-agent", "in": "query", "description": "Capability filter; only the value true applies it.", "schema": { "type": "string", "enum": ["true"] } },
          { "name": "supportsHttps", "in": "query", "description": "Capability filter; only the value true applies it.", "schema": { "type": "string", "enum": ["true"] } },
          { "name": "curl", "in": "query", "description": "Any non-empty value (true by convention): the body is only protocol://ip:port as plain text.", "schema": { "type": "string" }, "example": "true" },
          { "name": "ipPort", "in": "query", "description": "Any non-empty value (true by convention): the body is only ip:port as plain text.", "schema": { "type": "string" }, "example": "true" },
          { "name": "api_key", "in": "query", "description": "A paid key: the plan's limits apply instead of the free allowance.", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": {
            "description": "A proxy, or an error body when nothing matches. Requests without a key carry Rate-Limit-Total, Rate-Limit-Remaining and Rate-Limit-Reset; requests with a key carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset.",
            "content": {
              "application/json": { "schema": { "oneOf": [{ "$ref": "#/components/schemas/Proxy" }, { "$ref": "#/components/schemas/Error" }] } },
              "text/html": { "schema": { "type": "string", "description": "With curl=true or ipPort=true: the address alone, as text." }, "example": "http://192.0.2.24:8080" }
            }
          },
          "401": { "description": "Malformed or unknown api_key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "403": { "description": "The key's subscription is not active, or the websites filter was used without a key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "429": { "description": "The free allowance, the plan's quota or its requests per second are used up.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "503": { "description": "API keys are not enabled on this server.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Proxy": {
        "type": "object",
        "properties": {
          "supportsHttps": { "type": "boolean" },
          "protocol": { "type": "string", "enum": ["http", "socks4", "socks5"] },
          "ip": { "type": "string", "format": "ipv4" },
          "port": { "type": "string", "description": "The port, as a string." },
          "get": { "type": "boolean" },
          "post": { "type": "boolean" },
          "cookies": { "type": "boolean" },
          "referer": { "type": "boolean" },
          "user-agent": { "type": "boolean" },
          "anonymityLevel": { "type": "integer", "enum": [0, 1] },
          "websites": { "type": "object", "description": "Whether the proxy reached each website in our test.", "additionalProperties": { "type": "boolean" } },
          "country": { "type": ["string", "null"], "description": "ISO code of the country the proxy's traffic comes out of; null when unknown." },
          "unixTimestampMs": { "type": "integer", "description": "When the proxy was last verified, in milliseconds." },
          "unixTimestamp": { "type": "integer", "description": "When the proxy was last verified, in seconds." },
          "tsChecked": { "type": "integer", "description": "Same as unixTimestamp." },
          "curl": { "type": "string", "description": "protocol://ip:port, ready for curl -x." },
          "ipPort": { "type": "string" },
          "type": { "type": "string", "description": "Same as protocol." },
          "speed": { "type": "number", "description": "Measured download speed in KB/s." },
          "otherProtocols": { "type": "object" },
          "verifiedSecondsAgo": { "type": "integer", "description": "Seconds since the proxy last passed the check." }
        },
        "example": { "supportsHttps": true, "protocol": "http", "ip": "192.0.2.24", "port": "8080", "get": true, "post": true, "cookies": true, "referer": true, "user-agent": true, "anonymityLevel": 1, "websites": { "example": true, "google": false, "amazon": false, "yelp": false }, "country": "US", "unixTimestampMs": 1795650179724, "unixTimestamp": 1795650179, "tsChecked": 1795650179, "curl": "http://192.0.2.24:8080", "ipPort": "192.0.2.24:8080", "type": "http", "speed": 15.45, "otherProtocols": {}, "verifiedSecondsAgo": 240 }
      },
      "Error": {
        "type": "object",
        "required": ["error"],
        "properties": { "error": { "type": "string" } },
        "example": { "error": "no more proxies left" }
      }
    }
  }
}