MAGENT

Emergency · LIVE

Edinburgh Postnatal Depression Scale

EPDS

Sum ten caller-assigned Cox 1987 EPDS integers (0-3 over the past 7 days; laugh, enjoyment, and anxious reverse-scored in that paper so 0 is the least symptomatic published pole) and return the 0-30 total and whether it meets this paper's 12/13 threshold (score ≥13).

LIVE $0.005 USDC GET /api/calc/epds

Markdown: /docs/epds.md · Canonical: https://magentlab.com/docs/epds

Not a medical device. Not a diagnosis, dose, or listing recommendation.

What it computes

Sum ten caller-assigned Cox 1987 EPDS integers (0-3 over the past 7 days; laugh, enjoyment, and anxious reverse-scored in that paper so 0 is the least symptomatic published pole) and return the 0-30 total and whether it meets this paper's 12/13 threshold (score ≥13).

When to use

When an agent has already assigned Cox 1987 EPDS 0-3 integers for all ten items (after that paper's reverse key for items 1, 2, and 4) and needs the published total and 12/13 threshold, not a depression interview, PHQ-9, QIDS, or MDI.

When not to use

  • Not a medical device and not a depression diagnosis or treatment order.
  • magent does not administer a depression interview. Each of the ten items is a caller-assigned integer 0-3 (0 least symptomatic published pole through 3 most, past 7 days). magent does not interpret the items.
  • This is Cox 1987 EPDS only. Items laugh, enjoyment, and anxious (items 1, 2, and 4) are reverse-scored in that paper; the caller assigns the published 0-3 after that reverse key. Total 0-30. magent does not score PHQ-9, QIDS, or MDI.
  • Cox 1987 published a threshold of 12/13 (at_or_above_cutoff is true iff score ≥13). magent does not apply later ≥10 community cuts or a cut of score >13 only, and it does not treat a score as a depression diagnosis.

Formula

EPDS = laugh + enjoyment + self_blame + anxious + scared + coping + sleep + sad + crying + self_harm; each caller-assigned 0-3 as in Cox 1987 (laugh, enjoyment, and anxious reverse-scored in that paper; 0 is the least symptomatic published pole); max 30; Cox 1987 threshold 12/13 (at or above iff score ≥ 13)

Citation

Title
Detection of postnatal depression. Development of the 10-item Edinburgh Postnatal Depression Scale
Authors
Cox JL, Holden JM, Sagovsky R
Source
Br J Psychiatry. 1987;150:782-786
DOI
10.1192/bjp.150.6.782

Worked example

All items at the published 0 pole

Given: anxious=0coping=0crying=0enjoyment=0laugh=0sad=0scared=0self_blame=0self_harm=0sleep=0

  1. Each item is 0 (least symptomatic published pole, including reverse-scored laugh, enjoyment, and anxious)
  2. Score = 0 (max 30); at_or_above_cutoff false (Cox 1987 threshold is 12/13)

Reverse-scored item at 3

Given: anxious=0coping=0crying=0enjoyment=0laugh=3sad=0scared=0self_blame=0self_harm=0sleep=0

  1. laugh is reverse-scored in Cox 1987; the caller-assigned published score 3 adds 3, not 0
  2. Remaining items 0; score = 3; at_or_above_cutoff false

Cox 1987 threshold 12/13

Given: anxious=3coping=0crying=0enjoyment=3laugh=3sad=0scared=1self_blame=3self_harm=0sleep=0

  1. 3 + 3 + 3 + 3 + 1 + 0 + 0 + 0 + 0 + 0 = 13
  2. Score = 13 (max 30); at_or_above_cutoff true (12 is below; ≥13 is at or above). No ≥10 community cut.

Also searched as

  • EPDS
  • Edinburgh Postnatal Depression Scale
  • Edinburgh depression scale
  • Cox EPDS
  • postnatal depression screen
  • postpartum depression scale
  • 10-item EPDS
  • Cox 1987 EPDS

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/epds?laugh=0&enjoyment=0&self_blame=0&anxious=0&scared=0&coping=0&sleep=0&sad=0&crying=0&self_harm=0

Full URL: https://api.magentlab.com/api/calc/epds?laugh=0&enjoyment=0&self_blame=0&anxious=0&scared=0&coping=0&sleep=0&sad=0&crying=0&self_harm=0

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/epds?laugh=0&enjoyment=0&self_blame=0&anxious=0&scared=0&coping=0&sleep=0&sad=0&crying=0&self_harm=0"

Parameters

Name Type Required Description
laugh integer required Caller-assigned Cox 1987 EPDS item 1 (integer 0-3). Reverse-scored in that paper: ability to laugh and see the funny side of things over the past 7 days. 0 is the least symptomatic published pole after reverse scoring; 3 is the most. magent does not interpret the item.
enjoyment integer required Caller-assigned Cox 1987 EPDS item 2 (integer 0-3). Reverse-scored in that paper: looking forward with enjoyment to things over the past 7 days. 0 is the least symptomatic published pole after reverse scoring; 3 is the most. magent does not interpret the item.
self_blame integer required Caller-assigned Cox 1987 EPDS item 3 (integer 0-3): blamed self unnecessarily when things went wrong over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.
anxious integer required Caller-assigned Cox 1987 EPDS item 4 (integer 0-3). Reverse-scored in that paper: anxious or worried for no good reason over the past 7 days. 0 is the least symptomatic published pole after reverse scoring; 3 is the most. magent does not interpret the item.
scared integer required Caller-assigned Cox 1987 EPDS item 5 (integer 0-3): scared or panicky for no very good reason over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.
coping integer required Caller-assigned Cox 1987 EPDS item 6 (integer 0-3): things getting on top of the respondent over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.
sleep integer required Caller-assigned Cox 1987 EPDS item 7 (integer 0-3): unhappiness with difficulty sleeping over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.
sad integer required Caller-assigned Cox 1987 EPDS item 8 (integer 0-3): felt sad or miserable over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.
crying integer required Caller-assigned Cox 1987 EPDS item 9 (integer 0-3): crying from unhappiness over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.
self_harm integer required Caller-assigned Cox 1987 EPDS item 10 (integer 0-3): thoughts of harming oneself over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.

Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

POST /api/calc/epds Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 PREVIEW

  • 1 to 25 items. Each item uses the same keys as the GET query parameters.
  • POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
  • The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
  • HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
  • Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
  • x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request (fixture)

{
  "items": [
    {
      "anxious": "0",
      "coping": "0",
      "crying": "0",
      "enjoyment": "0",
      "laugh": "0",
      "sad": "0",
      "scared": "0",
      "self_blame": "0",
      "self_harm": "0",
      "sleep": "0"
    },
    {
      "anxious": "0",
      "coping": "0",
      "crying": "0",
      "enjoyment": "0",
      "laugh": "0",
      "sad": "0",
      "scared": "0",
      "self_blame": "0",
      "self_harm": "0",
      "sleep": "0"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/epds",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "laugh",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "enjoyment",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "self_blame",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "anxious",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "scared",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "coping",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "sleep",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "sad",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "crying",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "self_harm",
          "points": 0,
          "present": true,
          "reverse_scored": false
        }
      ],
      "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.",
      "citation": {
        "authors": "Cox JL, Holden JM, Sagovsky R",
        "doi": "10.1192/bjp.150.6.782",
        "id": "cox-1987",
        "pmid": "3651732",
        "source": "Br J Psychiatry. 1987;150:782-786",
        "title": "Detection of postnatal depression. Development of the 10-item Edinburgh Postnatal Depression Scale"
      },
      "formula": "epds",
      "formula_expression": "EPDS = laugh + enjoyment + self_blame + anxious + scared + coping + sleep + sad + crying + self_harm; each caller-assigned 0-3 as in Cox 1987 (laugh, enjoyment, and anxious reverse-scored in that paper; 0 is the least symptomatic published pole); max 30; Cox 1987 threshold 12/13 (at or above iff score ≥ 13)",
      "max_score": 30,
      "score": 0,
      "at_or_above_cutoff": false
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "laugh",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "enjoyment",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "self_blame",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "anxious",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "scared",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "coping",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "sleep",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "sad",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "crying",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "self_harm",
          "points": 0,
          "present": true,
          "reverse_scored": false
        }
      ],
      "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.",
      "citation": {
        "authors": "Cox JL, Holden JM, Sagovsky R",
        "doi": "10.1192/bjp.150.6.782",
        "id": "cox-1987",
        "pmid": "3651732",
        "source": "Br J Psychiatry. 1987;150:782-786",
        "title": "Detection of postnatal depression. Development of the 10-item Edinburgh Postnatal Depression Scale"
      },
      "formula": "epds",
      "formula_expression": "EPDS = laugh + enjoyment + self_blame + anxious + scared + coping + sleep + sad + crying + self_harm; each caller-assigned 0-3 as in Cox 1987 (laugh, enjoyment, and anxious reverse-scored in that paper; 0 is the least symptomatic published pole); max 30; Cox 1987 threshold 12/13 (at or above iff score ≥ 13)",
      "max_score": 30,
      "score": 0,
      "at_or_above_cutoff": false
    }
  ]
}

