Skip to main content

Quick Start Guide

Get up and running with AdMesh in under 5 minutes! This guide will walk you through making your first recommendation request using any of our SDKs.

Prerequisites

  • ✅ AdMesh account (sign up here)
  • ✅ API key (get yours here)
  • ✅ Development environment (Python 3.8+, Node.js 18+, or React app)

Choose Your Adventure

Select the SDK that matches your technology stack:

1. Install the Python SDK

pip install admesh-python

2. Set up your environment

# Create a .env file
echo "ADMESH_API_KEY=your_api_key_here" > .env

3. Make your first request

import os
from admesh import Admesh

# Initialize the client
client = Admesh(api_key=os.environ.get("ADMESH_API_KEY"))

# Get recommendations
response = client.recommend.get_recommendations(
query="Best CRM for remote teams",
format="auto"
)

# Print results
print(f"Recommendation ID: {response.recommendation_id}")
print(f"Found {len(response.response.recommendations)} recommendations:")

for rec in response.response.recommendations:
print(f"\n🎯 {rec.title}")
print(f" Reason: {rec.reason}")
print(f" Match Score: {rec.intent_match_score:.2f}")
print(f" Link: {rec.admesh_link}")

4. Run your code

python your_script.py

Expected Output

When you run any of the examples above, you should see output similar to:

Recommendation ID: rec_abc123xyz
Found 2 recommendations:

🎯 HubSpot CRM
Reason: Perfect for remote teams with excellent collaboration features
Match Score: 0.92
Link: https://useadmesh.com/track?ad_id=hubspot-123

🎯 Salesforce
Reason: Enterprise-grade CRM with powerful automation
Match Score: 0.88
Link: https://useadmesh.com/track?ad_id=salesforce-456

Understanding the Response

Each recommendation includes:

  • title - Product name
  • reason - AI-generated explanation for why it's recommended
  • intent_match_score - How well it matches the query (0-1)
  • admesh_link - Tracked link for analytics and monetization
  • ad_id - Unique identifier for the advertisement
  • product_id - Unique identifier for the product

Next Steps

🔧 Customize Your Integration

For AI Applications: Check out our Ad Units Guide for chatbots and AI assistants.

For Web Applications: Explore our UI SDK Installation for rich recommendation displays.

For Backend Services: Learn about Python SDK and TypeScript SDK.

Calculate Your Earnings

Ready to see your revenue potential? Use our earnings calculator to estimate how much you can earn with AdMesh recommendations based on your platform's traffic and engagement.

📚 Explore More Features

  • Ad Units - Citation-based recommendations for AI assistants
  • API Reference - Complete API documentation
  • Examples - Implementation examples
  • UI SDK - Frontend component integration

🛠 Advanced Configuration

Error Handling

import admesh

try:
response = client.recommend.get_recommendations(
query="Best CRM for remote teams",
format="auto"
)
except admesh.NoRecommendationsError:
print("No recommendations found for this query")
except admesh.RateLimitError:
print("Rate limit exceeded, please try again later")
except admesh.APIError as e:
print(f"API error: {e}")

Custom Parameters

response = client.recommend.get_recommendations(
query="Best CRM for remote teams",
format="auto",
max_recommendations=5,
include_free_tier=True,
min_trust_score=0.8
)

Troubleshooting

Common Issues

Authentication Error

Error: Invalid API key

Solution: Double-check your API key and ensure it's set correctly in your environment variables.

No Recommendations

NoRecommendationsError: No recommendations available

Solution: Try a different query or set raise_on_empty_recommendations=False to handle empty results gracefully.

Rate Limit

RateLimitError: Rate limit exceeded

Solution: Implement exponential backoff or upgrade your plan for higher limits.

Getting Help


🎉 Congratulations! You've successfully made your first AdMesh API call. Ready to build something amazing? Explore our detailed SDK guides and examples to learn more!