# eBay API

$0.005 per call, pay only for 200 responses  
eBay product search and item data API for AI agents. eBay search or item URLs return JSON listings or product details with titles, prices, condition, shipping and links when available. Supports marketplace research and price comparison.

/ebay5 credits / requestCommerce

## x402 pay per call

**$0.005 per successful call**, paid in USDC on Base. No account or API key required. The live PAYMENT-REQUIRED header quotes the authoritative price.

### curl request

```
curl -i 'https://api.fastaf.co/x402/v1/ebay?resource=search&url=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_nkw%3Dmechanical%2Bkeyboard'
```

### Example 402 payment challenge

Illustrative recipient address, not a payment destination. Request a fresh challenge, sign it with an x402 v2 client and retry the same URL with PAYMENT-SIGNATURE. The header is base64 JSON v2; the compatibility body uses v1 aliases on Base. Only successful results settle.

```
HTTP/1.1 402 Payment Required
Content-Type: application/json
PAYMENT-REQUIRED: eyJ4NDAyVmVyc2lvbiI6MiwicmVzb3VyY2UiOnsidXJsIjoiaHR0cHM6Ly9hcGkuZmFzdGFmLmNvL3g0MDIvdjEvZWJheT9yZXNvdXJjZT1zZWFyY2gmdXJsPWh0dHBzJTNBJTJGJTJGd3d3LmViYXkuY29tJTJGc2NoJTJGaS5odG1sJTNGX25rdyUzRG1lY2hhbmljYWwlMkJrZXlib2FyZCIsImRlc2NyaXB0aW9uIjoiRmFzdEFGIGVCYXkgTGlzdGluZ3MgJiBJdGVtIERhdGEiLCJtaW1lVHlwZSI6ImFwcGxpY2F0aW9uL2pzb24ifSwiYWNjZXB0cyI6W3sic2NoZW1lIjoiZXhhY3QiLCJuZXR3b3JrIjoiZWlwMTU1Ojg0NTMiLCJhbW91bnQiOiI1MDAwIiwiYXNzZXQiOiIweDgzMzU4OWZDRDZlRGI2RTA4ZjRjN0MzMkQ0ZjcxYjU0YmRBMDI5MTMiLCJwYXlUbyI6IjB4MTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMSIsIm1heFRpbWVvdXRTZWNvbmRzIjozMDAsImV4dHJhIjp7Im5hbWUiOiJVU0QgQ29pbiIsInZlcnNpb24iOiIyIn19XX0=

{
  "error": "payment_required",
  "x402Version": 2,
  "resource": {
    "url": "https://api.fastaf.co/x402/v1/ebay?resource=search&url=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_nkw%3Dmechanical%2Bkeyboard",
    "description": "FastAF eBay Listings & Item Data",
    "mimeType": "application/json"
  },
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "amount": "5000",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "payTo": "0x1111111111111111111111111111111111111111",
      "maxTimeoutSeconds": 300,
      "extra": {
        "name": "USD Coin",
        "version": "2"
      }
    }
  ]
}
```

### Decoded PAYMENT-REQUIRED header

```
{
  "x402Version": 2,
  "resource": {
    "url": "https://api.fastaf.co/x402/v1/ebay?resource=search&url=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_nkw%3Dmechanical%2Bkeyboard",
    "description": "FastAF eBay Listings & Item Data",
    "mimeType": "application/json"
  },
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "amount": "5000",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "payTo": "0x1111111111111111111111111111111111111111",
      "maxTimeoutSeconds": 300,
      "extra": {
        "name": "USD Coin",
        "version": "2"
      }
    }
  ]
}
```

### JSON discovery response example

eBay search JSON. search\_results contains listing title, itemId, condition, price, extracted\_price, shipping and link when available. Item lookups return product\_results instead. This example is illustrative.

```
{
  "search_results": [
    {
      "position": 1,
      "itemId": "123456789012",
      "title": "Mechanical keyboard with brown switches",
      "condition": "Pre-owned",
      "price": "$45.00",
      "extracted_price": 45,
      "shipping": "Free shipping",
      "link": "https://www.ebay.com/itm/123456789012"
    }
  ]
}
```

### Response with an API key

The same data over REST with a prepaid key. The JSON body is the example above; failed requests are not charged.

