# Get website HTML

Fetch a public website page and retrieve its final URL, title and HTML with EnvoAPI. JavaScript rendering is included when needed.

`GET https://api.envoapi.com/v1/websites/content`

Operation ID: `getWebsiteContent`

## Authentication

See [Authentication](https://docs.envoapi.com/guides/authentication.md). Security alternatives (each object is one alternative):

```json
[
  {
    "BearerApiKey": []
  }
]
```

BearerApiKey:

```json
{
  "type": "http",
  "scheme": "bearer",
  "bearerFormat": "envo_<66 Base64url characters>"
}
```

## Credits

Uses the Website content Credit cost (initially 2 Credits), shared by HTML and text operations. Rendering and retries are included. Check your dashboard for current costs; example charges are illustrative.

## Parameters

### url

Location: query. Required: yes.

Schema: [WebsiteUrl](https://docs.envoapi.com/api/schemas/WebsiteUrl.md)

Example:

```json
"https://example.org/"
```

## Request example

```bash
curl "https://api.envoapi.com/v1/websites/content?url=https%3A%2F%2Fexample.org%2F" \
  --header "Authorization: Bearer $ENVO_API_KEY" \
  --header "Accept: application/json"
```

## Responses

### 200

Final page HTML, rendered when required. Treat returned HTML as untrusted content.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **X-Credits-Remaining**: Credits left on your account after this call. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Limit**: The Account's current rolling request ceiling. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Remaining**: Requests remaining in the current rolling window. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Reset**: Whole seconds until capacity resets, rounded up. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).

Content type: `application/json`.

Schema: [WebsiteContentSuccess](https://docs.envoapi.com/api/schemas/WebsiteContentSuccess.md)

| Field           | Required                  | Schema                                                                                                                                                          | Description                                                                    |
| --------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| data            | yes                       | [WebsiteContentData](https://docs.envoapi.com/api/schemas/WebsiteContentData.md)                                                                                | The result of the call. Fields we cannot fill are null.                        |
| data.url        | yes (when parent present) | [WebsiteUrl](https://docs.envoapi.com/api/schemas/WebsiteUrl.md)                                                                                                |                                                                                |
| data.title      | yes (when parent present) | {"anyOf":\[{"type":"string","maxLength":4096},{"type":"null"}]}                                                                                                 |                                                                                |
| data.html       | yes (when parent present) | {"type":"string","maxLength":2097152}                                                                                                                           | HTML from the fetched or rendered page. Treat it as untrusted website content. |
| meta            | yes                       | {"type":"object","properties":{"creditCost":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":\["creditCost"],"additionalProperties":false} | Information about the call itself.                                             |
| meta.creditCost | yes (when parent present) | {"type":"integer","minimum":0,"maximum":9007199254740991}                                                                                                       | How many credits this call used.                                               |

Response example:

```json
{
  "data": {
    "url": "https://example.org/",
    "title": "Example website",
    "html": "<html><head><title>Example website</title></head><body><p>Illustrative content.</p></body></html>"
  },
  "meta": {
    "creditCost": 2
  }
}
```

### 400

A request parameter is missing or invalid.

A parameter is missing or has a value we cannot use. Read error.details, fix the value and try again.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.

Content type: `application/json`.

Schema: [InvalidRequestErrorResponse](https://docs.envoapi.com/api/schemas/InvalidRequestErrorResponse.md)

### 401

Your API key is invalid or inactive.

Your API key is missing, wrong or switched off. Check it in your dashboard.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.

Content type: `application/json`.

Schema: [InvalidApiKeyErrorResponse](https://docs.envoapi.com/api/schemas/InvalidApiKeyErrorResponse.md)

### 402

Your account does not have enough credits.

Your account has no credits left. Top up, then send a new call.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.
* **X-Credits-Remaining**: Credits left on your account after this call. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Limit**: The Account's current rolling request ceiling. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Remaining**: Requests remaining in the current rolling window. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Reset**: Whole seconds until capacity resets, rounded up. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).

Content type: `application/json`.

Schema: [InsufficientCreditsErrorResponse](https://docs.envoapi.com/api/schemas/InsufficientCreditsErrorResponse.md)

### 403

Your API key or account cannot access this endpoint.

Your account is suspended or cannot use this endpoint. Resolve the account or its access first.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.

Content type: `application/json`.

Schema: [LookupForbiddenErrorResponse](https://docs.envoapi.com/api/schemas/LookupForbiddenErrorResponse.md)

### 404

The requested resource was not found.

Nothing matched what you sent. Check it for typos.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.
* **X-Credits-Remaining**: Credits left on your account after this call. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Limit**: The Account's current rolling request ceiling. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Remaining**: Requests remaining in the current rolling window. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Reset**: Whole seconds until capacity resets, rounded up. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).

Content type: `application/json`.

Schema: [ResourceNotFoundErrorResponse](https://docs.envoapi.com/api/schemas/ResourceNotFoundErrorResponse.md)

### 405

Use GET for this endpoint.

The route exists, but the request used a method other than GET. Use the method shown at the top of this page.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.
* **Allow**: Required response header. Schema: {"type":"string","const":"GET"}.

Content type: `application/json`.

Schema: [MethodNotAllowedErrorResponse](https://docs.envoapi.com/api/schemas/MethodNotAllowedErrorResponse.md)

### 406

The response format in your Accept header is not supported.

The Accept header asks for a format we do not send. Ask for JSON with a supported Accept value.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.

Content type: `application/json`.

Schema: [NotAcceptableErrorResponse](https://docs.envoapi.com/api/schemas/NotAcceptableErrorResponse.md)

### 415

The Content-Type in your request is not supported.

The request declared a media type we do not accept. Remove the body or use the documented media type.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.

Content type: `application/json`.

Schema: [UnsupportedMediaTypeErrorResponse](https://docs.envoapi.com/api/schemas/UnsupportedMediaTypeErrorResponse.md)

### 429

Your account has sent too many requests.

Too many calls in a short time. Honor Retry-After; use bounded retries with backoff and jitter.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.
* **X-RateLimit-Limit**: The Account's current rolling request ceiling. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Remaining**: Requests remaining in the current rolling window. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Reset**: Whole seconds until capacity resets, rounded up. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **Retry-After**: Seconds to wait before you try again. Schema: [PositiveSafeInteger](https://docs.envoapi.com/api/schemas/PositiveSafeInteger.md).

Content type: `application/json`.

Schema: [RateLimitExceededErrorResponse](https://docs.envoapi.com/api/schemas/RateLimitExceededErrorResponse.md)

### 500

A server error prevented the request from completing.

Something failed on our side. Retry only when error.retryable is true.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.
* **X-Credits-Remaining**: Credits left on your account after this call. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Limit**: The Account's current rolling request ceiling. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Remaining**: Requests remaining in the current rolling window. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Reset**: Whole seconds until capacity resets, rounded up. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).

Content type: `application/json`.

Schema: [InternalServerErrorResponse](https://docs.envoapi.com/api/schemas/InternalServerErrorResponse.md)

### 502

A data source returned an invalid response.

A data source sent back something we could not use. Retry with bounded backoff.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.
* **X-Credits-Remaining**: Credits left on your account after this call. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Limit**: The Account's current rolling request ceiling. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Remaining**: Requests remaining in the current rolling window. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Reset**: Whole seconds until capacity resets, rounded up. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).

Content type: `application/json`.

Schema: [UpstreamErrorResponse](https://docs.envoapi.com/api/schemas/UpstreamErrorResponse.md)

### 503

The service is unavailable. Check error.retryable before retrying.

Lookups are unavailable for a moment. Follow error.retryable, and Retry-After when it is present.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.
* **Retry-After**: Seconds to wait before you try again. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Limit**: The Account's current rolling request ceiling. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Remaining**: Requests remaining in the current rolling window. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Reset**: Whole seconds until capacity resets, rounded up. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-Credits-Remaining**: Credits left on your account after this call. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).

Content type: `application/json`.

Schema: [ServiceUnavailableErrorResponse](https://docs.envoapi.com/api/schemas/ServiceUnavailableErrorResponse.md)

### 504

The request timed out.

The lookup ran out of time. Retry with bounded backoff.

* **Date**: Required response header. Schema: [HttpDateHeader](https://docs.envoapi.com/api/schemas/HttpDateHeader.md).
* **Cache-Control**: Do not cache the reply. Schema: [CacheControlHeader](https://docs.envoapi.com/api/schemas/CacheControlHeader.md).
* **X-Request-Id**: A unique ID for this call. Quote it if you contact support. Schema: [RequestId](https://docs.envoapi.com/api/schemas/RequestId.md).
* **Content-Type**: Required response header. Schema: {"type":"string","const":"application/json; charset=utf-8"}.
* **X-Credits-Remaining**: Credits left on your account after this call. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Limit**: The Account's current rolling request ceiling. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Remaining**: Requests remaining in the current rolling window. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).
* **X-RateLimit-Reset**: Whole seconds until capacity resets, rounded up. Schema: [NonNegativeSafeInteger](https://docs.envoapi.com/api/schemas/NonNegativeSafeInteger.md).

Content type: `application/json`.

Schema: [UpstreamTimeoutErrorResponse](https://docs.envoapi.com/api/schemas/UpstreamTimeoutErrorResponse.md)

## Related documentation

* [Authentication](https://docs.envoapi.com/guides/authentication.md)

* [Errors](https://docs.envoapi.com/guides/errors.md)

* [Pagination](https://docs.envoapi.com/guides/pagination.md)

* [Rate limits](https://docs.envoapi.com/guides/rate-limits.md)

* [Get website text](https://docs.envoapi.com/api/operations/getwebsitetext.md)

* [Find published website emails](https://docs.envoapi.com/api/operations/searchwebsiteemails.md)

[Documentation index](https://docs.envoapi.com/llms.txt) · [All endpoints](https://docs.envoapi.com/api/index.md)
