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

# GET /v1/x402-endpoints/by-url

Check if an x402 endpoint exists by URL

` GET /v1/x402-endpoints/by-url `

Check if an x402 endpoint exists by URL

## Parameters

### ` url ` (query, required)

Resource URL to check

- ` value `: type ` string `

## Request body (optional)

Content type: ` application/json `

- ` value `: type ` object `

## Responses

### ` 200 ` — OK

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

    - example: ` 200 `

  - ` data `: type ` object `

    - ` endpoint `: type ` object `

      - ` avgResponseMs `: type ` integer `

      - ` baseUrl `: type ` string ` — === ENDPOINT IDENTITY === BaseURL is the clean URL without query params (e.g., "https://api.example.com/search")

      - ` bodyParams `: type ` object `

      - ` category `: type ` string `

      - ` createdAt `: type ` string ` — === TIMESTAMPS ===

      - ` defaultBody `: type ` object `

      - ` defaultHeaders `: type ` object `

      - ` defaultQueryParams `: type ` object ` — Default values (applied if user doesn't provide at runtime)

      - ` description `: type ` string `

      - ` exampleBody `: type ` unknown `

      - ` exampleOutput `: type ` unknown `

      - ` exampleQueryParams `: type ` object ` — === EXAMPLES ===

      - ` failureCount `: type ` integer `

      - ` headerParams `: type ` object `

      - ` id `: type ` string `

      - ` inputSummary `: type ` string `

      - ` lastCalledAt `: type ` string `

      - ` lastError `: type ` string `

      - ` lastErrorAt `: type ` string `

      - ` maxAllowedPrice `: type ` string ` — Price protection (auto 5x of import price)

      - ` method `: type ` string ` — GET, POST, PUT, DELETE

      - ` mimeType `: type ` string `

      - ` name `: type ` string ` — === METADATA ===

      - ` network `: type ` string `

      - ` outputSchema `: type ` object ` — === OUTPUT ===

      - ` outputSummary `: type ` string `

      - ` payTo `: type ` string `

      - ` price `: type ` string ` — === PAYMENT INFO ===

      - ` queryParams `: type ` object ` — === INPUT CONFIGURATION === CDP-aligned flat structure: {"paramName": {"type": "string", "description": "...", "required": true}}

      - ` source `: type ` string `

        - enum: ` ["user_import","cdp_bazaar"] `

      - ` spentByToken `: type ` object ` — Multi-token spending tracker: {"0x833...": "50000", "0xb3b...": "1000000000000000000"}

      - ` successCount `: type ` integer ` — === STATS ===

      - ` tags `: type ` array `

        - ` array item `: type ` string `

      - ` tokenAddress `: type ` string `

      - ` tokenDecimals `: type ` integer `

      - ` tokenSymbol `: type ` string `

      - ` totalCalls `: type ` integer `

      - ` updatedAt `: type ` string `

      - ` useCases `: type ` array ` — === AI FIELDS ===

        - ` array item `: type ` string `

    - ` exists `: type ` boolean `

  - ` message `: type ` string `

    - example: ` "success" `

  - ` requestId `: type ` string `

    - example: ` "abc-123" `

### ` 400 ` — Bad Request

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

## Request examples

### cURL

```curl
curl -X GET 'https://api.example.com/v1/x402-endpoints/by-url?url=string' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

### JavaScript

```javascript
const response = await fetch('https://api.example.com/v1/x402-endpoints/by-url?url=string', {
  method: 'GET',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({})
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.get('https://api.example.com/v1/x402-endpoints/by-url?url=string', headers=headers, json={})
print(response.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{}`)
	req, _ := http.NewRequest("GET", "https://api.example.com/v1/x402-endpoints/by-url?url=string", body)
	req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
	req.Header.Set("Content-Type", "application/json")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
	result, _ := io.ReadAll(resp.Body)
	fmt.Println(string(result))
}
```