Submit compact PharmGKB API requests for genes, variants, clinical annotations, dosing guidelines, and search. Use when a user wants concise PharmGKB summaries
scripts/rest_request.py for all PharmGKB API calls.base_url=https://api.pharmgkb.org/v1/data.max_items; list and search endpoints are better with max_items=10.... in tool previews as UI truncation, not literal request content.gene/<id>, variant/<id>, clinicalAnnotation, dosingGuideline, and search endpoints.save_raw=true and report the saved file path.base_url, pathmethod, params, headers, json_body, form_body, record_path, response_format, max_items, max_depth, timeout_sec, save_raw, raw_output_path{"base_url":"https://api.pharmgkb.org/v1/data","path":"gene/PA134865140"}{"base_url":"https://api.pharmgkb.org/v1/data","path":"clinicalAnnotation","params":{"relatedChemicals.accessionId":"PA449726","limit":10},"max_items":10}{"base_url":"https://api.pharmgkb.org/v1/data","path":"variant/PA166158545"}ok, source, path, method, status_code, warnings, and either compact records or a compact summary.raw_output_path when save_raw=true.ok=false with error.code and error.message.echo '{"base_url":"https://api.pharmgkb.org/v1/data","path":"gene/PA134865140"}' | python scripts/rest_request.py
scripts/rest_request.py.