> ## Documentation Index
> Fetch the complete documentation index at: https://glasser.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Call a specific Endpoint

Call a known Endpoint from your backend through the **HTTP API**. No Agent is required.

<div className="integration-map integration-map-direct" role="img" aria-label="Your backend calls a fixed Endpoint through Glasser's HTTP API. Glasser executes the Run with the Provider and returns the result.">
  <span className="integration-map-node"><strong>Your backend</strong><span>Fixed Endpoint</span></span>
  <span className="integration-map-arrow">→</span>
  <span className="integration-map-node integration-map-glasser"><strong>Glasser</strong><span>HTTP API</span></span>
  <span className="integration-map-arrow">→</span>
  <span className="integration-map-node"><strong>Provider</strong><span>Data</span></span>
</div>

## Call an Endpoint

Example: take an Instagram username from your app and retrieve its latest public posts.

<Steps>
  <Step title="Connect your backend">
    **Base URL:** `https://api.glasser.ai`<br />
    **Header:** `Authorization: Bearer <your Key>`

    **Your product's account:** use your Workspace's [Key](https://app.glasser.ai/keys).<br />
    **Your user's account:** select that user's Key for each request.

    Store Keys on your backend. Check the connection with a free
    [GET /v1/balance](/docs/api-reference/balance/get) request.
  </Step>

  <Step title="Inspect the Endpoint once during setup">
    Send JSON to [POST /v1/endpoints/inspect](/docs/api-reference/endpoints/inspect):

    ```json wrap theme={null}
    {
      "provider": "apify",
      "endpoint": "/apify/instagram-post-scraper"
    }
    ```

    **Get:** input schema and current Price. This Endpoint requires `username`,
    an array containing one username. Inspection is free.
  </Step>

  <Step title="Call it from your product">
    Send JSON to [POST /v1/runs](/docs/api-reference/runs/create). Use the same
    Authorization header, `Content-Type: application/json`, and a unique
    `Idempotency-Key` header for this intended execution.

    ```json wrap theme={null}
    {
      "provider": "apify",
      "endpoint": "/apify/instagram-post-scraper",
      "input": { "username": ["mkbhd"] }
    }
    ```

    Replace `mkbhd` with your user's input.

    **Get:** a Run with `id`, `status`, and `charge_usd`. When ready, `output`
    contains up to 10 public posts with captions, like counts, and comment counts.

    For `QUEUED` or `RUNNING`, [read that Run](/docs/api-reference/runs/get) until
    it reaches a terminal state. Runs use the connected Workspace's balance.
  </Step>
</Steps>

<Accordion title="Retries and response handling">
  * Set `endpoint_version` from Inspect, or omit it to use the default version.
    A version does not lock the Price; new Runs use the Price at admission.
  * Retry the same request with the **same** `Idempotency-Key` and input. Keep
    reading an unfinished Run instead of creating another one.
  * Check both `status` and `provider_response.http_status` before using
    `output`. A `COMPLETED` Run can still contain a Provider error.
  * Keep the Run ID and `charge_usd` with your product's request record.
    A failed Run can still have a charge under the Endpoint's Price.
  * Keep each user's Key separate. Select it from their authenticated connection,
    not from the request's input fields.
</Accordion>

## Browse Provider APIs

Choose an Endpoint in [Data Sources](https://glasser.ai/data-sources), then
Inspect it for its schema. You can reuse it without searching before every Run.

To list Providers and Endpoints in code, use
[GET /public/catalog](/docs/api-reference/endpoints/list). No Key is required, and
the request is free:

```bash wrap theme={null}
curl https://api.glasser.ai/public/catalog
```

* **`providers`:** Provider names, descriptions, and Endpoint counts.
* **`entries`:** Endpoint identifiers, descriptions, categories, and display
  prices. Match `provider` to find a Provider's Endpoints.
* **One response:** the full public list, with no pagination.

The response is cached and does not apply your Key's Policy. Use
[Inspect](/docs/api-reference/endpoints/inspect) with your Key for the selected
Endpoint's input schema and current Price before running it.

## Optional: Solutions

The **GTM Solution** offers six fixed capabilities through HTTP. Glasser handles
Endpoint selection, input mapping, and fallback for supported failures.

* [Web research](/docs/api-reference/solutions/gtm/web_research) — web search, news, and page content.
* [Company intelligence](/docs/api-reference/solutions/gtm/company_intelligence) — company details by domain.
* [People search](/docs/api-reference/solutions/gtm/people_search) — people and business contact information.
* [SEO research](/docs/api-reference/solutions/gtm/seo_research) — keywords, rankings, and backlinks.
* [Social research](/docs/api-reference/solutions/gtm/social_research) — social profiles, posts, and search.
* [Market data](/docs/api-reference/solutions/gtm/market_data) — property data and stock quotes.

Each Capability has its own API under `/v1/solutions/gtm/`. Use the same Key and
an `Idempotency-Key` header; the response is a Run. See
[Solutions overview](/docs/api-reference/solutions/overview) for an example and the
Provider selection rules.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.