/** * NIH RePORTER SDK — typed API client for NIH research project and publication search. * * Standalone — no MCP server required. Usage: * * import { searchProjects, searchPublications } from "us-gov-open-data-mcp/sdk/nih"; * * const projects = await searchProjects({ text: "Alzheimer", fiscal_years: [2024] }); * const pubs = await searchPublications({ core_project_nums: ["R01AG060942"] }); * * No API key required. * Docs: https://api.reporter.nih.gov/ */ /** Nih Project Search Response. */ export interface NihProjectSearchResponse { meta: { search_id?: string; total?: number; offset?: number; limit?: number; sort_field?: string; sort_order?: string; sorted_by_relevance?: boolean; properties?: Record; }; results: NihProject[]; } /** Nih Project. */ export interface NihProject { appl_id?: number; subproject_id?: string | null; fiscal_year?: number; project_num?: string; project_serial_num?: string; organization?: { org_name?: string; city?: string; state?: string; country?: string; org_city?: string; org_state?: string; org_country?: string; dept_type?: string; fips?: string; org_duns?: string[]; org_ueis?: string[]; org_zipcode?: string; external_org_id?: number; org_type?: string; congressional_district?: string; }; award_type?: string; activity_code?: string; award_amount?: number; is_active?: boolean; project_num_split?: { appl_type_code?: string; activity_code?: string; ic_code?: string; serial_num?: string; support_year?: string; suffix_code?: string; full_support_year?: string; }; principal_investigators?: Array<{ profile_id?: number; first_name?: string; middle_name?: string; last_name?: string; full_name?: string; is_contact_pi?: boolean; title?: string; }>; contact_pi_name?: string; program_officers?: Array<{ first_name?: string; last_name?: string; full_name?: string; }>; agency_ic_admin?: { code?: string; abbreviation?: string; name?: string; }; agency_ic_fundings?: Array<{ code?: string; abbreviation?: string; name?: string; total_cost?: number; }>; cong_dist?: string; spending_categories?: Array<{ name?: string; id?: number; }>; project_start_date?: string; project_end_date?: string; award_notice_date?: string; is_new?: boolean; mechanism_code_dc?: string; core_project_num?: string; terms?: string; pref_terms?: string; abstract_text?: string; project_title?: string; phr_text?: string; spending_categories_desc?: string; agency_code?: string; covid_response?: string[]; arra_funded?: string; budget_start?: string; budget_end?: string; cfda_code?: string; funding_mechanism?: string; direct_cost_amt?: number; indirect_cost_amt?: number; project_detail_url?: string; date_added?: string; } /** Nih Publication Search Response. */ export interface NihPublicationSearchResponse { meta: { search_id?: string; total?: number; offset?: number; limit?: number; sort_field?: string; sort_order?: string; properties?: Record; }; results: NihPublication[]; } /** Nih Publication. */ export interface NihPublication { coreproject?: string; pmid?: number; applid?: number; } /** NIH Institute/Center codes. */ export declare const NIH_AGENCIES: { readonly NCI: "National Cancer Institute"; readonly NHLBI: "National Heart, Lung, and Blood Institute"; readonly NIDDK: "National Institute of Diabetes and Digestive and Kidney Diseases"; readonly NINDS: "National Institute of Neurological Disorders and Stroke"; readonly NIA: "National Institute on Aging"; readonly NIAID: "National Institute of Allergy and Infectious Diseases"; readonly NIGMS: "National Institute of General Medical Sciences"; readonly NIMH: "National Institute of Mental Health"; readonly NIDA: "National Institute on Drug Abuse"; readonly NICHD: "Eunice Kennedy Shriver National Institute of Child Health and Human Development"; readonly NEI: "National Eye Institute"; readonly NIEHS: "National Institute of Environmental Health Sciences"; readonly NIDCR: "National Institute of Dental and Craniofacial Research"; readonly NIAMS: "National Institute of Arthritis and Musculoskeletal and Skin Diseases"; readonly NIDCD: "National Institute on Deafness and Other Communication Disorders"; readonly NIBIB: "National Institute of Biomedical Imaging and Bioengineering"; readonly NIMHD: "National Institute on Minority Health and Health Disparities"; readonly NCATS: "National Center for Advancing Translational Sciences"; readonly NCCIH: "National Center for Complementary and Integrative Health"; readonly NLM: "National Library of Medicine"; readonly FIC: "Fogarty International Center"; readonly CIT: "Center for Information Technology"; readonly CSR: "Center for Scientific Review"; readonly OD: "NIH Office of the Director"; readonly NIAAA: "National Institute on Alcohol Abuse and Alcoholism"; readonly NHGRI: "National Human Genome Research Institute"; readonly NINR: "National Institute of Nursing Research"; readonly AHRQ: "Agency for Healthcare Research and Quality"; readonly CDC: "Centers for Disease Control and Prevention"; readonly FDA: "Food and Drug Administration"; readonly SAMHSA: "Substance Abuse and Mental Health Services Administration"; readonly VA: "Department of Veterans Affairs"; }; /** NIH Spending Categories (RCDC) — common ones. */ export declare const SPENDING_CATEGORIES: { readonly 2: "Aging"; readonly 7: "Alzheimer's Disease"; readonly 9: "Arthritis"; readonly 10: "Asthma"; readonly 13: "Biodefense"; readonly 20: "Brain Disorders"; readonly 27: "Cancer"; readonly 30: "Cardiovascular"; readonly 35: "Clinical Research"; readonly 38: "COVID-19/SARS-CoV-2"; readonly 40: "Depression"; readonly 41: "Diabetes"; readonly 47: "Drug Abuse"; readonly 55: "Genetics"; readonly 57: "Global Health"; readonly 60: "HIV/AIDS"; readonly 70: "Immunization"; readonly 74: "Infectious Diseases"; readonly 78: "Kidney Disease"; readonly 82: "Lung"; readonly 85: "Mental Health"; readonly 88: "Minority Health"; readonly 92: "Obesity"; readonly 93: "Opioids"; readonly 95: "Orphan Drug"; readonly 100: "Pain Research"; readonly 105: "Precision Medicine"; readonly 109: "Rare Diseases"; readonly 115: "Stem Cell Research"; readonly 118: "Stroke"; readonly 120: "Substance Abuse"; readonly 123: "Tobacco"; readonly 126: "Vaccine Related"; readonly 128: "Women's Health"; }; /** Common activity codes (grant types). */ export declare const ACTIVITY_CODES: { readonly R01: "Research Project Grant (most common independent investigator grant)"; readonly R21: "Exploratory/Developmental Research Grant (smaller, high-risk)"; readonly R43: "SBIR Phase I (Small Business Innovation Research)"; readonly R44: "SBIR Phase II"; readonly P01: "Research Program Project Grant (multi-investigator)"; readonly P30: "Center Core Grant"; readonly P50: "Specialized Center"; readonly U01: "Research Project Cooperative Agreement"; readonly U54: "Specialized Center Cooperative Agreement"; readonly T32: "Institutional NRSA Training Grant"; readonly F31: "Pre-doctoral Fellowship"; readonly F32: "Post-doctoral Fellowship"; readonly K01: "Mentored Research Scientist Career Development Award"; readonly K08: "Mentored Clinical Scientist Career Development Award"; readonly K23: "Mentored Patient-Oriented Research Career Development Award"; readonly K99: "Pathway to Independence Award (Phase I)"; readonly R00: "Pathway to Independence Award (Phase II)"; readonly DP2: "NIH Director's New Innovator Award"; readonly DP5: "NIH Director's Early Independence Award"; readonly ZIA: "NIH Intramural Research Project"; }; /** Funding mechanism codes. */ export declare const FUNDING_MECHANISMS: { readonly RG: "Research Grants"; readonly PC: "Research Centers"; readonly CT: "Clinical Trial or Study Cooperative Agreement"; readonly TN: "Research Training (Individual and Institutional)"; readonly CR: "Research Career Programs"; readonly SB: "Small Business Awards (SBIR/STTR)"; readonly OT: "Other Transactions"; }; /** * Search NIH-funded research projects. * * Examples: * const cancer = await searchProjects({ text: "breast cancer", fiscal_years: [2024] }); * const byAgency = await searchProjects({ agencies: ["NCI"], limit: 20 }); * const byPI = await searchProjects({ pi_names: [{ any_name: "Fauci" }] }); * const byOrg = await searchProjects({ org_names: ["JOHNS HOPKINS UNIVERSITY"] }); * const bySpending = await searchProjects({ spending_categories: [27], fiscal_years: [2024] }); */ export declare function searchProjects(opts: { text?: string; search_field?: string; fiscal_years?: number[]; agencies?: string[]; pi_names?: Array<{ first_name?: string; last_name?: string; any_name?: string; }>; po_names?: Array<{ first_name?: string; last_name?: string; any_name?: string; }>; org_names?: string[]; org_states?: string[]; org_cities?: string[]; org_countries?: string[]; spending_categories?: number[]; spending_categories_match_all?: boolean; activity_codes?: string[]; funding_mechanism?: string[]; award_types?: string[]; award_amount_min?: number; award_amount_max?: number; project_nums?: string[]; appl_ids?: number[]; include_active_projects?: boolean; exclude_subprojects?: boolean; covid_response?: string[]; project_start_from?: string; project_start_to?: string; project_end_from?: string; project_end_to?: string; newly_added_only?: boolean; include_fields?: string[]; exclude_fields?: string[]; offset?: number; limit?: number; sort_field?: string; sort_order?: "asc" | "desc"; }): Promise; /** * Search for publications linked to NIH-funded projects. * * Examples: * const pubs = await searchPublications({ core_project_nums: ["R01AG060942"] }); * const byPmid = await searchPublications({ pmids: [33298401, 33105091] }); */ export declare function searchPublications(opts: { pmids?: number[]; appl_ids?: number[]; core_project_nums?: string[]; offset?: number; limit?: number; sort_field?: string; sort_order?: "asc" | "desc"; }): Promise; /** * Get NIH funding for a disease area across fiscal years. * Uses both RCDC spending categories AND the mapped agency (when available) * for more accurate counts, since RCDC tags aren't always applied at project level. * * Example: * const cancer = await getSpendingByCategory(27, [2020, 2021, 2022, 2023, 2024]); */ export declare function getSpendingByCategory(categoryId: number, fiscalYears: number[]): Promise<{ category: string; years: Record; }>; /** * Get project count by NIH agency/institute for a fiscal year. * * Example: * const breakdown = await getProjectsByAgency(2024); */ export declare function getProjectsByAgency(fiscalYear: number, agencies?: string[]): Promise>; /** Clear the cache. */ export declare function clearCache(): void; //# sourceMappingURL=sdk.d.ts.map