waynehamadi2's picture
gtm_api_provider: Datacircle's GET /providers/{slug}
6bc10d0 verified
Raw History Blame Contribute Delete
5.46 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>gtm_api_provider: One provider on every GTM API, from Datacircle</title>
<meta name="description" content="Find the best GTM APIs. This smolagents tool gives each API a provider sells, its rank on each, how many plans it has there and its best plan.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,500&family=Roboto+Mono&family=Schibsted+Grotesk:wght@400;600&display=swap">
<style>
* { box-sizing: border-box; border-radius: 0; }
body { margin: 0; background: #fff; color: #1f1f1f; font: 16px/1.55 "Schibsted Grotesk", system-ui, sans-serif; }
main { max-width: 780px; margin: 0 auto; padding: 32px 20px 56px; }
h1, h2 { font-family: Newsreader, Georgia, serif; font-weight: 500; line-height: 1.2; }
h1 { font-size: 34px; margin: 0 0 16px; }
h2 { font-size: 23px; margin: 36px 0 10px; }
code, pre { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 14px; }
pre { margin: 0 0 12px; padding: 12px 14px; border: 1px solid #c8c8c8; background: #f7f7f7; overflow-x: auto; white-space: pre; }
table { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
th, td { border: 1px solid #c8c8c8; padding: 6px 8px; text-align: left; vertical-align: top; }
th { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 13px; font-weight: 400; background: #f7f7f7; }
a { color: #0563c1; text-decoration: underline; }
a:visited { color: #954f72; }
a:focus-visible { outline: 2px solid #185c37; outline-offset: 2px; }
</style>
</head>
<body>
<main>
<h1><code>gtm_api_provider</code></h1>
<p>Find the best GTM APIs. We benchmark all the GTM APIs and we put the results on our website: <a href="https://datacircle.dev" target="_top">datacircle.dev</a></p>
<p>This smolagents tool gives each API a provider sells, its rank on each, how many plans it has there and its best plan. The tool calls <code>GET /providers/{slug}</code> on Datacircle's open API, <a href="https://api.datacircle.dev/v1/openapi.json" target="_top">https://api.datacircle.dev/v1</a>. You need no key and no account.</p>
<h2>Use it</h2>
<pre><code>from smolagents import load_tool
gtm_api_provider = load_tool(&quot;waynehamadi2/datacircle-gtm-api-provider&quot;, trust_remote_code=True)
print(gtm_api_provider(slug=&quot;getprospect&quot;))</code></pre>
<p>The tool answers with a dict. An agent's code reads the answer by key.</p>
<h2>Inputs</h2>
<table>
<tr><th>Input</th><th>Type</th><th>Meaning</th></tr>
<tr><td><code>slug</code></td><td>string</td><td>The provider&#x27;s slug, like &#x27;bright-data&#x27;, or its name, like &#x27;Bright Data&#x27;: the name is made a slug.</td></tr>
</table>
<h2>The four Datacircle tools</h2>
<p>Load the four tools at once from the collection <a href="https://huggingface.co/collections/waynehamadi2/datacircle-tools-6af6bdc91ceddc280ce84b9c" target="_top">Datacircle tools</a>, then give them to an agent:</p>
<pre><code>from smolagents import CodeAgent, InferenceClientModel, ToolCollection
tools = ToolCollection.from_hub(&quot;waynehamadi2/datacircle-tools-6af6bdc91ceddc280ce84b9c&quot;, trust_remote_code=True)
agent = CodeAgent(tools=[*tools.tools], model=InferenceClientModel())
agent.run(&quot;Which email finder API plan is best, and what do 1,000 emails cost?&quot;)</code></pre>
<table>
<tr><th>Tool</th><th>Call</th><th>Answer</th></tr>
<tr><td><a href="https://huggingface.co/spaces/waynehamadi2/datacircle-list-gtm-apis" target="_top"><code>list_gtm_apis</code></a></td><td><code>GET /apis</code></td><td>every GTM API on Datacircle, each with its slug, how many plans and providers it has, its best plan and its best page</td></tr>
<tr><td><a href="https://huggingface.co/spaces/waynehamadi2/datacircle-best-gtm-api-plans" target="_top"><code>best_gtm_api_plans</code></a></td><td><code>GET /apis/{slug}/best</code></td><td>an API&#x27;s plans best first by score, each with its rank, provider, plan, $ per 1,000 and its page on datacircle.dev</td></tr>
<tr><td><a href="https://huggingface.co/spaces/waynehamadi2/datacircle-search-gtm-api-plans" target="_top"><code>search_gtm_api_plans</code></a></td><td><code>GET /plans</code></td><td>the plans of every API or of one, by provider or plan name, sorted by score, provider or price</td></tr>
<tr><td><a href="https://huggingface.co/spaces/waynehamadi2/datacircle-gtm-api-provider" target="_top"><code>gtm_api_provider</code></a></td><td><code>GET /providers/{slug}</code></td><td>each API a provider sells, its rank on each, how many plans it has there and its best plan</td></tr>
</table>
<p>Each plan has a price, a score and a provider. Each plan also links to the plan&#x27;s page on datacircle.dev, with every field. The tools use only Python&#x27;s standard library. The API takes at most 60 calls a minute from one address.</p>
<h2>Links</h2>
<ul>
<li>Datacircle: <a href="https://datacircle.dev" target="_top">https://datacircle.dev</a></li>
<li>What each field means: <a href="https://datacircle.dev/fields" target="_top">https://datacircle.dev/fields</a></li>
<li>The API&#x27;s spec: <a href="https://api.datacircle.dev/v1/openapi.json" target="_top">https://api.datacircle.dev/v1/openapi.json</a></li>
</ul>
</main>
</body>
</html>