{
  "x402Version": 2,
  "id": 38853,
  "slug": "38853",
  "resource": "https://api.magentlab.com/api/calc/rome_iii_ibs",
  "description": "Longstreth 2006 Rome III IBS. rome_iii_ibs is true iff pain or discomfort at least 3 days per month in the last 3 months, onset at least 6 months prior, and at least two of: improvement with defecation, change in stool frequency, and change in stool form. supporting_features_met is 0-3. Caller assigns five flags. magent does not examine the patient. Not a diagnosis, not Rome IV, not IBS subtype.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "items": [
              {
                "improvement_with_defecation": true,
                "onset_change_stool_form": false,
                "onset_change_stool_frequency": true,
                "pain_or_discomfort_3_days_per_month_last_3_months": true,
                "symptom_onset_at_least_6_months_prior": true
              },
              {
                "improvement_with_defecation": true,
                "onset_change_stool_form": false,
                "onset_change_stool_frequency": true,
                "pain_or_discomfort_3_days_per_month_last_3_months": true,
                "symptom_onset_at_least_6_months_prior": true
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "citation": {
                  "authors": "Longstreth GF, Thompson WG, Chey WD, Houghton LA, Mearin F, Spiller RC",
                  "doi": "10.1053/j.gastro.2005.11.061",
                  "id": "longstreth-2006",
                  "pmid": "16678561",
                  "source": "Gastroenterology. 2006;130(5):1480-1491",
                  "title": "Functional bowel disorders"
                },
                "criteria": [
                  {
                    "factor": "pain_or_discomfort_3_days_per_month_last_3_months",
                    "met": true
                  },
                  {
                    "factor": "symptom_onset_at_least_6_months_prior",
                    "met": true
                  },
                  {
                    "factor": "improvement_with_defecation",
                    "met": true
                  },
                  {
                    "factor": "onset_change_stool_frequency",
                    "met": true
                  },
                  {
                    "factor": "onset_change_stool_form",
                    "met": false
                  },
                  {
                    "factor": "supporting_features_ge_2",
                    "met": true,
                    "value": 2
                  }
                ],
                "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
                "formula": "rome_iii_ibs",
                "formula_expression": "rome_iii_ibs iff pain_or_discomfort_3_days_per_month_last_3_months and symptom_onset_at_least_6_months_prior and supporting_features_met >= 2; supporting_features_met counts improvement_with_defecation, onset_change_stool_frequency, and onset_change_stool_form (Longstreth 2006 Rome III IBS diagnostic criteria)",
                "rome_iii_ibs": true,
                "supporting_features_met": 2
              },
              {
                "citation": {
                  "authors": "Longstreth GF, Thompson WG, Chey WD, Houghton LA, Mearin F, Spiller RC",
                  "doi": "10.1053/j.gastro.2005.11.061",
                  "id": "longstreth-2006",
                  "pmid": "16678561",
                  "source": "Gastroenterology. 2006;130(5):1480-1491",
                  "title": "Functional bowel disorders"
                },
                "criteria": [
                  {
                    "factor": "pain_or_discomfort_3_days_per_month_last_3_months",
                    "met": true
                  },
                  {
                    "factor": "symptom_onset_at_least_6_months_prior",
                    "met": true
                  },
                  {
                    "factor": "improvement_with_defecation",
                    "met": true
                  },
                  {
                    "factor": "onset_change_stool_frequency",
                    "met": true
                  },
                  {
                    "factor": "onset_change_stool_form",
                    "met": false
                  },
                  {
                    "factor": "supporting_features_ge_2",
                    "met": true,
                    "value": 2
                  }
                ],
                "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
                "formula": "rome_iii_ibs",
                "formula_expression": "rome_iii_ibs iff pain_or_discomfort_3_days_per_month_last_3_months and symptom_onset_at_least_6_months_prior and supporting_features_met >= 2; supporting_features_met counts improvement_with_defecation, onset_change_stool_frequency, and onset_change_stool_form (Longstreth 2006 Rome III IBS diagnostic criteria)",
                "rome_iii_ibs": true,
                "supporting_features_met": 2
              }
            ],
            "path": "/api/calc/rome_iii_ibs"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "improvement_with_defecation": {
                          "description": "Improvement with defecation (one of three supporting features; at least two required). true or false as assigned by the caller.",
                          "type": "boolean"
                        },
                        "onset_change_stool_form": {
                          "description": "Onset associated with a change in form (appearance) of stool (one of three supporting features; at least two required). true or false as assigned by the caller.",
                          "type": "boolean"
                        },
                        "onset_change_stool_frequency": {
                          "description": "Onset associated with a change in frequency of stool (one of three supporting features; at least two required). true or false as assigned by the caller.",
                          "type": "boolean"
                        },
                        "pain_or_discomfort_3_days_per_month_last_3_months": {
                          "description": "Recurrent abdominal pain or discomfort at least 3 days per month in the last 3 months (Longstreth 2006). true or false as assigned by the caller. magent does not examine the patient.",
                          "type": "boolean"
                        },
                        "symptom_onset_at_least_6_months_prior": {
                          "description": "Symptom onset at least 6 months prior to diagnosis, as assigned (Longstreth 2006). true or false as assigned by the caller. magent does not take a history.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "pain_or_discomfort_3_days_per_month_last_3_months",
                        "symptom_onset_at_least_6_months_prior",
                        "improvement_with_defecation",
                        "onset_change_stool_frequency",
                        "onset_change_stool_form"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "rome-iii-ibs",
    "ibs",
    "gi",
    "functional-bowel",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T12:52:06.613Z",
  "quality": {
    "calls30d": 6,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T12:52:06.44Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "improvement_with_defecation": true,
                  "onset_change_stool_form": false,
                  "onset_change_stool_frequency": true,
                  "pain_or_discomfort_3_days_per_month_last_3_months": true,
                  "symptom_onset_at_least_6_months_prior": true
                },
                {
                  "improvement_with_defecation": true,
                  "onset_change_stool_form": false,
                  "onset_change_stool_frequency": true,
                  "pain_or_discomfort_3_days_per_month_last_3_months": true,
                  "symptom_onset_at_least_6_months_prior": true
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "citation": {
                    "authors": "Longstreth GF, Thompson WG, Chey WD, Houghton LA, Mearin F, Spiller RC",
                    "doi": "10.1053/j.gastro.2005.11.061",
                    "id": "longstreth-2006",
                    "pmid": "16678561",
                    "source": "Gastroenterology. 2006;130(5):1480-1491",
                    "title": "Functional bowel disorders"
                  },
                  "criteria": [
                    {
                      "factor": "pain_or_discomfort_3_days_per_month_last_3_months",
                      "met": true
                    },
                    {
                      "factor": "symptom_onset_at_least_6_months_prior",
                      "met": true
                    },
                    {
                      "factor": "improvement_with_defecation",
                      "met": true
                    },
                    {
                      "factor": "onset_change_stool_frequency",
                      "met": true
                    },
                    {
                      "factor": "onset_change_stool_form",
                      "met": false
                    },
                    {
                      "factor": "supporting_features_ge_2",
                      "met": true,
                      "value": 2
                    }
                  ],
                  "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
                  "formula": "rome_iii_ibs",
                  "formula_expression": "rome_iii_ibs iff pain_or_discomfort_3_days_per_month_last_3_months and symptom_onset_at_least_6_months_prior and supporting_features_met >= 2; supporting_features_met counts improvement_with_defecation, onset_change_stool_frequency, and onset_change_stool_form (Longstreth 2006 Rome III IBS diagnostic criteria)",
                  "rome_iii_ibs": true,
                  "supporting_features_met": 2
                },
                {
                  "citation": {
                    "authors": "Longstreth GF, Thompson WG, Chey WD, Houghton LA, Mearin F, Spiller RC",
                    "doi": "10.1053/j.gastro.2005.11.061",
                    "id": "longstreth-2006",
                    "pmid": "16678561",
                    "source": "Gastroenterology. 2006;130(5):1480-1491",
                    "title": "Functional bowel disorders"
                  },
                  "criteria": [
                    {
                      "factor": "pain_or_discomfort_3_days_per_month_last_3_months",
                      "met": true
                    },
                    {
                      "factor": "symptom_onset_at_least_6_months_prior",
                      "met": true
                    },
                    {
                      "factor": "improvement_with_defecation",
                      "met": true
                    },
                    {
                      "factor": "onset_change_stool_frequency",
                      "met": true
                    },
                    {
                      "factor": "onset_change_stool_form",
                      "met": false
                    },
                    {
                      "factor": "supporting_features_ge_2",
                      "met": true,
                      "value": 2
                    }
                  ],
                  "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
                  "formula": "rome_iii_ibs",
                  "formula_expression": "rome_iii_ibs iff pain_or_discomfort_3_days_per_month_last_3_months and symptom_onset_at_least_6_months_prior and supporting_features_met >= 2; supporting_features_met counts improvement_with_defecation, onset_change_stool_frequency, and onset_change_stool_form (Longstreth 2006 Rome III IBS diagnostic criteria)",
                  "rome_iii_ibs": true,
                  "supporting_features_met": 2
                }
              ],
              "path": "/api/calc/rome_iii_ibs"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "improvement_with_defecation": {
                            "description": "Improvement with defecation (one of three supporting features; at least two required). true or false as assigned by the caller.",
                            "type": "boolean"
                          },
                          "onset_change_stool_form": {
                            "description": "Onset associated with a change in form (appearance) of stool (one of three supporting features; at least two required). true or false as assigned by the caller.",
                            "type": "boolean"
                          },
                          "onset_change_stool_frequency": {
                            "description": "Onset associated with a change in frequency of stool (one of three supporting features; at least two required). true or false as assigned by the caller.",
                            "type": "boolean"
                          },
                          "pain_or_discomfort_3_days_per_month_last_3_months": {
                            "description": "Recurrent abdominal pain or discomfort at least 3 days per month in the last 3 months (Longstreth 2006). true or false as assigned by the caller. magent does not examine the patient.",
                            "type": "boolean"
                          },
                          "symptom_onset_at_least_6_months_prior": {
                            "description": "Symptom onset at least 6 months prior to diagnosis, as assigned (Longstreth 2006). true or false as assigned by the caller. magent does not take a history.",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "pain_or_discomfort_3_days_per_month_last_3_months",
                          "symptom_onset_at_least_6_months_prior",
                          "improvement_with_defecation",
                          "onset_change_stool_frequency",
                          "onset_change_stool_form"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}