Response

Field Type Description
formula string epds
formula_expression string Exact expression used
score integer EPDS points 0-30
max_score integer 30
at_or_above_cutoff boolean true iff score ≥ 13 (Cox 1987 threshold 12/13). Not a diagnosis. Not later ≥10 community cuts. Not a cut of score >13 only.
components array Per-item caller-assigned points (reverse-scored items flagged)
citation object Cox et al. Br J Psychiatry 1987 citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "components": [
    {
      "value": 0,
      "factor": "laugh",
      "points": 0,
      "present": true,
      "reverse_scored": true
    },
    {
      "value": 0,
      "factor": "enjoyment",
      "points": 0,
      "present": true,
      "reverse_scored": true
    },
    {
      "value": 0,
      "factor": "self_blame",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "anxious",
      "points": 0,
      "present": true,
      "reverse_scored": true
    },
    {
      "value": 0,
      "factor": "scared",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "coping",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "sleep",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "sad",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "crying",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "self_harm",
      "points": 0,
      "present": true,
      "reverse_scored": false
    }
  ],
  "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.",
  "citation": {
    "authors": "Cox JL, Holden JM, Sagovsky R",
    "doi": "10.1192/bjp.150.6.782",
    "id": "cox-1987",
    "pmid": "3651732",
    "source": "Br J Psychiatry. 1987;150:782-786",
    "title": "Detection of postnatal depression. Development of the 10-item Edinburgh Postnatal Depression Scale"
  },
  "formula": "epds",
  "formula_expression": "EPDS = laugh + enjoyment + self_blame + anxious + scared + coping + sleep + sad + crying + self_harm; each caller-assigned 0-3 as in Cox 1987 (laugh, enjoyment, and anxious reverse-scored in that paper; 0 is the least symptomatic published pole); max 30; Cox 1987 threshold 12/13 (at or above iff score ≥ 13)",
  "max_score": 30,
  "score": 0,
  "at_or_above_cutoff": false
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_epds Each Edinburgh Postnatal Depression Scale item must be an integer in the Cox 1987 published 0-3 range. Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • PHQ-9 — Sum nine caller-assigned Kroenke 2001 PHQ-9 integers (0-3) and return the published total (max 27), severity cutpoints, and ≥10 screen.
  • QIDS — Map 16 caller-assigned Rush 2003 QIDS-SR integers (0-3) to nine DSM-IV domains (sleep, appetite/weight, and psychomotor are each the published max of their items) and return the 0-27 total and IRT severity band.
  • MDI — Map 12 caller-assigned Bech 2001 MDI integers (0-5 over the last 2 weeks) to ten DSM-IV/ICD-10 symptom items (appetite and psychomotor are each the published max of their pair) and return the 0-50 total and whether it meets this paper's optimal cutoff of 26.

Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /docs/mcp.

Guarantees

  • HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
  • exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
  • HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
  • Execution is timeout-bounded and concurrency-capped.
  • Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.