PHPackages                             badams/google-url - 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. badams/google-url

AbandonedLibrary[API Development](/categories/api)

badams/google-url
=================

PHP implementation of Googles URL shortener API

1.0.2(9y ago)3981[1 issues](https://github.com/badams/google-url/issues)MITPHPPHP &gt;=5.4.0

Since Jul 27Pushed 9y agoCompare

[ Source](https://github.com/badams/google-url)[ Packagist](https://packagist.org/packages/badams/google-url)[ Docs](https://github.com/badams/google-url)[ RSS](/packages/badams-google-url/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/0db971544da0a047c515ad2adf0bb6ee523664b7c71341bfde37a73e0933e4cd/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f626164616d732f676f6f676c652d75726c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/badams/google-url)[![Coverage Status](https://camo.githubusercontent.com/8b74040544d98b8a151da48f22d7d7ced6537b93cf58c386b1bd32d7f26c50d6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f626164616d732f676f6f676c652d75726c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/badams/google-url/code-structure)[![Quality Score](https://camo.githubusercontent.com/57a4e2ab6c9fb36041d1581ca39b6f2a67140a0517f371eaf1f054332572d9d1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f626164616d732f676f6f676c652d75726c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/badams/google-url)

GoogleUrl
=========

[](#googleurl)

#### An easy to use PHP implementation of [Google's URL Shortener API](https://developers.google.com/url-shortener/)

[](#an-easy-to-use-php-implementation-of-googles-url-shortener-api)

This project aims provide an easy to use implementation of the Google URL shortener API for PHP developers.

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

[](#installation)

Install `badams/google-url` using Composer.

```
$ composer require badams/google-url
```

Basic Usage
-----------

[](#basic-usage)

```
use badams\GoogleUrl\GoogleUrl;

$url = new GoogleUrl('YOUR_API_KEY_HERE');

// Shorten
echo $url->shorten('https://github.com')->id;
> https://goo.gl/un5E

// Expand
echo $url->expand($short->id)->longUrl;
> https://github.com;
```

License
-------

[](#license)

GoogleUrl is open-sourced software licensed under the MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~10 days

Total

3

Last Release

3605d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fe4edc8748b6ac4922ab8d16f64de61ad0b552027d8c1630646f6a0d6f09b9d?d=identicon)[badams](/maintainers/badams)

---

Top Contributors

[![badams](https://avatars.githubusercontent.com/u/340715?v=4)](https://github.com/badams "badams (21 commits)")

---

Tags

urlgoogleshortenershort

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/badams-google-url/health.svg)

```
[![Health](https://phpackages.com/badges/badams-google-url/health.svg)](https://phpackages.com/packages/badams-google-url)
```

###  Alternatives

[google/apiclient

Client library for Google APIs

9.8k205.9M1.1k](/packages/google-apiclient)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M932](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

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

The PHP Agentic Framework.

2.0k656.1k34](/packages/neuron-core-neuron-ai)[mremi/url-shortener

A PHP5/PHP7/PHP8 library using API to shorten/expand URL

79723.2k6](/packages/mremi-url-shortener)[mbarwick83/shorty

Google Url Shortener API Package for Laravel 5.1

31204.9k](/packages/mbarwick83-shorty)

PHPackages © 2026

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