PHPackages                             resumegoonline/careerjet-sdk - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. resumegoonline/careerjet-sdk

ActiveLibrary[Queues &amp; Workers](/categories/queues)

resumegoonline/careerjet-sdk
============================

Modern PHP SDK for the Careerjet job search API

1.0.0(1mo ago)02MITPHPPHP ^8.1

Since Jul 17Pushed 1mo agoCompare

[ Source](https://github.com/ResumeGo-Online/careerjet-api-sdk)[ Packagist](https://packagist.org/packages/resumegoonline/careerjet-sdk)[ RSS](/packages/resumegoonline-careerjet-sdk/feed)WikiDiscussions main Synced 1w ago

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

Careerjet SDK for PHP
=====================

[](#careerjet-sdk-for-php)

[![PHP](https://camo.githubusercontent.com/cc9cdea9aa96b40a822425e981b0a030e3371202973c7d57b74e8e99834f81dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e312d626c7565)](https://www.php.net/)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)

Modern PHP SDK for the [Careerjet](https://www.careerjet.com/) job search API.
Provides a type-safe, PSR-4 compliant client with Guzzle HTTP transport, strict types, and full IDE autocompletion.

---

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

[](#installation)

```
composer require resumegoonline/careerjet-sdk
```

Requires PHP 8.1+ and `ext-json`.

---

Quick Start
-----------

[](#quick-start)

```
use ResumeGoOnline\CareerjetSdk\CareerjetClient;
use ResumeGoOnline\CareerjetSdk\Dto\Request\SearchQuery;
use ResumeGoOnline\CareerjetSdk\Dto\Request\SortType;

$client = new CareerjetClient('');

$result = $client->search(new SearchQuery(
    localeCode: 'en_GB',
    keywords: 'php developer',
    location: 'London',
    page: 1,
    pageSize: 10,
    sort: SortType::Relevance,
));

if ($result->isJobs()) {
    echo "Found {$result->hits} jobs ({$result->pages} pages)\n";
    echo "Response time: {$result->responseTime}s\n";

    foreach ($result->jobs as $job) {
        echo "{$job->title} at {$job->company} — {$job->locations}\n";
        echo "  {$job->salary} ({$job->salaryCurrencyCode})\n";
        echo "  {$job->url}\n\n";
    }
} elseif ($result->isLocations()) {
    echo "{$result->message}\n";
    foreach ($result->locations as $location) {
        echo "  — {$location->name}\n";
    }
}
```

> **Note:** You need a Careerjet API key — register at [careerjet.com/partners](https://www.careerjet.com/partners/).

---

Authentication
--------------

[](#authentication)

The SDK uses HTTP Basic authentication. Your API key is sent as the username with an empty password in the `Authorization` header:

```
Authorization: Basic base64(API_KEY:)

```

---

API Reference
-------------

[](#api-reference)

### `CareerjetClient`

[](#careerjetclient)

```
public function __construct(
    string $apiKey,
    ?HttpClientInterface $httpClient = null,
)
```

ParameterTypeDescription`$apiKey``string`Your Careerjet API key (**required**).`$httpClient``?HttpClientInterface`Custom HTTP transport. Uses Guzzle 7 with 10s timeout by default.```
public function search(
    SearchQuery $query,
    ?string $userIp = null,
    ?string $userAgent = null,
    ?string $referer = null,
): SearchResult
```

ParameterTypeDescription`$query``SearchQuery`Search parameters (**required**).`$userIp``?string`Client IP address. Auto-detected from `$_SERVER` headers if `null`.`$userAgent``?string`Client User-Agent. Auto-detected from `$_SERVER` if `null`.`$referer``?string`Referer URL. Auto-detected from `$_SERVER` if `null`.> ⚠️ `user_ip` and `user_agent` are **required** by the Careerjet API. The SDK will throw a `CareerjetApiException` if neither auto-detection nor explicit values are available (e.g. in CLI scripts).

---

### `SearchQuery` DTO

[](#searchquery-dto)

```
new SearchQuery(
    keywords: 'php developer',
    location: 'London',
    localeCode: 'en_GB',
    sort: SortType::Relevance,
    page: 1,
    pageSize: 20,
    offset: 0,
    fragmentSize: 120,
    radius: 5,
    contractType: ContractType::Permanent,
    workHours: WorkHours::FullTime,
)
```

FieldTypeDefaultAPI ParamDescription`keywords``string``''``keywords`Search terms (space-separated).`location``string``''``location`Location. Empty = country-wide.`localeCode``string``'en_US'``locale_code``[lang]_[COUNTRY]` format (see locales below).`sort``SortType``Relevance``sort`Sort order.`page``int``0``page`Page number (1–10). Overrides `offset` when &gt; 0.`pageSize``int``20``page_size`Results per page (1–100).`offset``int``0``offset`Zero-based offset (0–999). Ignored if `page` &gt; 0.`fragmentSize``int``120``fragment_size`Description excerpt size in characters.`radius``int``5``radius`Search radius in km/miles.`contractType``?ContractType``null``contract_type`Contract type filter.`workHours``?WorkHours``null``work_hours`Working hours filter.---

### Enums

[](#enums)

#### `SortType`

[](#sorttype)

CaseValueDescription`Relevance``relevance`Sort by decreasing relevance.`Date``date`Sort by decreasing date.`Salary``salary`Sort by decreasing salary.#### `ContractType`

[](#contracttype)

CaseValueDescription`Permanent``p`Permanent position.`Contract``c`Contract position.`Temporary``t`Temporary position.`Internship``i`Internship / training.`Volunteering``v`Volunteering position.#### `WorkHours`

[](#workhours)

CaseValueDescription`FullTime``f`Full-time position.`PartTime``p`Part-time position.---

### `SearchResult` DTO

[](#searchresult-dto)

FieldTypeDescription`type``string``'JOBS'` or `'LOCATIONS'`.`message``string`Human-readable message from the API.`responseTime``float`API response time in seconds (e.g. `0.322`).`hits``int`Total number of matching jobs (JOBS type only).`pages``int`Total number of result pages (JOBS type only).`jobs``Job[]`List of job offers.`locations``Location[]`List of suggested locations (when original location was ambiguous).`rawData``array`Full raw API response for forward-compatibility.**Helper methods:**

- `$result->isJobs(): bool` — `true` when `type === 'JOBS'`.
- `$result->isLocations(): bool` — `true` when `type === 'LOCATIONS'`.

---

### `Job` DTO

[](#job-dto)

FieldTypeDescription`url``string`Job offer URL (via jobviewtrack.com redirect).`title``string`Job title.`description``string`Job description excerpt (may contain HTML).`company``string`Company name.`locations``string`Location string (e.g. `"London"`).`date``string`Publication date (e.g. `"Wed, 15 Nov 2025 19:13:43 GMT"`).`salary``string`Formatted salary (e.g. `"$30,000 - 33,000"`).`salaryCurrencyCode``string`ISO currency code (e.g. `"USD"`).`salaryMin``?float`Minimum salary value, or `null`.`salaryMax``?float`Maximum salary value, or `null`.`salaryType``string``'Y'` = yearly, `'M'` = monthly, `'W'` = weekly, `'D'` = daily, `'H'` = hourly.`site``string`Source site domain (e.g. `"domain.com"`).`rawData``array`All raw API fields.### `Location` DTO

[](#location-dto)

FieldTypeDescription`name``string`Location name (e.g. `"London (Greater London)"`).`rawData``array`All raw API fields.Casts to string via `__toString()`.

---

Error Handling
--------------

[](#error-handling)

All SDK errors extend `ResumeGoOnline\CareerjetSdk\Exception\CareerjetException` (which extends `\RuntimeException`).

**`CareerjetApiException`** is thrown on:

- API returns `type: "ERROR"` response
- Missing required `user_ip` or `user_agent`
- Invalid JSON response body

Access the original API error details:

```
try {
    $result = $client->search($query);
} catch (CareerjetApiException $e) {
    echo $e->getMessage();         // Human-readable
    echo $e->getApiErrorType();    // e.g. "MISSING_PARAM"
    echo $e->getApiErrorMessage(); // Original API message
}
```

---

Supported Locales
-----------------

[](#supported-locales)

CodeLanguageCountry`cs_CZ`CzechCzech Republic`da_DK`DanishDenmark`de_AT`GermanAustria`de_CH`GermanSwitzerland`de_DE`GermanGermany`en_AE`EnglishUnited Arab Emirates`en_AU`EnglishAustralia`en_CA`EnglishCanada`en_CN`EnglishChina`en_GB`EnglishUnited Kingdom`en_HK`EnglishHong Kong`en_IE`EnglishIreland`en_IN`EnglishIndia`en_MY`EnglishMalaysia`en_NZ`EnglishNew Zealand`en_OM`EnglishOman`en_PH`EnglishPhilippines`en_PK`EnglishPakistan`en_QA`EnglishQatar`en_SG`EnglishSingapore`en_TW`EnglishTaiwan`en_US`EnglishUnited States`en_VN`EnglishVietnam`en_ZA`EnglishSouth Africa`es_AR`SpanishArgentina`es_BO`SpanishBolivia`es_CL`SpanishChile`es_CR`SpanishCosta Rica`es_DO`SpanishDominican Republic`es_EC`SpanishEcuador`es_ES`SpanishSpain`es_GT`SpanishGuatemala`es_MX`SpanishMexico`es_PA`SpanishPanama`es_PE`SpanishPeru`es_PR`SpanishPuerto Rico`es_PY`SpanishParaguay`es_UY`SpanishUruguay`es_VE`SpanishVenezuela`fi_FI`FinnishFinland`fr_BE`FrenchBelgium`fr_CA`FrenchCanada`fr_CH`FrenchSwitzerland`fr_FR`FrenchFrance`fr_LU`FrenchLuxembourg`fr_MA`FrenchMorocco`hu_HU`HungarianHungary`it_IT`ItalianItaly`ja_JP`JapaneseJapan`ko_KR`KoreanKorea`nl_BE`DutchBelgium`nl_NL`DutchNetherlands`no_NO`NorwegianNorway`pl_PL`PolishPoland`pt_BR`PortugueseBrazil`pt_PT`PortuguesePortugal`ru_RU`RussianRussia`ru_UA`RussianUkraine`sk_SK`SlovakSlovakia`sv_SE`SwedishSweden`tr_TR`TurkishTurkey`uk_UA`UkrainianUkraine`vi_VN`VietnameseVietnam`zh_CN`ChineseChina---

Custom HTTP Client
------------------

[](#custom-http-client)

The SDK ships with a Guzzle 7 implementation. You can swap it out via the `HttpClientInterface`:

```
use ResumeGoOnline\CareerjetSdk\HttpClient\HttpClientInterface;

class MyHttpClient implements HttpClientInterface
{
    public function get(string $url, array $headers = []): string
    {
        // Your custom logic
    }
}

$client = new CareerjetClient('API_KEY', new MyHttpClient());
```

Useful for testing with mocks, adding logging middleware, or using a different HTTP library.

---

Testing
-------

[](#testing)

```
composer install
vendor/bin/phpunit
```

```
PHPUnit 10.5.64
............................  28 / 28 (100%)
OK (28 tests, 142 assertions)

```

Test suite covers:

- `SearchQuery` — defaults, page/offset logic, contract/work hours filters
- `Job` — full, partial and empty `fromArray()` parsing
- `Location` — various input formats, `__toString()`
- `SearchResult` — JOBS, LOCATIONS, empty locations, ERROR → exception, unknown types
- `CareerjetClient` — constructor validation, successful search, error responses, missing required params, HTTP headers

---

License
-------

[](#license)

MIT. See [LICENSE](LICENSE) for details.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/068f8c26f06f513a9c38d2a01c4d90a85eae1125a5b9d14eae7059715be860e4?d=identicon)[m1n64](/maintainers/m1n64)

---

Top Contributors

[![m1n64](https://avatars.githubusercontent.com/u/24874264?v=4)](https://github.com/m1n64 "m1n64 (1 commits)")

---

Tags

apisearchsdkjobcareerjet

###  Code Quality

TestsPHPUnit

Static AnalysisRector

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/resumegoonline-careerjet-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/resumegoonline-careerjet-sdk/health.svg)](https://phpackages.com/packages/resumegoonline-careerjet-sdk)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.4k567.5M2.9k](/packages/aws-aws-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.1k1.0M59](/packages/neuron-core-neuron-ai)[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1075.1M21](/packages/xeroapi-xero-php-oauth2)[resend/resend-php

Resend PHP library.

639.6M57](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.7M17](/packages/checkout-checkout-sdk-php)

PHPackages © 2026

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