# Percall API

> Pay-per-request API platform with instant micropayment settlement via x402 v2 on Base Mainnet.

## Overview
Percall API provides pay-as-you-go APIs for autonomous AI agents and developers. Rather than requiring subscriptions or API keys, endpoints return HTTP 402 with an EIP-3009 payment challenge. Once signed by a funded wallet, endpoints return instant structured data.

- Homepage: https://percallapi.com/
- OpenAPI 3.1 Specification: https://percallapi.com/openapi.json
- Agentic Resource Discovery Manifest: https://percallapi.com/.well-known/ard.json
- Settlement Network: Base Mainnet (eip155:8453)
- Settlement Asset: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
- Payment Protocol: x402 Version 2 (EIP-3009 transfer authorization)
- Receiving Address: 0xED6013a7f5A5cD54E21e5BDf8028a76A4E7b2ee5

## Available Endpoints

### 1. Domain WHOIS Lookup
- Endpoint: `https://percallapi.com/whois`
- Method: `GET`
- Price: `0.01 USDC` (10,000 base units)
- Access Mode: `per_request`
- Query Parameters:
  - `domain` (string, required): Domain name to query (e.g. `cloudflare.com`, `coinbase.com`).
- Response Format: `application/json`
- Unpaid Response: `HTTP 402 Payment Required` with x402 v2 challenge headers.
- Paid Response: `HTTP 200 OK` with full WHOIS records (domain_name, registrar, status, creation_date, expiration_date, name_servers).

### How AI Agents Invoke This API
1. Send initial GET request to `https://percallapi.com/whois?domain=example.com`, `https://percallapi.com/carrier-lookup?phone=+14157012311`, or `https://percallapi.com/caller-id?phone=+14157012311`.
2. Parse `HTTP 402` response containing price, USDC asset, and payment challenge parameters.
3. Sign EIP-3009 transfer authorization using agent's Base wallet.
4. Resubmit GET request with `payment-signature: <signed_payload>` header to retrieve data.

### 2. Carrier & VoIP Fraud Detection
- Endpoint: `https://percallapi.com/carrier-lookup`
- Method: `GET`
- Price: `0.01 USDC` (10,000 base units)
- Access Mode: `per_request`
- Query Parameters:
  - `phone` (string, required): E.164 formatted phone number (e.g. `+14157012311`).
- Response Format: `application/json`
- Unpaid Response: `HTTP 402 Payment Required` with x402 v2 challenge headers.
- Paid Response: `HTTP 200 OK` with carrier name, line type (mobile vs. landline vs. voip), MNC/MCC codes, and fraud risk indicators.

### 3. Caller ID & Real-Time Line Status
- Endpoint: `https://percallapi.com/caller-id`
- Method: `GET`
- Price: `0.04 USDC` (40,000 base units)
- Access Mode: `per_request`
- Query Parameters:
  - `phone` (string, required): E.164 formatted phone number (e.g. `+14157012311`).
- Response Format: `application/json`
- Unpaid Response: `HTTP 402 Payment Required` with x402 v2 challenge headers.
- Paid Response: `HTTP 200 OK` with CNAM registered caller name, real-time live connection status (active/inactive), carrier details, and line intelligence.

### 4. Live Web Search (Brave Index)
- Endpoint: `https://percallapi.com/search`
- Method: `GET`
- Price: `0.01 USDC` (10,000 base units)
- Access Mode: `per_request`
- Query Parameters:
  - `q` (string, required): Search query string (e.g. `x402 protocol base`).
  - `count` (number, optional): Number of results (1-20, default 5).
- Response Format: `application/json`
- Unpaid Response: `HTTP 402 Payment Required` with x402 v2 challenge headers.
- Paid Response: `HTTP 200 OK` with ranked web search results (title, url, description, extra_snippets, published_date).

### 5. Breaking News & Market Events
- Endpoint: `https://percallapi.com/news`
- Method: `GET`
- Price: `0.01 USDC` (10,000 base units)
- Access Mode: `per_request`
- Query Parameters:
  - `q` (string, required): News topic or ticker (e.g. `base crypto upgrade`).
  - `count` (number, optional): Number of news articles (1-20, default 5).
- Response Format: `application/json`
- Unpaid Response: `HTTP 402 Payment Required` with x402 v2 challenge headers.
- Paid Response: `HTTP 200 OK` with fresh breaking news articles (title, url, description, publisher, published_date).
