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

# Errors

> Linkup API errors and how to handle them

This guide includes an overview of error codes you might see from both the API and our SDKs.

## API errors

Whatever the HTTP error code is, the response payload will contain the following object:

**`statusCode`**: number - HTTP error code.

**`error`**: object - Linkup error details containing:

* **`code`**: string - Error name
* **`message`**: string - Description of the error
* **`details`**: array - Details of the error. This array may be empty or include objects with the following properties:
  * **`field`**: string - The field that caused the error
  * **`message`**: string - A description of the field error

Here is an example:

```json theme={"system"}
{
	"statusCode": 400,
	"error": {
		"code": "VALIDATION_ERROR",
		"message": "Validation failed",
		"details": [
			{
				"field": "outputType",
				"message": "outputType must be one of the following values: sourcedAnswer, searchResults, structured"
			}
		]
	}
}
```

**API error codes**

| Code | Possible Reasons |
| - | - |
| `400` - Bad Request | <ul><li>Required parameter is missing</li><li>Invalid parameter</li><li>Search query yields no result</li><li>Fetch request targets an HTML page > 20MB or a PDF > 100MB</li><li>Fetch request returned an unsupported content type</li><li>Fetch target URL was not found</li><li>Fetch target URL is unreachable (connection failed or timed out)</li><li>Fetch `instructions` sent without `schema`</li><li>Fetch `schema` is not a JSON Schema object</li><li>Fetch structured extraction failed after the page was fetched</li></ul> |
| `401` - Unauthorized | API Key is missing or invalid |
| `402` - Payment Required | x402 payment signature is missing, invalid, or settlement failed. See [x402 docs](https://docs.linkup.so/pages/documentation/platform/x402.md) |
| `403` - Forbidden | API key does not have permission to access this resource |
| `409` - Conflict | Resource conflict (e.g., duplicate entry or conflicting request) |
| `429` - Too Many Requests | You have run out of credit or you are sending too many concurrent requests |
| `500` - Internal Server Error | Something's up on our end |
| `504` - Gateway Timeout | Request deadline exceeded |

## SDK errors

**Python & JS SDK error types**

| Type | Reason |
| - | - |
| `LinkupInvalidRequestError` | Required parameter is missing, or invalid parameter |
| `LinkupNoResultError` | Search query yields no result |
| `LinkupAuthenticationError` | API Key is missing, invalid or you do not have permission to access this resource |
| `LinkupInsufficientCreditError` | You have run out of credit |
| `LinkupTooManyRequestsError` | You are sending too many concurrent requests |
| `LinkupFetchError` | The provided URL can't be fetched |
| `LinkupFetchResponseTooLargeError` | The provided URL's response is too large to be processed (>20MB for HTML, >100MB for PDF) |
| `LinkupFetchTargetNotFoundError` | The target URL was not found |
| `LinkupFetchTargetUnreachableError` | The target URL could not be reached (connection failed or timed out) |
| `LinkupFetchUnsupportedContentTypeError` | The URL returned a content type that cannot be processed (e.g. binary, media) |
| `LinkupUnknownError` | Anything else |


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