apyhub
DEVELOPER TOOLS · FINANCE

Account Balance

What it does

Account Balance lets you check your ApyHub account subscription and credit balance with a simple authenticated request. Use it when you need to confirm account status before running jobs, throttling usage, or surfacing billing information in your own app.

Send your API key as apikey in the query string, and you can also pass output as a query parameter. The service exposes two read-only endpoints: one for subscription details at /v1/account/subscription, and one for credit balance at /v1/account/credit-balance.

The responses are defined by the API schema, so you can integrate them directly into account dashboards, usage guards, or internal admin tools. If your workflow depends on remaining credits or subscription state, Account Balance gives you the account lookup step without extra parsing or side effects.

▣ ENDPOINT 01 / 02
GET
subscription
http://localhost:8080/pankajretestflows/account-system/v1/account/subscription

QUICKSTART

GUIDE

Quickstart

Fetch the current subscription details by sending your API key and optional output format as query parameters.

curl -X GET "http://localhost:8080/pankajretestflows/account-system/v1/account/subscription?apikey=$APY_TOKEN&output=json"

What you'll get back

Returns a minimal acknowledgement; see the Docs tab for the full response shape.

TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Retrieves the current account subscription information for the authenticated request. The output schema is not yet defined, so the exact response shape is not documented here.

Query Parameter(s)

AttributeTypeMandatoryDescription
apikeyStringNoAPI key used to authenticate the request.
outputStringNoResponse format selector.

Response

The endpoint returns a minimal acknowledgement on success — the detailed shape is not yet captured in the schema.

Query parameters

Name
Type
Description
apikeyOPTIONAL
string
outputOPTIONAL
string
▣ ENDPOINT 02 / 02
GET
credit-balance
http://localhost:8080/pankajretestflows/account-system/v1/account/credit-balance

QUICKSTART

GUIDE

Quickstart

Fetch the SERP classic locations for a query, with optional filters passed as query parameters.

curl -X GET "http://localhost:8080/pankajretestflows/account-system/v1/account/credit-balance?q=new%20york&include=all&country_code=us" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Expected to return a list of matching locations — not yet confirmed from a sample response.

TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
API key passed as a query parameter.
Response format selector (e.g. json, xml), per the API-level 'about' section.

About this endpoint

What it does

Looks up SERP Classic-supported search locations, filterable by a free-text query, an include list, and/or a country code. Used to resolve valid location_id values before submitting a task (see Add Task endpoint), so you can target location-sensitive search queries correctly.

⚠️ No sample response was available for this endpoint yet. Everything under Response/Output Schema below is a reasonable assumption based on the endpoint's stated purpose (a location lookup) and its relationship to location_id used elsewhere in this API — it has not been confirmed from a real response. Treat it as a placeholder until a sample is captured. See "Notes / Discrepancies" below.

Query Parameter(s)

AttributeTypeMandatoryDescription
qStringNoSearch term used to look up locations.
includeStringNoAdditional locations to include in the results.
country_codeStringNoCountry code used to scope the location lookup.

Response

Expected to return a list of matching location objects (each likely including at minimum an id — matching the location_id field used in Add Task — plus a display name and possibly country/region info). Not confirmed from a sample response yet.

Query parameters

Name
Type
Description
apikeyOPTIONAL
string
API key passed as a query parameter.
outputOPTIONAL
string
Response format selector (e.g. json, xml), per the API-level 'about' section.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.