# AI Platform Overview

Guide for AI platform developers integrating AIDP for business discovery.

## What is AIDP for AI Platforms?

AIDP provides an open standard for AI assistants to discover, recommend, and interact with local businesses. Instead of relying on outdated web scraping or fragmented APIs, AI platforms can access structured, AI-optimized business data through AIDP.

***

## Why Integrate AIDP?

### For AI Platforms

**Better Recommendations**:

* Access to AI-exclusive content not available elsewhere
* Structured data optimized for LLM consumption
* Real-time business information (hours, availability, services)

**Upstream Analytics**:

* Track when your platform mentions businesses
* Measure recommendation quality
* Understand user intent journeys

**Standardized Protocol**:

* One integration works across all AIDP businesses
* MCP (Model Context Protocol) native support
* RESTful API fallback option

***

## Integration Options

### 1. MCP Integration (Recommended)

Use the Model Context Protocol for native integration:

```typescript
import { MCPClient } from '@modelcontextprotocol/sdk';

const client = new MCPClient({
  serverUrl: 'https://mcp.aidp.dev',
  apiKey: process.env.AIDP_API_KEY,
});

// Discover businesses
const businesses = await client.callTool('search_businesses', {
  query: 'coffee shops',
  location: { lat: 45.5231, lon: -122.6765 },
});
```

**Benefits**:

* Native MCP tool support
* Automatic schema validation
* Built-in error handling
* Real-time updates

[Learn more →](https://amistan.gitbook.io/aidp-docs/for-ai-platform-developers/mcp-client)

***

### 2. REST API Integration

Use the standard REST API for maximum flexibility:

```typescript
const response = await fetch('https://api.aidp.dev/v1/api/v1/consumer/search', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    query: 'coffee shops',
    location: { lat: 45.5231, lon: -122.6765, distance: '5km' },
  }),
});

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

**Benefits**:

* Works with any HTTP client
* Full control over requests
* Easy to debug
* Language agnostic

[Learn more →](https://amistan.gitbook.io/aidp-docs/for-ai-platform-developers/integration-guide)

***

## Key Features

### AI-Optimized Content

Businesses provide content specifically for AI recommendations:

* **Insider Tips**: "Ask for our seasonal pour-over"
* **Local Secrets**: "Best time to visit: Tuesday mornings"
* **Behind the Scenes**: "We roast in-house twice weekly"

This content is **exclusive to AI platforms** and not available on websites or other channels.

### Structured Data

All business data follows the AIDP Schema:

```json
{
  "id": "biz_abc123",
  "name": "Artisan Coffee Roasters",
  "category": "restaurants",
  "description": "Family-owned coffee roastery...",
  "aiExclusiveContent": {
    "insiderTips": ["Ask for our seasonal pour-over..."],
    "localSecrets": ["Best time to visit: Tuesday mornings..."]
  },
  "services": [...],
  "hours": {...},
  "location": {...}
}
```

### Real-Time Data

* Current business hours
* Live availability
* Up-to-date services and pricing
* Recent reviews and ratings

***

## Discovery & Search

### Natural Language Queries

AIDP supports natural language search optimized for AI:

```typescript
// User asks: "I need a coffee shop with wifi and outdoor seating"
const results = await search({
  query: 'coffee shop with wifi and outdoor seating',
  location: userLocation,
});

// AIDP returns:
// - Businesses matching criteria
// - AI-generated response text
// - Relevance scores
// - Personalization data
```

### Contextual Recommendations

AIDP provides context for better recommendations:

```json
{
  "query": "coffee shop with wifi",
  "response": "I found several great coffee shops with wifi. Artisan Coffee Roasters has fast wifi and plenty of outlets, plus they offer a 'work-friendly' discount on weekdays...",
  "businesses": [...]
}
```

***

## Analytics & Tracking

### Upstream Metrics

Track how often your platform mentions businesses:

* **Impressions**: Times business appeared in responses
* **Citations**: Times business was specifically recommended
* **Platform Attribution**: Track your platform's contribution

### Intent Journeys

Understand user discovery paths:

* **Awareness**: User learning about options
* **Consideration**: Comparing specific businesses
* **Decision**: Ready to visit/book

### Attribution

Multi-touch attribution for AI-driven discovery:

* First touch attribution
* Last touch attribution
* Multi-touch attribution
* Time decay models

***

## Getting Started

### 1. Sign Up

1. Create account at [platform.aidp.dev](https://platform.aidp.dev)
2. Navigate to AI Platform Integration
3. Get your API key

### 2. Choose Integration Method

* **MCP**: For native AI assistant integration
* **REST API**: For custom implementations

### 3. Implement Discovery

Follow our integration guides:

* [MCP Client Setup →](https://amistan.gitbook.io/aidp-docs/for-ai-platform-developers/mcp-client)
* [REST API Integration →](https://amistan.gitbook.io/aidp-docs/for-ai-platform-developers/integration-guide)

### 4. Test & Launch

* Use sandbox environment for testing
* Verify data quality
* Launch to production

***

## Best Practices

### 1. Provide Context

Include user context in queries:

```typescript
const results = await search({
  query: 'coffee shop',
  location: userLocation,
  context: {
    timeOfDay: 'morning',
    userPreferences: ['wifi', 'quiet'],
    sessionId: 'session-123',
  },
});
```

### 2. Use Personalization

Leverage session IDs for personalized recommendations:

```typescript
const results = await search({
  query: 'restaurants',
  sessionId: userSessionId, // Enables personalization
});
```

### 3. Track Analytics

Report impressions and citations:

```typescript
await trackImpression({
  businessId: 'biz_abc123',
  platform: 'your-platform',
  query: 'coffee shops',
  mentioned: true,
  cited: true,
});
```

***

## Certification Program

Get certified as an AIDP-compatible AI platform:

**Benefits**:

* Listed in AIDP directory
* Early access to new features
* Co-marketing opportunities

[Learn more →](https://amistan.gitbook.io/aidp-docs/for-ai-platform-developers/certification)

***

## Support

* 📧 Email: <ai-platforms@aidp.dev>
* 💬 GitHub Discussions: [github.com/aidp/platform/discussions](https://github.com/aidp/platform/discussions)
* 📚 Documentation: [docs.aidp.dev/ai-platforms](https://docs.aidp.dev/ai-platforms)
* 🎥 Video Tutorials: [youtube.com/aidp/ai-platforms](https://youtube.com/aidp/ai-platforms)

***

**Next Steps**:

1. [Integration Guide →](https://amistan.gitbook.io/aidp-docs/for-ai-platform-developers/integration-guide)
2. [MCP Client Setup →](https://amistan.gitbook.io/aidp-docs/for-ai-platform-developers/mcp-client)
3. [Best Practices →](https://amistan.gitbook.io/aidp-docs/for-ai-platform-developers/best-practices)
