How to scrape HHS
HHS is a website with public pages available for scraping. Developers typically collect data from its public pages.
Ujeebu scrapes any public website. Not listed here? Try any URL in the Playground or ask us about a site.
6 of 6 of our checks passed in the last 7 days (100%).
Last check 2026-12-03 15:25 UTC · last pass 2026-12-03 15:25 UTC · checked with our own requests, never customer data.
Markdown API one call
HHS pages as Markdown with the Markdown API
- markdown
- fit_markdown
- markdown_with_citations
- references
- metadata
curl -G 'https://api.ujeebu.com/markdown' \
-H "ApiKey: $UJEEBU_API_KEY" \
--data-urlencode 'url=https://oig.hhs.gov/reports/all/2026/wellstar-cobb-hospital-received-at-least-1-million-in-medicare-overpayments/' \
--data-urlencode 'js=false'
Send any HHS page: a report, a notice, a press release or a guidance page. The answer is JSON with the page as Markdown, headings, lists, tables and links kept, ready for an LLM or a search index. PDF files are not converted. Successful responses cost credits; blocked, timed-out and failed requests are free.
Run the code on this page with your own key: 5,000 free credits for 21 days, no card. Get a free API key →
HHS pages as Markdown: the Markdown API
What you want from hhs.gov is usually the text of a page: a report, a notice, a press release, a guidance page. The Markdown API fetches the page and returns it as clean Markdown, with the headings, lists, tables and links kept and the navigation dropped, for an LLM, a search index or a diff between versions.
One call: GET /markdown 5 credits a page
curl -G 'https://api.ujeebu.com/markdown' \
-H "ApiKey: $UJEEBU_API_KEY" \
--data-urlencode 'url=https://oig.hhs.gov/reports/all/2026/wellstar-cobb-hospital-received-at-least-1-million-in-medicare-overpayments/' \
--data-urlencode 'js=false'
The Ujb-Credits header gives the cost. filter=raw keeps the whole page, filter=bm25 with a query keeps the passages about it. PDF files are not converted: send HTML pages. Try it in the Playground
What the answer holds
| Field | Type | Example |
|---|---|---|
markdown | text | ## Report Materials ## Why OIG Did This Audit - For calendar year 2021, Medicare paid hospitals $182 billion, which repr... |
fit_markdown | text | ## Report Materials ## Why OIG Did This Audit - For calendar year 2021, Medicare paid hospitals $182 billion, which repr... |
markdown_with_citations | text | ## Report Materials ## Why OIG Did This Audit - For calendar year 2021, Medicare paid hospitals $182 billion, which repr... |
references | text | ## References [1]: / "HHS-OIG U.S. Department of Health and Human Services Office of Inspector General" [2]: https://oig... |
metadata.markdown_length | number | 1930 |
metadata.html_length | number | 46101 |
metadata.filter | text | fit |
url | URL | https://oig.hhs.gov/reports/all/2026/wellstar-cobb-hospital-received-at-least-1-million-in-medicare-overpayments/ |
Sample output (real call on 2026-12-03, trimmed)
{
"success": true,
"url": "https://oig.hhs.gov/reports/all/2026/wellstar-cobb-hospital-received-at-least-1-million-in-medicare-overpayments/",
"markdown": "## Report Materials\n\n## Why OIG Did This Audit\n\n- For calendar year 2021, Medicare paid hospitals $182 billion, which represents 46 percent of all fee-for-service payments; accordingly, it is important that hospital payments comply with requirements.\n- This audit is part of a series of audits examining hospitals with a high volume of claims previously identified as high-risk for noncompliance.\n- Wellstar Cobb Hospital (the Hospital) was selected because it submitted a substantial number of potentially high-risk claims to Medicare.\n\n## What OIG Found\n\n- Of the 104 inpatient claims we reviewed totaling $2.4 million, the Hospital complied with Medicare billing requirements for 89 claims. Howeve...",
"fit_markdown": "## Report Materials\n\n## Why OIG Did This Audit\n\n- For calendar year 2021, Medicare paid hospitals $182 billion, which represents 46 percent of all fee-for-service payments; accordingly, it is important that hospital payments comply with requirements.\n- This audit is part of a series of audits examining hospitals with a high volume of claims previously identified as high-risk for noncompliance.\n- Wellstar Cobb Hospital (the Hospital) was selected because it submitted a substantial number of potentially high-risk claims to Medicare.\n\n## What OIG Found\n\n- Of the 104 inpatient claims we reviewed totaling $2.4 million, the Hospital complied with Medicare billing requirements for 89 claims. Howeve...",
"markdown_with_citations": "## Report Materials\n\n## Why OIG Did This Audit\n\n- For calendar year 2021, Medicare paid hospitals $182 billion, which represents 46 percent of all fee-for-service payments; accordingly, it is important that hospital payments comply with requirements.\n- This audit is part of a series of audits examining hospitals with a high volume of claims previously identified as high-risk for noncompliance.\n- Wellstar Cobb Hospital (the Hospital) was selected because it submitted a substantial number of potentially high-risk claims to Medicare.\n\n## What OIG Found\n\n- Of the 104 inpatient claims we reviewed totaling $2.4 million, the Hospital complied with Medicare billing requirements for 89 claims. Howeve...",
"references": "\n\n## References\n\n[1]: / \"HHS-OIG\n \n U.S. Department of Health and Human Services\n Office of Inspector General\"\n[2]: https://oig.hhs.gov/fraud/report-fraud/ \"Report Fraud, Waste, & Abuse\"...",
"metadata": {
"conversion_time_ms": 11,
"filter": "fit",
"html_length": 46101,
"markdown_length": 1930
}
}
Code
Complete scripts: set the UJEEBU_API_KEY environment variable and run them as they are. Each one makes the call above and prints the main fields of the answer, and prints the credits the request cost (the Ujb-Credits response header) on stderr. A non-200 answer stops the script with the API's error message.
HHS pages (Markdown API)
One page: prints the length and the start of its Markdown. No SDK has a Markdown call yet, so these scripts call the API directly.
pip install requests # Get a HHS page as Markdown with the Ujeebu Markdown API.
# GET /markdown with the page URL: the API answers JSON with the page as Markdown (markdown, fit_markdown), the same text with numbered citations and the metadata.
# Run: UJEEBU_API_KEY=your_key python3 hhs_markdown.py (pip install requests)
import json
import os
import sys
import requests
API_URL = "https://api.ujeebu.com/markdown"
API_KEY = os.environ.get("UJEEBU_API_KEY")
PARAMS = {
"url": "https://oig.hhs.gov/reports/all/2026/wellstar-cobb-hospital-received-at-least-1-million-in-medicare-overpayments/",
"js": "false",
}
if not API_KEY:
sys.exit("Set the UJEEBU_API_KEY environment variable.")
try:
response = requests.get(API_URL, headers={"ApiKey": API_KEY}, params=PARAMS, timeout=180)
except requests.RequestException as error:
sys.exit(f"Request failed: {error}")
if response.status_code != 200:
try:
message = response.json().get("message", response.text)
except ValueError:
message = response.text
sys.exit(f"HTTP {response.status_code}: {str(message)[:300]}")
print(f"Ujb-Credits: {response.headers.get('Ujb-Credits')}", file=sys.stderr)
data = response.json()
markdown = data.get("fit_markdown") or data.get("markdown") or ""
print(f"{len(markdown)} characters of Markdown", file=sys.stderr)
print(markdown[:2000])
# every field: print(json.dumps(data, indent=2, ensure_ascii=False))
// Get a HHS page as Markdown with the Ujeebu Markdown API.
// GET /markdown with the page URL: the API answers JSON with the page as Markdown (markdown, fit_markdown), the same text with numbered citations and the metadata.
// Run: UJEEBU_API_KEY=your_key node hhs_markdown.mjs (Node.js 18 or later)
const API_KEY = process.env.UJEEBU_API_KEY;
const PARAMS = {
url: "https://oig.hhs.gov/reports/all/2026/wellstar-cobb-hospital-received-at-least-1-million-in-medicare-overpayments/",
js: "false",
};
if (!API_KEY) {
console.error('Set the UJEEBU_API_KEY environment variable.');
process.exit(1);
}
const res = await fetch(`https://api.ujeebu.com/markdown?${new URLSearchParams(PARAMS)}`, {
headers: { ApiKey: API_KEY },
signal: AbortSignal.timeout(180000),
});
const text = await res.text();
if (res.status !== 200) {
let message = text;
try {
message = JSON.parse(text).message ?? text;
} catch {}
console.error(`HTTP ${res.status}: ${String(message).slice(0, 300)}`);
process.exit(1);
}
console.error(`Ujb-Credits: ${res.headers.get('ujb-credits')}`);
const data = JSON.parse(text);
const markdown = data.fit_markdown || data.markdown || '';
console.error(`${markdown.length} characters of Markdown`);
console.log(markdown.slice(0, 2000));
// every field: console.log(JSON.stringify(data, null, 2));
#!/usr/bin/env bash
# Get a HHS page as Markdown with the Ujeebu Markdown API.
# GET /markdown with the page URL: the API answers JSON with the page as Markdown (markdown, fit_markdown), the same text with numbered citations and the metadata.
# Run: UJEEBU_API_KEY=your_key bash hhs_markdown.sh (curl 7.76 or later)
set -euo pipefail
curl -sS --fail-with-body --max-time 180 -D headers.txt -G 'https://api.ujeebu.com/markdown' \
-H "ApiKey: ${UJEEBU_API_KEY:?Set the UJEEBU_API_KEY environment variable.}" \
--data-urlencode 'url=https://oig.hhs.gov/reports/all/2026/wellstar-cobb-hospital-received-at-least-1-million-in-medicare-overpayments/' \
--data-urlencode 'js=false' \
-o page.json
grep -i '^ujb-credits' headers.txt >&2
echo 'The answer is in page.json (the Markdown is in its "markdown" field).' >&2
<?php
// Get a HHS page as Markdown with the Ujeebu Markdown API.
// GET /markdown with the page URL: the API answers JSON with the page as Markdown (markdown, fit_markdown), the same text with numbered citations and the metadata.
// Run: UJEEBU_API_KEY=your_key php hhs_markdown.php (PHP 7.4 or later with curl)
$apiKey = getenv('UJEEBU_API_KEY') ?: exit("Set the UJEEBU_API_KEY environment variable.\n");
$query = [
'url' => 'https://oig.hhs.gov/reports/all/2026/wellstar-cobb-hospital-received-at-least-1-million-in-medicare-overpayments/',
'js' => 'false',
];
$ch = curl_init('https://api.ujeebu.com/markdown?' . http_build_query($query));
$headers = [];
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 180,
CURLOPT_HTTPHEADER => ['ApiKey: ' . $apiKey],
CURLOPT_HEADERFUNCTION => function ($ch, $line) use (&$headers) {
if (strpos($line, ':') !== false) {
[$k, $v] = explode(':', $line, 2);
$headers[strtolower(trim($k))] = trim($v);
}
return strlen($line);
},
]);
$body = curl_exec($ch);
if ($body === false) {
fwrite(STDERR, 'Request failed: ' . curl_error($ch) . "\n");
exit(1);
}
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status !== 200) {
$message = json_decode($body, true)['message'] ?? $body;
fwrite(STDERR, "HTTP $status: " . substr((string) $message, 0, 300) . "\n");
exit(1);
}
fwrite(STDERR, 'Ujb-Credits: ' . ($headers['ujb-credits'] ?? '?') . "\n");
$data = json_decode($body, true);
$markdown = (string) ($data['fit_markdown'] ?? '') ?: (string) ($data['markdown'] ?? '');
fwrite(STDERR, strlen($markdown) . " characters of Markdown\n");
echo substr($markdown, 0, 2000), "\n";
// every field: echo json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), "\n";
SDK tabs use the official Ujeebu SDKs (ujeebu-python 0.1.5, @ujeebu-org/ujeebu-sdk 0.1.2, github.com/ujeebu/ujeebu-go v0.1.8); there is no PHP SDK, so the PHP tab calls the API with curl. For agents and scripts, the same status and settings are at /scrape/hhs.json.
Try it yourself
Run this on HHS with your own key
Get a free API key, set UJEEBU_API_KEY and run any script above as it is. 5,000 free credits for 21 days, no card.
Settings that work today
From our health checks over the last 7 days: the cheapest settings that return the real page most of the time.
| Endpoint | /markdown |
|---|---|
js | true |
| Cost | up to 30 credits a request (only HTTP 200 and 404 are billed; blocked, timed-out and failed requests are free) |
Each public page is one request: change the path in the URL to fetch another one. Our checks run with JavaScript rendering on (js=true): keep it on.
What people build with HHS data
- Research datasetsBuild datasets of public pages for analysis, search or LLM pipelines.More on this use case
Limits and etiquette
- Public pages only. Pages behind a login, and data shown only to signed-in users, are out of scope.
- Keep the rate modest: fetch pages one after another or with low concurrency, and cache what you already have.
- oig.hhs.gov has no robots.txt file.
- Read HHS's terms of service before you collect data at scale, and do not collect personal data you have no basis to process. This guide is not legal advice.
Questions
Can you scrape HHS with Ujeebu?
Yes. 6 of 6 checks of public HHS pages passed in the last 7 days with the settings on this page.
Which settings work for HHS?
Call /markdown with js=true.
How many credits does a HHS request cost?
With these settings a request costs up to 30 credits. Only responses with HTTP 200 or 404 are billed: a blocked or timed-out request is free.
How do I get HHS pages as clean text for an LLM?
Send the page URL to the Markdown API (GET /markdown?url=<page>). It returns the page as Markdown with its headings, lists, tables and links, without the navigation and boilerplate, plus the same text with numbered citations: 5 credits a page, no rules to write. PDF files are not converted. Only successful responses are billed.
Is it allowed to scrape HHS?
The site has no robots.txt file. Collect public pages only, read HHS's terms of service, keep your request rate modest and do not collect personal data you have no basis to process. This is not legal advice.
How fresh is this page?
The status and settings come from our own health checks of hhs.gov, which run around the clock. Last check: 2026-12-03 15:25:37 UTC; last pass: 2026-12-03 15:25:37 UTC.