Official PHP client for the Datalumo API

Maintainers

Package info

github.com/datalumo/php

pkg:composer/datalumo/php

Transparency log

Statistics

Installs: 46

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.0 2026-07-18 05:47 UTC

This package is auto-updated.

Last update: 2026-07-31 04:58:02 UTC


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