> ## Documentation Index
> Fetch the complete documentation index at: https://docs.discountdrugnetwork.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Find Drugs

> Retrieve drug information using specific filters such as drug name, GSN, and pharmacy location.

## **Endpoint**

```http theme={null}
GET https://api.discountdrugnetwork.com/gateway/Drug/FindDrugs
```

***

## **Usage**

This endpoint retrieves information about drugs and associated pharmacy details. Use this API to locate drugs by name, GSN, or other identifiers and get information such as drug forms, strengths, quantities, and pricing.

***

## **Input Parameters**

### **Query Parameters**

| **Parameter**     | **Type**  | **Description**                                                                               | **Required** |
| ----------------- | --------- | --------------------------------------------------------------------------------------------- | ------------ |
| `groupID`         | `string`  | Group Identifier for authentication.                                                          | Yes          |
| `Address1`        | `string`  | Address for the search location.                                                              | No           |
| `BrandIndicator`  | `string`  | Brand or generic indicator.                                                                   | No           |
| `City`            | `string`  | City of the search location.                                                                  | No           |
| `DrugName`        | `string`  | Name of the drug to search.                                                                   | No           |
| `GSN`             | `string`  | GCN Sequence Number to filter drugs.                                                          | No           |
| `NDC`             | `string`  | National Drug Code of the drug.                                                               | No           |
| `IncludeDrugInfo` | `boolean` | Whether to include detailed drug info in the response.                                        | No           |
| `Lat`             | `double`  | Latitude of the search location.                                                              | No           |
| `Long`            | `double`  | Longitude of the search location.                                                             | No           |
| `NCPDP_NPI`       | `string`  | Pharmacy identifier.                                                                          | No           |
| `NumPharm`        | `int`     | Number of pharmacies to return.                                                               | No           |
| `PriceOnly`       | `boolean` | If true, returns only price information. Excludes quantities, forms, strengths, or drug info. | No           |
| `Qty`             | `double`  | Quantity of the drug.                                                                         | No           |
| `ReferencedBN`    | `string`  | Referenced brand name.                                                                        | No           |
| `State`           | `string`  | State of the search location.                                                                 | No           |
| `UC`              | `double`  | Usual and Customary value.                                                                    | No           |
| `UseUC`           | `boolean` | Whether to use the Usual and Customary value in pricing calculations.                         | No           |
| `Zip`             | `string`  | Zip code of the search location.                                                              | No           |

***

## **FindDrugs Response**

### **Returned Parameters**

| **Parameter** | **Type** | **Description**                                                |
| ------------- | -------- | -------------------------------------------------------------- |
| `Drugs`       | `array`  | Array of LocatedDrugs matching the FindDrugs request.          |
| `Forms`       | `array`  | Array of LocatedDrugForms matching the FindDrugs request.      |
| `Names`       | `array`  | Array of LocatedDrugNames matching the FindDrugs request.      |
| `Quantities`  | `array`  | Array of LocatedDrugQuantities matching the FindDrugs request. |
| `Strengths`   | `array`  | Array of LocatedDrugStrengths matching the FindDrugs request.  |

***

## **Output Details**

### **Pharmacy Information**

| **Parameter**      | **Description**                                               |
| ------------------ | ------------------------------------------------------------- |
| `chainCode`        | Unique code for pharmacy chains.                              |
| `pharmacyName`     | Name of the pharmacy.                                         |
| `latitude`         | Latitude of the pharmacy location. Supports map integration.  |
| `longitude`        | Longitude of the pharmacy location. Supports map integration. |
| `address`          | Address of the pharmacy location.                             |
| `phone`            | Contact phone number of the pharmacy.                         |
| `distance`         | Distance from the provided location to the pharmacy.          |
| `city`             | City of the pharmacy location.                                |
| `state`            | State abbreviation of the pharmacy location.                  |
| `zip`              | 9-digit zip code of the pharmacy.                             |
| `hoursOfOperation` | Publicly posted operating hours of the pharmacy.              |

### **Drug Information**