```
curl -H "Authorization: Bearer $FASTAF_API_KEY" 'https://api.fastaf.co/v1/ebay?resource=search&url=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_nkw%3Dmechanical%2Bkeyboard'
```

### MCP tools

search\_ebay MCP tool calls require an API key or OAuth; x402 payments apply to HTTP data calls.

[Full endpoint reference for agents](/llms/ebay.txt)

## Pricing

**x402:** $0.005 per successful call, USDC on Base, no account. **API key:** 5 credits per request from one-time credit packs, without expiry. Credit packs are shared by every endpoint and never renew.

Pack

Price

Credits

Per call

Per 1,000 calls

Starter

$10

20,000

$0.0025

$2.50

Growth

$29

75,000

$0.00193

$1.93

Scale

$99

300,000

$0.00165

$1.65

Pro

$299

1,000,000

$0.0015

$1.50

Business

$799

3,000,000

$0.00133

$1.33

Free: 500 credits every month after email verification, no card. See [pricing](/pricing/). Alternatives: [FastAF vs SerpApi](/compare/serpapi/), [vs toll402](/compare/toll402/), [vs serp402](/compare/serp402/), [vs AgentBIT](/compare/agentbit/), [vs Amazon PA-API](/compare/amazon-pa-api/).

## Parameters

Name

Description

url

Required full HTTP(S) eBay search URL (/sch/...) or item URL (/itm/...) on an eBay country domain. Search/filter/pagination options go in this URL. No default.

resource

eBay operation: search or product. FastAF defaults to product for /itm/ URLs and search otherwise; both have the same price.

html

Return raw source HTML instead of parsed JSON when true; true/false, default false.

X-FastAF-Max-Spend

Optional spending cap in USD, decimal with up to 6 places (e.g. 0.01). If this route's fixed price is above it, the call is refused with 409 spend\_cap\_exceeded before any payment challenge. x402 clients sign every payment, so no session total is kept here.

## Response fields

*   search\_results

Passing these fields to an LLM? See [token-aware scraping: only what your LLM needs](/use-cases/token-aware-scraping/).

## Guides

*   [How to read public eBay data when your requests fail](/how-to/read-ebay-data/)
    
    eBay showing "Pardon our interruption"? Get public search and item data as JSON for 5 credits. API key, MCP or x402 pay-per-call.
    
*   [Add FastAF to Claude Code, Codex and Cursor](/how-to/add-fastaf-claude-code-codex-cursor/)
    
    One remote MCP server, three clients: the claude, codex and Cursor mcp.json setup for https://api.fastaf.co/mcp, with the API key auth it really uses.
    

## FAQ

### What data does this endpoint return?

eBay search JSON. search\_results contains listing title, itemId, condition, price, extracted\_price, shipping and link when available. Item lookups return product\_results instead.

### Do I need an account for x402?

No. Pay per successful call in USDC on Base using an x402 client.

### How much does one eBay API call cost?

With x402 it is $0.005 per successful call in USDC on Base, with no account. With an API key it is 5 credits per request, which is $0.0025 on the $10 Starter pack down to $0.00133 on the $799 Business pack. Failed requests are never charged.

### Do I need an account or an API key for eBay API?

Not for x402: send the request, pay the 402 challenge in USDC and retry. For credits, sign up free, confirm your email and use the API key in the Authorization header. Accounts get 500 free credits every month after email verification; they do not apply to x402.

## Other APIs

*   [Amazon API](/apis/amazon-api/)
    
    Search, products, offers and bestsellers
    
*   [Google Shopping API](/apis/google-shopping-api/)
    
    Product prices and merchants
    
*   [Walmart API](/apis/walmart-api/)
    
    Walmart product search results
    
*   [Web Scraping API](/apis/web-scraping-api/)
    
    Public pages in selectable formats
    

[All APIs →](/apis/) · [Guides and benchmarks on the blog →](/blog/)

### What it is used for

*   eBay keyword search using resource=search and a search URL. Item URLs use resource=product.

[Start free](/pricing/)[Docs](/docs/)

## Related

*   [eBay sold listings data](/use-cases/ebay-sold-listings-api/)
*   [read eBay data from an agent](/how-to/read-ebay-data/)
*   [FastAF vs Apify](/compare/apify/)
