Synthea - Create Synthetic FHIR Compliant
Create realistic synthetic patient healthcare data without privacy concerns. Generates FHIR R4 bundles, CSV files, and comprehensive patient records with demographics, conditions, medications, and procedures. Ideal for EHR testing, healthcare development, medical research, and machine learning.
Input parameters
| PARAMETER | TYPE | REQ | DEFAULT | DESCRIPTION |
|---|---|---|---|---|
| population_size | integer | yes | 1 | Number of synthetic patients to generate. |
| seed | integer | no | — | Random seed for reproducible patient generation. |
| reference_date | string | no | — | Reference date for patient generation in YYYYMMDD format (e.g., '20260101'). |
| clinician_seed | integer | no | — | Seed for clinician assignment to patients. |
| gender | enum | no | — | Filter patients by gender. |
| age_range | string | no | — | Filter patients by age range in format 'minAge-maxAge' (e.g., '30-40'). |
| state | string | no | — | US state name for patient location (e.g., 'Massachusetts', 'California'). |
| city | string | no | — | City name for patient location. |
| exporter_fhir_use_us_core_ig | boolean | no | False | If enabled, generates FHIR bundles using US Core R4 Implementation Guide profiles. |
Worked examples
{
"population_size": 1
}
Code
curl
curl -X POST "https://api.apify.com/v2/acts/johnvc~Synthea-Medical-Record-Generator-API/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"population_size": 1}'
Python
from apify_client import ApifyClient
client = ApifyClient("APIFY_TOKEN")
run = client.actor("johnvc/Synthea-Medical-Record-Generator-API").call(
run_input={'population_size': 1}
)
for item in client.dataset(run.default_dataset_id).iterate_items():
print(item)
MCP
Apify's hosted MCP server loads this source from the URL below as the tool johnvc--Synthea-Medical-Record-Generator-API. Sign in to Apify when your client asks (OAuth), or send an Apify token as an Authorization: Bearer header.
https://mcp.apify.com/?tools=johnvc/Synthea-Medical-Record-Generator-API
Questions people ask
What does the Synthea synthetic health records API generate?
Realistic synthetic patient records with no privacy exposure, delivered as FHIR R4 bundles and CSV files, covering demographics, conditions, medications and procedures for EHR testing, healthcare development, research and machine learning.
How much does the Synthea synthetic health records API cost?
The default edition is pay per patient record at $0.011576 for each record generated, and there is a free tier on Apify. The required population_size input sets how many synthetic patients a run creates.
Can I make Synthea synthetic patient generation reproducible?
Yes. Pass a seed integer for reproducible patient generation, a clinician_seed for clinician assignment, and a reference_date in YYYYMMDD format so the same inputs produce the same records.
Can I control the demographics of Synthea synthetic patients?
Yes. Filter by gender, set an age_range such as 30-40, and place patients in a US state such as Massachusetts or California and a city.
Does the Synthea API support US Core FHIR profiles?
Yes. Set exporter_fhir_use_us_core_ig to true and the FHIR bundles are generated using US Core R4 Implementation Guide profiles. It is off by default.
Can an AI agent call the Synthea synthetic records API over MCP?
Yes. The source is exposed as an MCP tool on Apify's hosted MCP server for Claude, Cursor and other agents, and it is also available over REST.