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

# Check if a URL already exists

> Checks whether a normalized URL already exists in completed URL training data for the current organization.

Checks whether a normalized URL already exists in completed URL training data for the current organization.

```http
GET https://api.weav.com/v1/training-data/url/exists?url=https%3A%2F%2Fwww.example.com%2Fdocs%2F
```

Requires a token with the `external-api:read` or `external-api:write` ability.

## Query parameters

<ParamField query="url" type="string" required>
Maximum length: 2048.
</ParamField>

## Request

<CodeGroup>

```bash cURL
curl --request GET \
  --url 'https://api.weav.com/v1/training-data/url/exists?url=https%3A%2F%2Fwww.example.com%2Fdocs%2F' \
  --header "Authorization: Bearer ${WEAV_API_TOKEN}"
```

```js JavaScript
const response = await fetch("https://api.weav.com/v1/training-data/url/exists?url=https%3A%2F%2Fwww.example.com%2Fdocs%2F", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.WEAV_API_TOKEN}`
  }
});
console.log(await response.json());
```

```python Python
import os
import requests

headers = {"Authorization": f"Bearer {os.environ['WEAV_API_TOKEN']}"}
response = requests.get("https://api.weav.com/v1/training-data/url/exists?url=https%3A%2F%2Fwww.example.com%2Fdocs%2F", headers=headers)
print(response.json())
```

```php PHP
use GuzzleHttp\Client;

$client = new Client();
$response = $client->request('GET', 'https://api.weav.com/v1/training-data/url/exists?url=https%3A%2F%2Fwww.example.com%2Fdocs%2F', [
    'headers' => ['Authorization' => 'Bearer '.getenv('WEAV_API_TOKEN')],
]);
echo $response->getBody();
```

</CodeGroup>

## Response

<CodeGroup>

```json 200 OK
{
    "exists": true
}
```

```json 400 Bad Request
{
    "error": "Error message",
    "code": "ERROR_CODE",
    "errors": {}
}
```

</CodeGroup>

- `401` Unauthorized

## Response fields

<ParamField body="exists" type="boolean">

</ParamField>

---

This knowledge base is built and hosted on [Weav](https://weav.com).