| **Parameter**      | **Description**                                                         |
| ------------------ | ----------------------------------------------------------------------- |
| `ndc`              | National Drug Code (NDC).                                               |
| `ln`               | Label name of the drug.                                                 |
| `qty`              | Prescription quantity.                                                  |
| `price`            | Discounted price.                                                       |
| `priceBasis`       | Basis for price determination (e.g., AWP, Usual and Customary, or MAC). |
| `ucPrice`          | Usual and Customary price for the drug.                                 |
| `awpPrice`         | Average Wholesale Price of the drug.                                    |
| `macPrice`         | Maximum Allowable Cost for the drug.                                    |
| `brandGeneric`     | "B" for Brand, "G" for Generic, "A" for Brand or Generic.               |
| `quantityLabel`    | Type of medication (e.g., capsules, tablets).                           |
| `isDiscontinued`   | Indicates whether the medication is discontinued.                       |
| `discontinuedDate` | Date the medication was discontinued.                                   |
| `genericName`      | Generic name of the medication.                                         |
| `brandName`        | Brand name of the medication.                                           |
| `description`      | Description of the medication.                                          |

***

### **Drug Pricing**

| **Parameter**         | **Description**                                                                                            |
| --------------------- | ---------------------------------------------------------------------------------------------------------- |
| `ddnPharmacyCategory` | Category of the pharmacy chain: 1 = National chains, 2 = Grocery store chains, 0 = Independent pharmacies. |

***


## OpenAPI

````yaml GET /gateway/Drug/FindDrugs
openapi: 3.0.0
info:
  title: Discount Drug Network API
  version: 1.0.0
  description: >-
    API for authentication, drug searches, discount information, and related
    data.
servers:
  - url: https://api.discountdrugnetwork.com
    description: Production server
security: []
paths:
  /gateway/Drug/FindDrugs:
    get:
      summary: Find Drugs
      description: >-
        Retrieve drug information, forms, strengths, quantities, and pricing
        using various filters.
      parameters:
        - name: groupID
          in: query
          required: true
          schema:
            type: string
          description: Group Identifier for authentication.
        - name: Address1
          in: query
          required: false
          schema:
            type: string
          description: Address for the search location.
        - name: BrandIndicator
          in: query
          required: false
          schema:
            type: string
          description: Brand or generic indicator.
        - name: City
          in: query
          required: false
          schema:
            type: string
          description: City of the search location.
        - name: DrugName
          in: query
          required: false
          schema:
            type: string
          description: Name of the drug to search.
        - name: GSN
          in: query
          required: false
          schema:
            type: string
          description: GCN Sequence Number to filter drugs.
        - name: NDC
          in: query
          required: false
          schema:
            type: string
          description: National Drug Code of the drug.
        - name: IncludeDrugInfo
          in: query
          required: false
          schema:
            type: boolean
          description: Whether to include detailed drug info in the response.
        - name: Lat
          in: query
          required: false
          schema:
            type: number
            format: double
          description: Latitude of the search location.
        - name: Long
          in: query
          required: false
          schema:
            type: number
            format: double
          description: Longitude of the search location.
        - name: NCPDP_NPI
          in: query
          required: false
          schema:
            type: string
          description: Pharmacy identifier.
        - name: NumPharm
          in: query
          required: false
          schema:
            type: integer
          description: Number of pharmacies to return.
        - name: PriceOnly
          in: query
          required: false
          schema:
            type: boolean
          description: If true, returns only price information.
        - name: Qty
          in: query
          required: false
          schema:
            type: number
            format: double
          description: Quantity of the drug.
        - name: ReferencedBN
          in: query
          required: false
          schema:
            type: string
          description: Referenced brand name.
        - name: State
          in: query
          required: false
          schema:
            type: string
          description: State of the search location.
        - name: UC
          in: query
          required: false
          schema:
            type: number
            format: double
          description: Usual and Customary value.
        - name: UseUC
          in: query
          required: false
          schema:
            type: boolean
          description: >-
            Whether to use the Usual and Customary value in pricing
            calculations.
        - name: Zip
          in: query
          required: false
          schema:
            type: string
          description: Zip code of the search location.
      responses:
        '200':
          description: Successfully retrieved drug and pharmacy details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Drugs:
                    type: array
                    description: Array of LocatedDrugs matching the FindDrugs request.
                  Forms:
                    type: array
                    description: Array of LocatedDrugForms matching the FindDrugs request.
                  Names:
                    type: array
                    description: Array of LocatedDrugNames matching the FindDrugs request.
                  Quantities:
                    type: array
                    description: >-
                      Array of LocatedDrugQuantities matching the FindDrugs
                      request.
                  Strengths:
                    type: array
                    description: >-
                      Array of LocatedDrugStrengths matching the FindDrugs
                      request.
        '400':
          description: Bad request - invalid input parameters.
        '404':
          description: Not found - no drugs matching the criteria.

````