Skip to content
Medication Search
Popular

Popular

Medication Search

Inside Rx provides several endpoints design to return various medication related information. The Popular Searched Medications endpoint can be used to see the most common search medications.

The Medication Search API is restricted with a x-api-key header. This API Key is provided when provisioning your account. It will authorize you for these endpoints, and is required for all requests.

Popular Searched Medications

The GET request is designed to return an array of the most common searched for medications within the last 30 days.

Note

Results only represent searches against the Medication Search Query endpoint, and are not unique per partner.

HTTP Request

GET https://services.insiderx.com/search/v1/popular HTTP/1.1
Content-Type: application/json
x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt

Where x-api-key is the private key provided when provisioning an account. The example key above is for demonstration purposes.

HTTP GET Params

paramDescription
localestring (optional) Localization of the medication attributes. Either en-US (default), or es-US
limitstring (optional) Limits number of returned entries to [1...10], defaults to 10

Response Types

CodeDescription
200Successful results returned.
400Incorrect or missing required parameters.
403Lack of permissions to use medication search service.
500Internal server error, something went wrong.

Response Attributes

The following attributes are returned as a array of objects within the response body. Dot notation is used to represent nested objects. Square bracket notation represents items are nested within an array.

AttributeDescription
idstring Internal ID used for tracking purposes.
results[].namestring Generic or Brand name of the medication.
results[].genericstring Generic name of the medication, can be a duplicate name attribute.
results[].dose[].packageboolean True if the medication is a package.
results[].dose[].labelstring Display label for the dose.
results[].dose[].valuestring Value refers to the NDC for this specific strength and form.
results[].dose[].baseValuestring Base Value used when calculating custom quantity to price.
results[].dose[].unitLabelstring Display label for the unit.
results[].dose[].quantity[].labelstring Display label for the quantity.
results[].dose[].quantity[].valuestring Value of the quantity.
results[].dose[].defaultQuantitystring Value of the most commonly prescribed quantity.
results[].dose[].programboolean True if medication is covered in a special program that has additional restrictions. NOTE - Only applicable if your contract participates in that program.
results[].dose[].doseFormstring Form for the dose.
results[].defaultDosestring NDC of the most commonly prescribed dose.
results[].slugstring External ID that is unique and URL friendly.
results[].genericSlugstring The slug identifier of the generic version of this drug. It will be null if there is no generic version available.
statusCodeinteger (optional) HTTP status code in case of failure.
messagestring (optional) Error description.
errorCodestring (optional) Error Code for validation failures. See Error Codes.

Example CURL Request

curl https://services.insiderx.com/search/v1/popular/?limit=2 \
  -H "Content-Type: application/json" \
  -H "x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt"

Where x-api-key is the private key provided when provisioning an account. The example key above is for demonstration purposes.

Example JSON Response

{
  "id": "d54c54ad-40be-4305-8a34-0ab44710b90d",
  "results": [
    {
      "name": "Medication A",
      "generic": "generic a",
      "dose": [
        {
          "package": false,
          "label": "10 mg",
          "value": "00000000001",
          "baseValue": "1",
          "unitLabel": "tab(s)",
          "quantity": [
            {
              "label": "30 tab(s)",
              "value": "30"
            },
            ...
          ],
          "defaultQuantity": "30"
        },
        ...
      ],
      "defaultDose": "00000000001",
      "slug": "medication-a",
    },
    ...
  ]
}

Example JSON Response for Missing or Incorrect Request Data

{
  "id": "d54c54ad-40be-4305-8a34-0ab44710b90d",
  "message": "Incorrect or missing required parameters.",
  "statusCode": 400,
  "errorCode": "LIMIT_INCORRECT_OR_MISSING"
}

Error Codes

Error CodeDescription
LIMIT_INCORRECT_OR_MISSINGHTTP GET parameter limit is invalid.
LOCALE_INCORRECT_OR_MISSINGHTTP GET parameter locale is invalid.