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

# GET /resolve

> Turn a company, brand or product name into the domain of its official website. Costs 1 credit — 3 with a live lookup, 0 when nothing matches.

## Overview

Every other endpoint takes a URL. `/resolve` is how you get one when all you have is a name: `Stripe` → `stripe.com`, `Delta` → `delta.com`, `The Coca-Cola Company` → `coca-cola.com`.

Results are ranked, one per domain, and each carries a `confidence` from 0 to 1. Only the first result can reach **0.8** — when it does, that is the answer; anything lower is a candidate to check. Case, accents, punctuation and legal suffixes don't matter: "The Coca-Cola Company", "coca-cola" and "Coca Cola" are the same query.

Answers come from two places:

* **The name index** — about 550,000 brands, companies, websites, software products and publications, in milliseconds. Reviewed brand data always ranks first.
* **A live lookup** — only with `live=true`, and only when the index has no answer at 0.8 or above. Candidate domains are proposed and each is checked against its own homepage: the site has to call itself by the name you asked for. Parked and for-sale domains never pass. It takes a few seconds, and the verified answer is added to the index, so the next lookup of that name is instant.

## Example requests

<CodeGroup>
  ```bash Index only theme={"theme":"css-variables"}
  curl "https://api.prefetch.io/resolve?name=Delta" \
    -H "X-API-Key: $PREFETCH_API_KEY"
  ```

  ```bash With a live lookup theme={"theme":"css-variables"}
  curl "https://api.prefetch.io/resolve?name=Linear&live=true" \
    -H "X-API-Key: $PREFETCH_API_KEY"
  ```

  ```javascript Node.js theme={"theme":"css-variables"}
  const params = new URLSearchParams({ name: "Delta", live: "true" });

  const res = await fetch(`https://api.prefetch.io/resolve?${params}`, {
    headers: { "X-API-Key": process.env.PREFETCH_API_KEY },
  });
  const { data } = await res.json();

  const [best] = data.results;
  if (best && best.confidence >= 0.8) {
    console.log(`${data.query} → ${best.domain}`);
  } else {
    console.log("No confident answer; candidates:", data.results.map((r) => r.domain));
  }
  ```

  ```python Python theme={"theme":"css-variables"}
  import requests, os

  r = requests.get(
      "https://api.prefetch.io/resolve",
      params={"name": "Delta", "live": "true"},
      headers={"X-API-Key": os.environ["PREFETCH_API_KEY"]},
  )
  results = r.json()["data"]["results"]
  if results and results[0]["confidence"] >= 0.8:
      print(results[0]["domain"])
  ```
</CodeGroup>

## Example response

```json theme={"theme":"css-variables"}
{
  "success": true,
  "data": {
    "query": "Delta",
    "results": [
      { "name": "Delta Air Lines", "domain": "delta.com", "url": "https://delta.com", "confidence": 0.92, "source": "index" },
      { "name": "DELTA", "domain": "delta.nl", "url": "https://delta.nl", "confidence": 0.79, "source": "index" },
      { "name": "Delta Holding", "domain": "deltaholding.rs", "url": "https://deltaholding.rs", "confidence": 0.79, "source": "index" }
    ],
    "count": 3,
    "live_used": false,
    "warnings": []
  },
  "meta": {
    "requestId": "b4e3d2c1-8a7b-4c3d-9e2f-1a3b5c7d9e1f",
    "durationMs": 41
  }
}
```

## Reading the response

| Field | Meaning |
| - | - |
| `results[0].confidence` | 0.8 or above: this is the answer. Below: a candidate — check it, or retry with `live=true`. |
| `source` | `curated` (reviewed brand data), `index` (the name index), or `live` (verified against the site during this request). |
| `domain` | A bare host, ready for the `url` parameter of `/enrich`, `/brand`, `/company` and the rest. |
| `live_used` | Whether the live lookup ran — and so whether you were billed 3 credits. |
| `warnings` | Non-fatal notes. If the live lookup could not run (the service was busy, for example) you get the index's answer, billed at the index price, and a warning saying so. |

Nothing matched is still a `200` with an empty `results` list.

## Credits

| Outcome | Credits |
| - | - |
| Answered from the index | 1 |
| Nothing matched (without `live`) | 0 |
| `live=true` and the live lookup ran | 3 — whether or not it found anything |
| `live=true`, but the index was already confident | 1 |

## Typeahead

`/resolve` also completes partial names — `stri` returns Stripe first — which makes it usable behind a search box. Completions are always below 0.8: they are suggestions, not answers. Leave `live` off for typeahead, and debounce keystrokes: each request counts against your rate limit.

## Related

<CardGroup cols={2}>
  <Card title="GET /enrich" icon="layer-group" href="/api-reference/endpoint/enrich">
    Everything about the company behind the domain you just found. **12 credits.**
  </Card>

  <Card title="GET /brand" icon="palette" href="/api-reference/endpoint/brand">
    Colors, fonts and logos for it. **10 credits.**
  </Card>
</CardGroup>


## OpenAPI

````yaml GET /resolve
openapi: 3.1.0
info:
  title: Prefetch API
  description: >-
    Extract brand identity, company data, screenshots, IAB classifications, and
    clean page content from any URL.
  version: 1.0.0
  contact:
    email: support@prefetch.io
servers:
  - url: https://api.prefetch.io
    description: Production
security:
  - apiKey: []
tags:
  - name: Endpoints
    description: Data extraction endpoints. All require authentication and consume credits.
  - name: Health
    description: Health and readiness probes. No authentication required.
paths:
  /resolve:
    get:
      tags:
        - Endpoints
      summary: Find a domain from a name
      description: >-
        Resolves a company, brand or product name to the domain of its official
        website — `Stripe` → `stripe.com` — ready to pass to every other
        endpoint. Results are ranked, one per domain, each with a confidence; at
        0.8 or above, `results[0]` is the answer. **Credit cost: 1** from the
        index, **3** when a live lookup runs, **0** when an index-only lookup
        finds nothing.
      operationId: resolveName
      parameters:
        - name: name
          in: query
          required: true
          description: >-
            The company, brand or product name (1–100 characters). Case,
            accents, punctuation and legal suffixes are ignored: "The Coca-Cola
            Company" and "coca cola" are the same query.
          schema:
            type: string
            minLength: 1
            maxLength: 100
          example: Stripe
        - name: limit
          in: query
          required: false
          description: Maximum number of results.
          schema:
            type: integer
            minimum: 1
            maximum: 10
            default: 5
        - name: live
          in: query
          required: false
          description: >-
            When no answer reaches 0.8, look the name up live: candidate domains
            are verified against their own homepages. Takes a few seconds;
            billed 3 credits when the live lookup runs.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Matches, best first. Empty when nothing matched.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/ResolveData'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - success
                  - data
                  - meta
              example:
                success: true
                data:
                  query: Delta
                  results:
                    - name: Delta Air Lines
                      domain: delta.com
                      url: https://delta.com
                      confidence: 0.92
                      source: index
                    - name: DELTA
                      domain: delta.nl
                      url: https://delta.nl
                      confidence: 0.79
                      source: index
                  count: 2
                  live_used: false
                  warnings: []
                meta:
                  requestId: b4e3d2c1-8a7b-4c3d-9e2f-1a3b5c7d9e1f
                  durationMs: 41
        '400':
          description: Missing, empty or over-long name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Revoked key, expired key, or credit limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service temporarily unavailable — retry shortly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '504':
          description: Request timed out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ResolveData:
      type: object
      properties:
        query:
          type: string
          description: The name, as resolved (whitespace collapsed).
          example: Stripe
        results:
          type: array
          items:
            $ref: '#/components/schemas/ResolveResultItem'
          description: Best match first; one entry per domain. Empty when nothing matched.
        count:
          type: integer
        live_used:
          type: boolean
          description: >-
            Whether the live lookup ran — and so whether the request was billed
            3 credits.
        warnings:
          type: array
          items:
            type: string
          description: >-
            Non-fatal notes, e.g. a live lookup skipped because the service was
            busy.
      required:
        - query
        - results
        - count
        - live_used
        - warnings
    Meta:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
          description: Unique identifier for this request.
          example: a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d
        durationMs:
          type: integer
          nullable: true
          description: Time taken to process the request in milliseconds.
          example: 1842
      required:
        - requestId
        - durationMs
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
          description: >-
            Always false. Absent, like `meta`, on authentication and rate-limit
            errors, which are answered before a request is processed.
        error:
          type: string
          description: >-
            Human-readable error message. The wording can change: branch on
            `error_code`.
          example: Credit limit exceeded
        error_code:
          type: string
          enum:
            - INVALID_REQUEST
            - PAYLOAD_TOO_LARGE
            - NOT_FOUND
            - CONFLICT
            - UNAUTHORIZED
            - FORBIDDEN
            - CREDITS_EXHAUSTED
            - RATE_LIMITED
            - CONCURRENCY_LIMITED
            - URL_BLOCKED
            - URL_NOT_PERMITTED
            - DNS_RESOLUTION_FAILED
            - TARGET_BLOCKED
            - TARGET_CONNECTION_FAILED
            - TARGET_TIMEOUT
            - TARGET_SSL_ERROR
            - TARGET_SERVER_ERROR
            - TARGET_CLIENT_ERROR
            - TARGET_NOT_A_PAGE
            - TARGET_UNLOADABLE
            - RESEARCH_INCONCLUSIVE
            - TIMEOUT
            - SERVICE_BUSY
            - SERVICE_UNAVAILABLE
            - INTERNAL_ERROR
          description: >-
            What went wrong, for machines. Stable: a code keeps its meaning once
            published. See [Error handling](/concepts/errors).
          example: CREDITS_EXHAUSTED
        retryable:
          type: boolean
          description: >-
            Whether the same request can succeed if sent again after a short
            wait (honour `Retry-After` when present). False for problems with
            the request or the target.
          example: false
        retryAfterSeconds:
          type: integer
          description: 'On `RATE_LIMITED`: seconds until a request will be accepted.'
        limit:
          type: integer
          description: >-
            On `CONCURRENCY_LIMITED`: how many requests this key may have in
            flight.
        meta:
          $ref: '#/components/schemas/Meta'
      required:
        - error
        - error_code
        - retryable
    ResolveResultItem:
      type: object
      properties:
        name:
          type: string
          example: Stripe
        domain:
          type: string
          description: Bare host, ready for the `url` parameter of every other endpoint.
          example: stripe.com
        url:
          type: string
          example: https://stripe.com
        confidence:
          type: number
          description: >-
            0–1. Only `results[0]` can reach 0.8; at or above it, that result is
            the answer. Below it, a candidate to check.
          example: 0.97
        source:
          type: string
          enum:
            - curated
            - index
            - live
          description: >-
            `curated`: reviewed brand data. `index`: the name index. `live`:
            verified against the site during this request.
      required:
        - name
        - domain
        - url
        - confidence
        - source
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Prefetch API key. Obtain one from the dashboard.

````

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