Packages available
Published at 2025-10-21
HQAPI offers developers a simple and efficient way to
interact with its web services. With dedicated client packages available via
pip for Python and Composer for PHP, integrating HQAPI into your projects has
never been easier.
Python Client: hqapi-client
The HQAPI Python client provides a lightweight, user-friendly interface to communicate with HQAPI endpoints. This client removes the need for manual HTTP request handling and offers both synchronous and asynchronous support.Key Features
- Intuitive interface covering all HQAPI endpoints
- Automatic authentication with API key or token
- Built-in error handling and response parsing
- Fully typed and PEP8-compliant
Installation
Install the client using pip:pip install hqapi-clientExample Usage
Here's a quick example of taking a screenshot via the HQAPI Python client:from hqapi_client.screenshot import ScreenshotClient
SCREENSHOT_API_TOKEN="--put--your--token--here--"
client = ScreenshotClient(token=SCREENSHOT_API_TOKEN)
image_data = client.create(url="https://hqapi.com/")
with open("screenshot.png", "wb") as f:
f.write(image_data)
The Python client is perfect for developers looking for a clean, Pythonic
approach to integrating HQAPI functionality.PHP Client: hqapi/hqapi-client
For PHP developers, HQAPI provides a fully type-hinted, PSR-12 compliant client that works seamlessly with Composer. It simplifies interactions with HQAPI endpoints, handling HTTP requests, JSON responses, and binary data automatically.Key Features
- Simple and consistent interface for all endpoints
- PHP 8+ compatible
- Automatic error handling
- Handles JSON and binary content
- Ready for Composer autoloading
Installation
Install via Composer:composer require hqapi/hqapi-clientExample Usage
Capturing a screenshot is straightforward:<?php
use HQAPI\ScreenshotClient;
use HQAPI\Exceptions\ApiException;
require 'vendor/autoload.php';
$client = new ScreenshotClient('YOUR_API_TOKEN_HERE');
try {
$response = $client->create(
url: 'https://hqapi.com/',
theme: 'dark',
full_page: true
);
file_put_contents('screenshot.png', $response->getContent());
echo 'Screenshot saved successfully!';
} catch (ApiException $e) {
echo 'API error: ' . $e->getMessage();
}