medprice
v0.1.0Compare US prescription prices by pharmacy, find nearby pharmacies and drug equivalents.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
compare_prices
Price of one medicine with the free FineRx card at US pharmacy chains, near a place. Use when the person asks what a medicine costs, where it costs less, or its price near them or in a ZIP code. ``drug`` is a name as typed or a slug from search_drugs; ``strength`` ("10 mg"), ``form`` ("tablet") and ``quantity`` are optional (the package with the most chains priced is used). ``zip`` is a 5-digit US ZIP — pass it only when the person gave one; without it the host's approximate location is used when there is one, else the answer is national and asks for a ZIP. ``ndc…
| Parameter | Type | Description |
|---|---|---|
channel | An optional channel tag identifying where the request comes through; leave it out unless the calling host supplies one. | |
compare_to | A dollar amount the person named for this package (their insurance copay, what they pay now, or a price they want to beat); the answer then says how many chains were seen below it. | |
drug | The medicine: a name as typed, or a slug from search_drugs. | |
form | The dosage form of the medicine (e.g. "tablet"). | |
locale | A language code for the answer (the host's own is used when left out). | |
ndc | The medicine's NDC (National Drug Code); accepted together with quantity for older callers. | |
quantity | The quantity to price (the pack size / number of units). | |
strength | The strength of the medicine (e.g. "10 mg"). | |
zip | A 5-digit US ZIP code to locate prices and stores near; pass it only when the person gave one. |
ui_prices
Card prices for another dose, quantity or place — called by the FineRx card itself. Same answer as compare_prices, for the package and place picked inside the card. ``where`` is the place as typed in the card (a ZIP, a city or an address): used for this one request, never stored. Not for the model.
| Parameter | Type | Description |
|---|---|---|
slug * | string | The slug of the medicine whose package is on screen in the card. |
compare_to | A dollar amount the person named for this package (their insurance copay, what they pay now, or a price they want to beat); the answer then says how many chains were seen below it. | |
form | The dosage form of the medicine (e.g. "tablet"). | |
locale | A language code for the answer (the host's own is used when left out). | |
quantity | The quantity to price (the pack size / number of units). | |
strength | The strength of the medicine (e.g. "10 mg"). | |
where | The place as typed in the card (a ZIP, a city or an address); used for this one request, never stored. | |
zip | A 5-digit US ZIP code to locate prices and stores near; pass it only when the person gave one. |
find_nearby_pharmacies
Pharmacy stores within 30 miles, per chain — with the card price when a drug is given. Use when the person asks where the pharmacies are near a ZIP or near them. ``zip`` is a 5-digit US ZIP (leave it out to use the host's approximate location when there is one). ``family`` is a comma-separated list of chain codes: walmart, cvs, walgreens, kroger, albertsons, costco, publix, heb, hyvee, meijer, wegmans, shoprite, bigy, gianteagle, kinney (``chains`` is the older name of the same filter). With ``drug`` (+ optional strength, form, quantity) each store carries its ch…
| Parameter | Type | Description |
|---|---|---|
chains | The older name of the family filter: a comma-separated list of pharmacy chain codes to include. | |
drug | The medicine: a name as typed, or a slug from search_drugs. | |
family | A comma-separated list of pharmacy chain codes to include: walmart, cvs, walgreens, kroger, albertsons, costco, publix, heb, hyvee, meijer, wegmans, shoprite, bigy, gianteagle, kinney. | |
form | The dosage form of the medicine (e.g. "tablet"). | |
limit | integer | The maximum number of stores to return per chain (default 3). |
locale | A language code for the answer (the host's own is used when left out). | |
quantity | The quantity to price (the pack size / number of units). | |
strength | The strength of the medicine (e.g. "10 mg"). | |
zip | A 5-digit US ZIP code to locate prices and stores near; pass it only when the person gave one. |
ui_nearby
Pharmacies near a place for the package on screen — called by the FineRx card itself. ``where`` is the place as typed in the card (a ZIP, a city or an address): used for this one request, never stored. Not for the model.
| Parameter | Type | Description |
|---|---|---|
family | A comma-separated list of pharmacy chain codes to include: walmart, cvs, walgreens, kroger, albertsons, costco, publix, heb, hyvee, meijer, wegmans, shoprite, bigy, gianteagle, kinney. | |
form | The dosage form of the medicine (e.g. "tablet"). | |
locale | A language code for the answer (the host's own is used when left out). | |
quantity | The quantity to price (the pack size / number of units). | |
slug | The slug of the medicine whose package is on screen in the card. | |
strength | The strength of the medicine (e.g. "10 mg"). | |
where | The place as typed in the card (a ZIP, a city or an address); used for this one request, never stored. | |
zip | A 5-digit US ZIP code to locate prices and stores near; pass it only when the person gave one. |
get_transfer_steps
How to move a prescription from the pharmacy that has it to the one the person wants to use. Use when the person says their prescription is at another pharmacy, asks how to switch pharmacies, or picked a chain from the card prices and their prescription is elsewhere. ``chain`` is the chain they want to move TO, as a code: walmart, cvs, walgreens, kroger, albertsons, costco, publix, heb, hyvee, meijer, wegmans, shoprite, bigy, gianteagle, kinney. Optional ``drug`` (+ strength, form, quantity) adds that chain's card price with its date. ``zip`` is a 5-digit US ZIP  
| Parameter | Type | Description |
|---|---|---|
chain | The pharmacy chain to move the prescription TO, as a code: walmart, cvs, walgreens, kroger, albertsons, costco, publix, heb, hyvee, meijer, wegmans, shoprite, bigy, gianteagle, kinney. | |
drug | The medicine: a name as typed, or a slug from search_drugs. | |
form | The dosage form of the medicine (e.g. "tablet"). | |
locale | A language code for the answer (the host's own is used when left out). | |
quantity | The quantity to price (the pack size / number of units). | |
strength | The strength of the medicine (e.g. "10 mg"). | |
zip | A 5-digit US ZIP code to locate prices and stores near; pass it only when the person gave one. |
compare_basket
Card prices for several medicines at once: which pharmacy chain was seen pricing the whole list, and the sum there. Use when the person names two or more medicines and asks what they cost together, or which one pharmacy to use for all of them. ``drugs`` is two to six names as typed or slugs; a dose and a pack size may ride in each name ("atorvastatin 40 mg 90"). ``zip`` is a 5-digit US ZIP — pass it only when the person gave one; without it the host's approximate location is used when there is one, else the chains are listed nationally. Returns the package used…
| Parameter | Type | Description |
|---|---|---|
drugs * | array | The medicines to price together: two to six names as typed or slugs (a dose and a pack size may ride in each name). |
channel | An optional channel tag identifying where the request comes through; leave it out unless the calling host supplies one. | |
locale | A language code for the answer (the host's own is used when left out). | |
zip | A 5-digit US ZIP code to locate prices and stores near; pass it only when the person gave one. |
ui_basket
The same list of medicines for another place — called by the FineRx card itself. ``slugs`` with their packages in parallel lists (an empty string or 0 = not set). ``where`` is the place as typed in the card: used for this one request, never stored. Not for the model.
| Parameter | Type | Description |
|---|---|---|
slugs * | array | The medicines' slugs, with their packages in the parallel strengths, forms and quantities lists. |
forms | Parallel to slugs: the dosage form for each medicine (an empty string means not set). | |
locale | A language code for the answer (the host's own is used when left out). | |
quantities | Parallel to slugs: the quantity for each medicine (0 means not set). | |
strengths | Parallel to slugs: the strength for each medicine (an empty string means not set). | |
where | The place as typed in the card (a ZIP, a city or an address); used for this one request, never stored. | |
zip | A 5-digit US ZIP code to locate prices and stores near; pass it only when the person gave one. |
open_price_finder
Open the FineRx search inside the card, so the person can look a medicine up themselves. Use when the person asks to open FineRx, wants to search or browse on their own, or is not sure of the name. Optional ``query`` pre-fills the search (a medicine, a brand from another country, a misspelling). The card then suggests matches as they type, each with where its card prices start and the date, and a pick shows card prices by chain near a place they choose. Returns the matches for ``query`` (if any), foreign brands that matched, a few often-searched medicines, and the…
| Parameter | Type | Description |
|---|---|---|
locale | A language code for the answer (the host's own is used when left out). | |
query | A search to pre-fill in the FineRx search (a medicine, a brand from another country, or a misspelling). |
ui_suggest
Medicines matching what the person is typing in the FineRx search — called by the card itself. Up to eight matches with where their card prices start (dated), and foreign brands that matched. Not for the model.
| Parameter | Type | Description |
|---|---|---|
q * | string | What the person is typing in the FineRx search; matching medicines are suggested. |
locale | A language code for the answer (the host's own is used when left out). |
get_savings_card
The free FineRx discount card: its codes, how to use it, how to keep it. Use when the person asks for the card, how to pay less at the pharmacy, or right after you quoted a card price. Optional ``drug`` (a slug from search_drugs) adds that drug's card price for its most-priced package, with the date it was observed. ``locale`` is a language code (the host's own is used when left out). Returns the three codes to read at the counter, the steps, the sentence to say to the pharmacist, the links to the card page and the printable sheet, and the card sentence with t…
| Parameter | Type | Description |
|---|---|---|
channel | An optional channel tag identifying where the request comes through; leave it out unless the calling host supplies one. | |
drug | The medicine: a name as typed, or a slug from search_drugs. | |
locale | A language code for the answer (the host's own is used when left out). |
search_drugs
Find a medicine by name (brand, generic, misspelled or in another script) and get its slug. Not needed before compare_prices, compare_basket or get_transfer_steps: they take a name as typed. Use it when the person asks what FineRx has, or a name is ambiguous. Returns candidates with ``slug`` (for get_drug and compare_prices), ``kind`` (generic/brand) and ``fromCardPrice`` — where its card prices start: the amount, the package it is for and the observation date. ``foreignBrands`` lists home-country brands that matched the same text (Нурофен, No-Spa): when…
| Parameter | Type | Description |
|---|---|---|
query * | string | The medicine name to search for (brand, generic, misspelled or in another script). |
limit | integer | The maximum number of matching medicines to return (default 10). |
locale | A language code for the answer (the host's own is used when left out). |
get_drug
Strengths, forms and pack sizes of one medicine that have a card price, and its default package. Use when you have a slug and need to know which strengths and quantities exist before quoting a price. Returns ``configs`` (strength × form, each with quantities, where the card prices for that pack start, with the date, and how many chains priced it), ``defaultConfig`` (the package the most chains price), ``fromCardPrice``, the card prices of the default package per chain, and the card. Next: compare_prices for the package the person takes.
| Parameter | Type | Description |
|---|---|---|
slug * | string | The slug of the medicine to describe, from search_drugs. |
channel | An optional channel tag identifying where the request comes through; leave it out unless the calling host supplies one. | |
locale | A language code for the answer (the host's own is used when left out). |
get_dataset_info
What FineRx covers: pharmacy chains with card prices, how fresh they are, stores on the map, terms. Use when the person asks what FineRx is, how big or current the data is, or how to cite it. Returns the pharmacy chain families we hold card prices for, their store banners, the newest observation date, how many stores we can place on a map, the catalog size, and the attribution terms.
get_prescription_options
Routes to filling a prescription, including having none yet. Use when the person says they have no prescription, asks how to get one, or says the brand costs too much. Optional ``drug`` is a slug from search_drugs (a name works too). Returns three sections — havePrescription (steps), noPrescription (clinics and telehealth, each with the disclosure to read out when FineRx earns anything), brandCostly — plus a Medicaid note, where the drug's card prices start (dated), and the card. For controlled or age-restricted medicines it returns only ``restricted: true`…
| Parameter | Type | Description |
|---|---|---|
drug | The medicine: a name as typed, or a slug from search_drugs. | |
locale | A language code for the answer (the host's own is used when left out). |
find_us_equivalent
What a medicine from another country is in the US, and its card price here. Use when the person names a medicine that is not a US product — a brand from home (No-Spa, Nurofen, Dolo-Neurobion, 999 Ganmaoling), a name in another script (Но-шпа, 泰诺), or an ingredient the US calls something else (paracetamol) — or asks "what is this called in the US?". Optional ``country`` picks between brands of the same name sold in different places. Returns the reviewed entry: ``usClass`` (``same_inn`` = the same active ingredient is sold here, ``rx_alternative`` = it…
| Parameter | Type | Description |
|---|---|---|
brand * | string | The brand name of the medicine from another country, as typed. |
channel | An optional channel tag identifying where the request comes through; leave it out unless the calling host supplies one. | |
country | The country the brand is sold in; picks between brands of the same name sold in different places. | |
locale | A language code for the answer (the host's own is used when left out). |
find_us_equivalents
What several medicines from another country are in the US — the list a person brought from home. Use when the person names two or more medicines that are not US products (brands from home, names in another script) and asks what they are here. ``brands`` is two to six names as typed; optional ``country`` picks between brands of the same name sold in different places. One medicine: use find_us_equivalent. Returns one entry per medicine found, each exactly as find_us_equivalent gives it: ``usClass``, the reviewed ``guidance`` sentence (quote it word for word),…
| Parameter | Type | Description |
|---|---|---|
brands * | array | The brand names of the medicines from another country: two to six names as typed. |
channel | An optional channel tag identifying where the request comes through; leave it out unless the calling host supplies one. | |
country | The country the brand is sold in; picks between brands of the same name sold in different places. | |
locale | A language code for the answer (the host's own is used when left out). |
ui_equivalent
One foreign brand the person picked in the FineRx search — called by the card itself. The same answer as find_us_equivalent for exactly that brand (its ``brandSlug`` from ui_suggest): the reviewed guidance, word for word, and the US product only when it has the same active ingredient. Not for the model.
| Parameter | Type | Description |
|---|---|---|
brand_slug * | string | The slug of the foreign brand picked in the FineRx search. |
locale | A language code for the answer (the host's own is used when left out). |
foreign_brands_for_drug
What a US drug is called abroad — the reverse of find_us_equivalent. Use when the person has the US name and wants the home-country one ("what is lisinopril called in Mexico?"). ``slug`` comes from search_drugs. Returns the reviewed brands that resolve to this drug: ``brand``, ``brandScript``, ``countries``, ``inn`` and ``usClass`` (an ``rx_alternative`` entry is a DIFFERENT medicine used for the same complaint — say so if you mention it), and the card. Do not present any of these as interchangeable with the US drug, and do not tell anyone to buy or import one.…
| Parameter | Type | Description |
|---|---|---|
slug * | string | The slug of the US medicine, from search_drugs. |