Metadata-Version: 2.5
Name: llm-tools-datacircle
Version: 0.1.0
Summary: LLM tools for the Datacircle API: find the best GTM APIs
Project-URL: Homepage, https://datacircle.dev
Project-URL: Documentation, https://api.datacircle.dev/v1/openapi.json
Project-URL: Repository, https://github.com/waynehamadi/llm-tools-datacircle
License-Expression: MIT
License-File: LICENSE
Keywords: agents,api,api-pricing,b2b-data,datacircle,gtm,llm,llm-tools,tools
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: llm>=0.26
Description-Content-Type: text/markdown

# llm-tools-datacircle

Find the best GTM APIs. We benchmark all the GTM APIs and we put the results on our website: https://datacircle.dev

This plugin gives [LLM](https://llm.datasette.io/) a `Datacircle` toolbox of four tools on Datacircle's open API, https://api.datacircle.dev/v1. You need no key and no account.

```bash
llm install llm-tools-datacircle
```

| Tool | What it gives | Call |
| --- | --- | --- |
| `Datacircle_list_apis` | Every GTM API on Datacircle, with its slug, number of plans and providers, and its best plan | `GET /apis` |
| `Datacircle_best_plans` | One API's plans, best first by score out of 100, each with its rank and price per 1,000 calls | `GET /apis/{slug}/best` |
| `Datacircle_search_plans` | Plans by provider or plan name, on every API or one, sorted by score, provider or price | `GET /plans` |
| `Datacircle_provider` | The APIs a provider sells and its rank on each | `GET /providers/{slug}` |

## Use

```bash
llm -T Datacircle "Which email finder API is best for under \$5 per 1,000?" --td
```

`--td` shows each call and what it gave. Any model of yours that LLM can run with tools works; `llm chat -T Datacircle` keeps the tools for a whole chat, and `llm tools` lists them. `-T 'Datacircle(timeout=10)'` sets how long a call may take, in seconds.

From Python:

```python
import llm
from llm_tools_datacircle import Datacircle

model = llm.get_model()  # your default model: `llm models default` sets it
print(model.chain("Who is the best phone finder API?", tools=[Datacircle()]).text())
```

The same calls without a model, each giving a dict:

```python
from llm_tools_datacircle import Datacircle

print(Datacircle().best_plans("email-finder", limit=3))
```

Each plan comes with its rank, provider, plan, score, price per 1,000 (`perThousand`, in dollars) and its page on datacircle.dev, which lists every field. A slug can be a name: `Bright Data` is sent as `bright-data`. An unknown slug, an argument out of range or the API out of reach raises `DatacircleError` with the API's words (an unknown API's answer lists every slug); LLM gives the model those words as the tool's answer, so it can call again.

LLM 0.26 and later, Python 3.10 and later.

## Network

Each call makes one HTTPS GET to https://api.datacircle.dev/v1 with the tool's arguments and nothing else. The API takes up to 60 calls a minute from one address; the tools wait once, a minute at most, when it asks them to. Every plan is also one file at https://datacircle.dev/datacircle.json.

## Links

- Datacircle: https://datacircle.dev
- The API: https://datacircle.dev/api
- Its spec: https://api.datacircle.dev/v1/openapi.json
- What each key means: https://datacircle.dev/fields

MIT license.
