PHPackages                             meisam-mulla/laravel-openfda - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. meisam-mulla/laravel-openfda

ActiveLibrary

meisam-mulla/laravel-openfda
============================

Simplified OpenFDA API for Laravel

1.0.5(2y ago)426MITPHP

Since Jun 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/MeisamMulla/laravel-openfda)[ Packagist](https://packagist.org/packages/meisam-mulla/laravel-openfda)[ RSS](/packages/meisam-mulla-laravel-openfda/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (6)Used By (0)

Laravel OpenFDA
===============

[](#laravel-openfda)

The Laravel OpenFDA package simplifies accessing the openFDA APIs, allowing users to query the API with ease. While this package is designed to be used with Laravel, it can also be used independently.

You can use this API without an API key however you will be limited to 1,000 requests per day. You can get a free API key from [openFDA directly](https://open.fda.gov/apis/authentication/)

Installation
------------

[](#installation)

You can install the Laravel OpenFDA package via Composer by running the following command:

```
composer require meisam-mulla/laravel-openfda
```

Usage
-----

[](#usage)

To use the Laravel OpenFDA package, follow the example below:

### With Laravel

[](#with-laravel)

```
$response = OpenFDA::search('tylenol')->get();

// Process the response
```

### Without Laravel

[](#without-laravel)

```
use MeisamMulla\OpenFDA\OpenFDA;

$openFDA = new OpenFDA();

$response = $openFDA->search('tylenol')->get();

// Process the response
```

### Available Methods

[](#available-methods)

The following methods are available for querying the openFDA APIs:

MethodDescription`use(string $endpoint): OpenFDA`Set the API endpoint to be used.`search(string $query): OpenFDA`Set the search query.`sort(string $sort): OpenFDA`Set the sorting criteria.`count(int $count): OpenFDA`Set the number of results to be counted.`limit(int $limit): OpenFDA`Set the maximum number of results to be returned.`skip(int $skip): OpenFDA`Set the number of results to skip.`get(): stdClass`Send the API request and retrieve the response.### Available Endpoints

[](#available-endpoints)

The Laravel OpenFDA package provides access to the following openFDA API endpoints:

EndpointDescription`ANIMAL_DRUG_EVENT`[Animal and Veterinary Drug Event](https://api.fda.gov/animalandveterinary/event.json)`DRUG_EVENT`[Drug Event](https://api.fda.gov/drug/event.json)`DRUG_LABEL`[Drug Label](https://api.fda.gov/drug/label.json)`DRUG_NDC`[Drug NDC](https://api.fda.gov/drug/ndc.json)`DRUG_ENFORCEMENT`[Drug Enforcement](https://api.fda.gov/drug/enforcement.json)`DRUG_FDA`[Drug FDA](https://api.fda.gov/drug/drugsfda.json)`DEVICE_501K`[Device 510k](https://api.fda.gov/device/510k.json)`DEVICE_CLASSIFICATION`[Device Classification](https://api.fda.gov/device/classification.json)`DEVICE_ENFORCEMENT`[Device Enforcement](https://api.fda.gov/device/enforcement.json)`DEVICE_EVENT`[Device Event](https://api.fda.gov/device/event.json)`DEVICE_PMA`[Device PMA](https://api.fda.gov/device/pma.json)`DEVICE_RECALL`[Device Recall](https://api.fda.gov/device/recall.json)`DEVICE_REGISTRATION`[Device Registration Listing](https://api.fda.gov/device/registrationlisting.json)`DEVICE_COVID19`[Device COVID-19 Serology](https://api.fda.gov/device/covid19serology.json)`DEVICE_UDI`[Device UDI](https://api.fda.gov/device/udi.json)`FOOD_ENFORCEMENT`[Food Enforcement](https://api.fda.gov/food/enforcement.json)`FOOD_EVENT`[Food Event](https://api.fda.gov/food/event.json)`TOBACCO_PROBLEM`[Tobacco Problem](https://api.fda.gov/tobacco/problem.json)Configuration
-------------

[](#configuration)

To configure the package, you can set the `OPENFDA_APIKEY` variable in your `.env` file. If the variable is set, it will be included as an authorization header in the API requests.

You can use this API without an API key however you will be limited to 1,000 requests per day. You can get a free API key from [openFDA directly](https://open.fda.gov/apis/authentication/)

Contributing
------------

[](#contributing)

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please [open an issue](https://github.com/meisammulla/laravel-openfda/issues) on GitHub.

License
-------

[](#license)

The Laravel OpenFDA package is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

Acknowledgements
----------------

[](#acknowledgements)

This package is built upon the openFDA APIs. We would like to express our gratitude to the openFDA team for providing this valuable resource.

Contact
-------

[](#contact)

If you have any questions or need further assistance, feel free to contact the package maintainer at .

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

5

Last Release

1064d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cbc74747d67ea401016b4308dabc2eb0069f03dbd9e11e2f57e7db4781109928?d=identicon)[meisam-mulla](/maintainers/meisam-mulla)

---

Top Contributors

[![MeisamMulla](https://avatars.githubusercontent.com/u/1777638?v=4)](https://github.com/MeisamMulla "MeisamMulla (12 commits)")

---

Tags

laravelopenfda

### Embed Badge

![Health badge](/badges/meisam-mulla-laravel-openfda/health.svg)

```
[![Health](https://phpackages.com/badges/meisam-mulla-laravel-openfda/health.svg)](https://phpackages.com/packages/meisam-mulla-laravel-openfda)
```

###  Alternatives

[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[tpetry/laravel-mysql-explain

Get Visual MySQL EXPLAIN for Laravel.

264154.2k](/packages/tpetry-laravel-mysql-explain)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
