datalumo / php
Official PHP client for the Datalumo API
0.1.0
2026-07-18 05:47 UTC
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.8
- psr/log: ^3.0
Requires (Dev)
- laravel/pint: ^1.18
- mockery/mockery: ^1.6
- pestphp/pest: ^3.0
README
PHP client for the Datalumo API.
Install
composer require datalumo/php
Requires PHP 8.2+.
Quick start
use Datalumo\Client; $client = new Client( token: getenv('DATALUMO_TOKEN'), organisation: getenv('DATALUMO_ORG'), // organisation public id, not the slug ); // Confirm the token and list sources $me = $client->me()->get(); // Push a page (indexing is asynchronous) $client->pages('docs')->upsert([ 'external_id' => 'post-42', 'name' => 'Hello', 'content' => '# Hello', 'content_mime' => 'text/markdown', 'source_url' => 'https://example.com/hello', ]); // Search via a widget $result = $client->widgets($widgetId)->search([ 'query' => 'how does pricing work', 'limit' => 5, ]); foreach ($result->data as $hit) { echo $hit->name; }
Self-hosted:
$client = new Client( token: $token, organisation: $orgId, baseUrl: 'https://your-instance.example', );
Next steps
- API docs
- Laravel package:
datalumo/laravel