PHPackages                             contactmyreps/sunlight-php - 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. [API Development](/categories/api)
4. /
5. contactmyreps/sunlight-php

ActiveLibrary[API Development](/categories/api)

contactmyreps/sunlight-php
==========================

A PHP wrapper for Sunlight Foundation's API

v1.0(10y ago)118MITPHPPHP ~5.5|~7.0

Since Mar 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/contactmyreps/sunlight-php)[ Packagist](https://packagist.org/packages/contactmyreps/sunlight-php)[ Docs](https://github.com/contactmyreps/sunlight-php)[ RSS](/packages/contactmyreps-sunlight-php/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

sunlight-php
============

[](#sunlight-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/973602282c405f894b835a6e2ab599adbf27ab15faf3d0429128d29da524a0ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6e746163746d79726570732f73756e6c696768742d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/contactmyreps/sunlight-php)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/ccc6a9f39b2c47aeda35dc668afd8826c339b26fc1a340b2db3bbfec8b7e2f82/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6e746163746d79726570732f73756e6c696768742d7068702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/contactmyreps/sunlight-php)[![Coverage Status](https://camo.githubusercontent.com/c305adc5c18b5e999ed083547c4e038ee77db252c5f7d9265bbbf0f683eaa689/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f636f6e746163746d79726570732f73756e6c696768742d7068702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/contactmyreps/sunlight-php/code-structure)[![Quality Score](https://camo.githubusercontent.com/433832914a766becd7d1af0953fc840e8c6b95c852777fb81c5f752c4dc7b3bf/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f636f6e746163746d79726570732f73756e6c696768742d7068702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/contactmyreps/sunlight-php)[![Total Downloads](https://camo.githubusercontent.com/4520f205107d39f1e2bb758e1c921a68a3506f39706db6de2784d57f2275a649/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6e746163746d79726570732f73756e6c696768742d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/contactmyreps/sunlight-php)

A limited PHP wrapper for the Sunlight Foundation APIs designed for use on contactmyreps.org

Install
-------

[](#install)

Via Composer

```
$ composer require contactmyreps/sunlight-php
```

Usage
-----

[](#usage)

```
$sunlight = new Sunlight($apikey);
$openStates = $sunlight->openStates();
$congress = $sunlight->congress();

//get all Alabama's state legislators
$states->legislators(
    [
        'state' => 'AL'
    ],
);

//get all State reps serving a gps coordinate
$states->geoLookup($lat, $lng);

//get all Congressional representatives serving an area
$congress->locateByZip(11111);
$congress->locateByGeo($lat, $lng);

$request methods can be passed an optional extra array argument of display fields to return (last_name, first_name, etc.)
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Ed Fialkowski](https://github.com/edfialk)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

3771d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8652384?v=4)[Ed Fialkowski](/maintainers/edfialk)[@edfialk](https://github.com/edfialk)

---

Top Contributors

[![philsturgeon](https://avatars.githubusercontent.com/u/67381?v=4)](https://github.com/philsturgeon "philsturgeon (31 commits)")[![edfialk](https://avatars.githubusercontent.com/u/8652384?v=4)](https://github.com/edfialk "edfialk (20 commits)")[![frankdejonge](https://avatars.githubusercontent.com/u/534693?v=4)](https://github.com/frankdejonge "frankdejonge (15 commits)")[![RobLoach](https://avatars.githubusercontent.com/u/25086?v=4)](https://github.com/RobLoach "RobLoach (7 commits)")[![reinink](https://avatars.githubusercontent.com/u/882133?v=4)](https://github.com/reinink "reinink (5 commits)")[![bcrowe](https://avatars.githubusercontent.com/u/752603?v=4)](https://github.com/bcrowe "bcrowe (5 commits)")[![colinodell](https://avatars.githubusercontent.com/u/202034?v=4)](https://github.com/colinodell "colinodell (5 commits)")[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (4 commits)")[![EmanueleMinotto](https://avatars.githubusercontent.com/u/417201?v=4)](https://github.com/EmanueleMinotto "EmanueleMinotto (4 commits)")[![marcqualie](https://avatars.githubusercontent.com/u/101022?v=4)](https://github.com/marcqualie "marcqualie (4 commits)")[![hassankhan](https://avatars.githubusercontent.com/u/1781985?v=4)](https://github.com/hassankhan "hassankhan (3 commits)")[![browner12](https://avatars.githubusercontent.com/u/5232313?v=4)](https://github.com/browner12 "browner12 (3 commits)")[![mAAdhaTTah](https://avatars.githubusercontent.com/u/4371429?v=4)](https://github.com/mAAdhaTTah "mAAdhaTTah (2 commits)")[![alexbilbie](https://avatars.githubusercontent.com/u/77991?v=4)](https://github.com/alexbilbie "alexbilbie (2 commits)")[![kdubuc](https://avatars.githubusercontent.com/u/895661?v=4)](https://github.com/kdubuc "kdubuc (2 commits)")[![assertchris](https://avatars.githubusercontent.com/u/200609?v=4)](https://github.com/assertchris "assertchris (2 commits)")[![schmittjoh](https://avatars.githubusercontent.com/u/197017?v=4)](https://github.com/schmittjoh "schmittjoh (1 commits)")[![Anahkiasen](https://avatars.githubusercontent.com/u/1321596?v=4)](https://github.com/Anahkiasen "Anahkiasen (1 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (1 commits)")[![bencorlett](https://avatars.githubusercontent.com/u/181919?v=4)](https://github.com/bencorlett "bencorlett (1 commits)")

---

Tags

contactmyrepssunlight-php

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/contactmyreps-sunlight-php/health.svg)

```
[![Health](https://phpackages.com/badges/contactmyreps-sunlight-php/health.svg)](https://phpackages.com/packages/contactmyreps-sunlight-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1942.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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