{
  "openapi": "3.1.0",
  "info": {
    "title": "Fitcoin: actions for AI assistants",
    "version": "1.0.0",
    "description": "Fitcoin (FITCOIN LTD, UK) is a fitness rewards app for iOS and Android. The endpoints give public data from fitcoin.co: UK gym prices by branch (PureGym, The Gym Group, JD Gyms and others), the apps that pay you to walk in each country as compared on fitcoin.co, and the app download links. Read-only; no member data.\n\nThe same tools are registered in the page through WebMCP. Human-readable notes: https://www.fitcoin.co/for-ai-assistants",
    "contact": {
      "name": "Fitcoin",
      "email": "hello@fitcoin.co",
      "url": "https://www.fitcoin.co/for-ai-assistants"
    }
  },
  "servers": [
    {
      "url": "https://www.fitcoin.co"
    }
  ],
  "externalDocs": {
    "description": "For AI assistants",
    "url": "https://www.fitcoin.co/for-ai-assistants"
  },
  "tags": [
    {
      "name": "Read",
      "description": "Read-only data. No personal data."
    },
    {
      "name": "Datasets",
      "description": "Whole datasets as static JSON (CSV alongside). Free to use and show to users with a link to the page named in each."
    }
  ],
  "paths": {
    "/api/agent/gyms": {
      "get": {
        "operationId": "search_uk_gyms",
        "summary": "UK gym prices by branch",
        "description": "UK budget gym branches with monthly prices, joining fee, day pass and current offer, checked daily from the chains' own pages (PureGym, The Gym Group, JD Gyms and others). Search near a UK postcode (nearest first) or by name, filter by chain or maximum monthly price.",
        "tags": [
          "Read"
        ],
        "responses": {
          "200": {
            "description": "Success. JSON with ok: true.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input. The message says which field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Retry-After header gives seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "required": false,
            "description": "UK postcode or outcode to search near, e.g. 'M1 1AE'.",
            "schema": {
              "type": "string",
              "maxLength": 10
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Town or branch name, e.g. 'Leeds'.",
            "schema": {
              "type": "string",
              "maxLength": 60
            }
          },
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "description": "Chain id, e.g. puregym, the-gym-group, jd-gyms.",
            "schema": {
              "type": "string",
              "maxLength": 30
            }
          },
          {
            "name": "max_monthly_gbp",
            "in": "query",
            "required": false,
            "description": "Only branches whose cheapest monthly price is at or below this.",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return (default 10).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25
            }
          }
        ]
      }
    },
    "/api/agent/pay-to-walk": {
      "get": {
        "operationId": "pay_to_walk_apps",
        "summary": "Apps that pay you to walk, by country",
        "description": "The comparison tables from fitcoin.co's guide to apps that pay you to walk in one country: which apps work there, what they pay, thresholds and catches. Countries: uk (United Kingdom), usa (United States), canada (Canada), australia (Australia), germany (Germany), netherlands (Netherlands), india (India), philippines (Philippines), singapore (Singapore), south-africa (South Africa), uae (United Arab Emirates), paypal (Apps that pay to PayPal (any country)). Fitcoin makes one of the apps compared.",
        "tags": [
          "Read"
        ],
        "responses": {
          "200": {
            "description": "Success. JSON with ok: true.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input. The message says which field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Retry-After header gives seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Country key (default uk).",
            "schema": {
              "type": "string",
              "enum": [
                "uk",
                "usa",
                "canada",
                "australia",
                "germany",
                "netherlands",
                "india",
                "philippines",
                "singapore",
                "south-africa",
                "uae",
                "paypal"
              ]
            }
          }
        ]
      }
    },
    "/api/agent/app": {
      "get": {
        "operationId": "fitcoin_app_info",
        "summary": "Fitcoin app: what it is and download links",
        "description": "What the Fitcoin app does, who makes it, the price, and the App Store and Google Play download links.",
        "tags": [
          "Read"
        ],
        "responses": {
          "200": {
            "description": "Success. JSON with ok: true.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input. The message says which field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Retry-After header gives seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": []
      }
    },
    "/api/agent/datasets": {
      "get": {
        "operationId": "list_datasets",
        "summary": "List this site's datasets",
        "description": "Every dataset Fitcoin publishes (JSON and CSV), with what it holds, row count, date updated and links. Free to use and show to users with a link to the page named.",
        "tags": [
          "Read"
        ],
        "responses": {
          "200": {
            "description": "Success. JSON with ok: true.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input. The message says which field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Retry-After header gives seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": []
      }
    },
    "/api/agent/dataset": {
      "get": {
        "operationId": "get_dataset",
        "summary": "Get a dataset",
        "description": "Pull one of Fitcoin's datasets by name (see list_datasets): metadata, units, sources, licence and rows. Use offset and limit to page through big ones (up to 500 rows a call), or download the JSON/CSV file directly.",
        "tags": [
          "Read"
        ],
        "responses": {
          "200": {
            "description": "Success. JSON with ok: true.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input. The message says which field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Retry-After header gives seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "description": "Dataset name from list_datasets.",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "First row to return (default 0).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows to return (default 200).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ]
      }
    },
    "/data/uk-gym-prices.json": {
      "get": {
        "operationId": "dataset_uk_gym_prices",
        "summary": "UK budget gym prices by branch",
        "description": "Every branch of the main UK budget gym chains with location, cheapest monthly price, standard monthly price, joining fee, day pass and current offer, read daily from each chain's own pages. 826 rows, updated 2026-12-03. CSV: https://www.fitcoin.co/data/uk-gym-prices.csv. Free to use and to show to your users, with a link to https://www.fitcoin.co/articles/cheapest-gym-near-me.",
        "tags": [
          "Datasets"
        ],
        "responses": {
          "200": {
            "description": "The whole dataset: metadata plus rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updated": {
                      "type": "string"
                    },
                    "licence": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/data/apps-that-pay-you-to-walk.json": {
      "get": {
        "operationId": "dataset_apps_that_pay_you_to_walk",
        "summary": "Apps that pay you to walk, by country",
        "description": "The comparison tables from fitcoin.co's guides to apps that pay you to walk in each country: what each app pays, thresholds and catches. Fitcoin makes one of the apps compared. 176 rows, updated 2026-12-03. CSV: https://www.fitcoin.co/data/apps-that-pay-you-to-walk.csv. Free to use and to show to your users, with a link to https://www.fitcoin.co/articles/apps-that-pay-you-to-walk.",
        "tags": [
          "Datasets"
        ],
        "responses": {
          "200": {
            "description": "The whole dataset: metadata plus rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updated": {
                      "type": "string"
                    },
                    "licence": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/data/articles.json": {
      "get": {
        "operationId": "dataset_articles",
        "summary": "Article index",
        "description": "Every indexed article on fitcoin.co: title, link, summary and the date it was last updated. 339 rows, updated 2026-12-03. CSV: https://www.fitcoin.co/data/articles.csv. Free to use and to show to your users, with a link to https://www.fitcoin.co/blog.",
        "tags": [
          "Datasets"
        ],
        "responses": {
          "200": {
            "description": "The whole dataset: metadata plus rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updated": {
                      "type": "string"
                    },
                    "licence": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/data/index.json": {
      "get": {
        "operationId": "list_dataset_files",
        "summary": "Every dataset on this site",
        "description": "Names, descriptions, dates and JSON/CSV links for each dataset.",
        "tags": [
          "Datasets"
        ],
        "responses": {
          "200": {
            "description": "Dataset index",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string",
            "description": "Machine-readable code, e.g. invalid_input, invalid_postcode, consent_required, rate_limited."
          },
          "message": {
            "type": "string",
            "description": "Plain-English explanation to pass on."
          }
        },
        "required": [
          "ok",
          "error",
          "message"
        ]
      }
    }
  }
}