# Developer Resources
> Essential developer resources for You.com API including SDKs, MCP integration, error handling, and support channels.
## Overview
This section provides essential tools, references, and resources to help you integrate and troubleshoot the You.com API effectively.
***
## Quick Links
Official Python SDK
Official TypeScript SDK
Model Context Protocol integration
HTTP error codes and solutions
Manage your API keys
Contact API support
***
## SDKs & Libraries
### Python SDK
* Full type hints and async support
* Automatic retry logic
* Streaming support for agents
* [View Documentation →](/developer-resources/python-sdk)
### JavaScript/TypeScript SDK
* Full type hints and async support
* Automatic retry logic
* Streaming support for agents
* [View Documentation →](/developer-resources/type-script-sdk)
### Model Context Protocol (MCP)
Integrate You.com search directly into agentic IDEs like Claude Code, Cursor, VS Code, and more:
* Quick setup with hosted server or local NPM package
* Works with 10+ popular development environments
* Real-time web search for AI assistants
* [View MCP Documentation →](/developer-resources/mcp-server)
***
## Authentication
All API requests require authentication using an API key.
### Get your API Key
1. Visit the [You.com platform](https://you.com/platform/api-keys)
2. Create a new API key
3. Copy and store it securely
### Using Your API Key
Include your API key in the request header:
```curl
curl --request GET \
--url 'https://ydc-index.io/v1/search?query=example' \
--header 'X-API-Key: YOUR_API_KEY'
```
For [Agent](/agents) APIs, use Bearer token authentication:
```curl
curl -N \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-X POST https://api.you.com/v1/agents/runs \
-d '{"agent": "express", "input": "test", "stream": true}'
```
**Security Best Practice:** Never commit API keys to version control. Use environment variables or secure secret management systems.
***
## Rate Limits & Quotas
API usage is subject to rate limits based on your subscription tier:
* **Free Tier:** Limited requests per day
* **Paid Tiers:** Higher limits based on plan
Rate limit details are included in response headers:
* `X-RateLimit-Limit` - Total requests allowed
* `X-RateLimit-Remaining` - Requests remaining
* `X-RateLimit-Reset` - Time when limit resets (Unix timestamp)
When you exceed rate limits, you'll receive a `429 Too Many Requests` response.
**Handling Rate Limits:**
```python
import time
import requests
def make_request_with_retry(url, headers):
response = requests.get(url, headers=headers)
if response.status_code == 429:
retry_after = int(response.headers.get('Retry-After', 60))
print(f"Rate limited. Retrying after {retry_after} seconds...")
time.sleep(retry_after)
return make_request_with_retry(url, headers)
return response
```
For higher rate limits, [upgrade your plan](https://you.com/platform/upgrade) or contact [api@you.com](mailto:api@you.com).
***
## Best Practices
### 1. **Use SDKs When Possible**
SDKs handle authentication, retries, and error handling automatically:
```python
# ✅ Good: Using SDK
from youdotcom import YouClient
client = YouClient(api_key=os.getenv("YDC_API_KEY"))
response = client.search(query="example")
# ❌ Less ideal: Manual requests
import requests
response = requests.get(
"https://ydc-index.io/v1/search",
params={"query": "example"},
headers={"X-API-Key": os.getenv("YDC_API_KEY")}
)
```
### 2. **Implement Exponential Backoff**
For retry logic, use exponential backoff to avoid overwhelming the API:
```python
import time
def exponential_backoff(attempt):
return min(2 ** attempt, 60) # Max 60 seconds
for attempt in range(5):
try:
response = client.search(query="test")
break
except RateLimitError:
if attempt < 4:
wait_time = exponential_backoff(attempt)
time.sleep(wait_time)
else:
raise
```
### 3. **Use Streaming for Agents**
Provide better UX by streaming agent responses:
```python
# ✅ Good: Stream responses for real-time feedback
for chunk in client.agents.express_stream(input="query"):
if chunk.type == "response.output_text.delta":
print(chunk.delta, end="", flush=True)
# ❌ Less ideal: Wait for complete response
response = client.agents.express(input="query")
print(response.answer) # User waits entire time
```
### 4. **Cache When Appropriate**
Cache search results for frequently asked questions:
```python
from functools import lru_cache
@lru_cache(maxsize=100)
def cached_search(query: str):
return client.search(query=query)
```
### 5. **Handle Errors Gracefully**
Always provide fallback behavior:
```python
try:
response = client.search(query=user_query)
except AuthenticationError:
return "Configuration error. Please contact support."
except RateLimitError:
return "Too many requests. Please try again in a moment."
except APIError as e:
logger.error(f"API error: {e}")
return "Unable to complete search. Please try again."
```
***
## Frequently Asked Questions
Visit [you.com/platform/api-keys](https://you.com/platform/api-keys) to create and manage API keys. You'll need to sign up for a You.com account and select a plan.
Rate limits vary by subscription tier. Free tier has limited daily requests, while paid tiers offer higher limits. Check your current usage and limits in the [API Console](https://you.com/platform/api-keys).
Yes! The You.com API is production-ready. We recommend using our official SDKs, implementing proper error handling, and monitoring your usage to stay within rate limits.
Custom Agents must be created via the [You.com UI](https://you.com/agents). Once created, you'll receive an agent ID that can be used with the [Custom Agent API](/api-reference/agents/custom-agent/custom-agent-runs).
The Search API returns raw web results, while Agents synthesize information and provide natural language answers with citations. Use Search API for building custom UIs, and Agents for conversational experiences.
Yes! Email [api@you.com](mailto:api@you.com) for technical support, feature requests, or partnership inquiries. For bugs or issues with SDKs, you can also open issues on our GitHub repositories.
Yes, the You.com API can be used for commercial projects. Check our [terms of service](https://you.com/legal/terms) for details, or contact [api@you.com](mailto:api@you.com) for enterprise licensing.
All API keys can be used for testing and development. We recommend using a separate API key for development vs. production to track usage independently.
***
## Additional Resources
Get started in 5 minutes
Complete endpoint documentation
Advanced search syntax
Learn about Express, Advanced, and Custom agents