Step 1: Get Your API Key

Sign up at useadmesh.com to get your free API key.

Step 2: Make Your First API Call

Basic cURL Example

curl -X POST "https://api.useadmesh.com/agent/recommend" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "best CRM for startups",
    "agent_id": "your_agent_id"
  }'
Response:
{
  "recommendations": [
    {
      "title": "HubSpot CRM",
      "reason": "Perfect for startups with excellent free tier",
      "admesh_link": "https://useadmesh.com/track?ad_id=hubspot-123",
      "pricing": "Free tier available, paid plans from $45/month"
    }
  ]
}

Step 3: Choose Your Language

const getRecommendations = async (query, agentId) => {
  const response = await fetch('https://api.useadmesh.com/agent/recommend', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      query: query,
      agent_id: agentId
    })
  });

  const data = await response.json();
  return data.recommendations;
};

// Usage
const recommendations = await getRecommendations('best CRM for startups', 'your_agent_id');

Next Steps (Optional)

If you’re building a frontend, you can use our React components to display recommendations:
npm install admesh-ui-sdk
import { AdMeshLayout } from 'admesh-ui-sdk';

function MyApp() {
  const [recommendations, setRecommendations] = useState([]);

  const fetchRecommendations = async (query) => {
    // Call your backend API (which calls AdMesh)
    const response = await fetch('/api/recommendations', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ query })
    });
    const recs = await response.json();
    setRecommendations(recs);
  };

  return (
    <AdMeshLayout
      recommendations={recommendations}
      layout="auto"
      onRecommendationClick={(adId, admeshLink) => window.open(admeshLink)}
    />
  );
}
Learn more about UI components →
app.post('/api/recommendations', async (req, res) => {
  const { query } = req.body;

  const response = await fetch('https://api.useadmesh.com/agent/recommend', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.ADMESH_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      query: query,
      agent_id: process.env.ADMESH_AGENT_ID
    })
  });

  const data = await response.json();
  res.json(data.recommendations);
});
See more backend examples →
Each recommendation includes:
  • title - Product/service name
  • reason - Why it’s recommended for this query
  • admesh_link - Tracking URL (use this for clicks)
  • pricing - Cost information
  • features - Key features list
  • trial_days - Free trial period
View complete API reference →

You’re Ready!

That’s it! You now have AdMesh recommendations working in your application.

What’s Next?