openai-datacircle
Find the best GTM APIs. We benchmark all the GTM APIs and we put the results on our website.
Our website: https://datacircle.dev
This package gives the OpenAI Python library four tools that call Datacircle's open API, https://api.datacircle.dev/v1. You pass the four Datacircle tools to client.chat.completions or client.responses. The package then runs each tool call the model returns. Our API needs no key and no account.
| Tool | What the tool gives | Call |
|---|---|---|
datacircle_list_apis |
Every GTM API on Datacircle, with the API's slug, number of plans, number of providers and best plan | GET /apis |
datacircle_best_plans |
One API's plans, sorted by score out of 100, best first. Each plan comes with a rank and a price per 1,000 calls | GET /apis/{slug}/best |
datacircle_search_plans |
Plans that match a provider or plan name, on all APIs or on one API. You can sort them by score, provider or price | GET /plans |
datacircle_provider |
The APIs a provider sells, and the provider's rank on each API | GET /providers/{slug} |
Install
pip install openai-datacircle
openai-datacircle works with openai 1.66.0 and later, on Python 3.9 and later.
Use the tools with Chat Completions
Pass the tools to client.chat.completions.create(). If the model calls a tool, call_all() gives you the tool messages to send back:
from openai import OpenAI
from openai_datacircle import call_all, datacircle_tools
client = OpenAI()
messages = [{"role": "user", "content": "Who are the 3 best providers for the email-finder API?"}]
message = client.chat.completions.create(model="gpt-5.4-mini", messages=messages, tools=datacircle_tools()).choices[0].message
while message.tool_calls:
messages.append(message)
messages.extend(call_all(message))
message = client.chat.completions.create(model="gpt-5.4-mini", messages=messages, tools=datacircle_tools()).choices[0].message
print(message.content)
Each tool message has role: "tool", the call's id in tool_call_id, and the answer as JSON text in content.
client.chat.completions.parse() takes only strict tools. Use datacircle_tools(strict=True) with parse(). In strict mode the model gives every argument. For an optional argument, the model can send null. The Datacircle tools treat null as a missing argument.
With client.chat.completions.stream(), pass the message of stream.get_final_completion() to call_all(). Before openai 1.92.0, parse() and stream() are in client.beta.chat.completions.
With AsyncOpenAI, use await acall_all(message). acall_all() runs the calls at the same time. Your event loop keeps running.
Use the tools with the Responses API
responses_tools() gives the four Datacircle tools in the Responses API's format. call_outputs() gives the function_call_output items to send back:
from openai import OpenAI
from openai_datacircle import call_outputs, responses_tools
client = OpenAI()
given = [{"role": "user", "content": "Who are the 3 best providers for the email-finder API?"}]
response = client.responses.create(model="gpt-5.4-mini", input=given, tools=responses_tools())
while any(item.type == "function_call" for item in response.output):
given += response.output
given += call_outputs(response)
response = client.responses.create(model="gpt-5.4-mini", input=given, tools=responses_tools())
print(response.output_text)
call_outputs() also works with client.responses.parse(). call_outputs() also works with client.responses.stream() and the stream's get_final_response(). With AsyncOpenAI, use await acall_outputs(response).
The Responses API treats a tool with no strict field as strict. responses_tools() sets strict on each tool. By default, strict is False. responses_tools(strict=True) sets strict to True.
Use the tools with ResponsesToolRunner
openai 3.31.0 and later can run the whole tool loop with ResponsesToolRunner. registered_functions() gives the four Datacircle tools as a list of RegisteredFunction objects:
from openai import OpenAI
from openai.lib.responses_tool_runner import ResponsesToolRunner
from openai_datacircle import registered_functions
runner = ResponsesToolRunner(functions=registered_functions())
response = runner.run(
OpenAI(),
{"model": "gpt-5.4-mini", "input": "Who are the 3 best providers for the email-finder API?"},
max_steps=6,
)
print(response.output_text)
With AsyncResponsesToolRunner, use async_registered_functions(). The runner stops at a call to an unknown tool. Give the runner each of your own tools as a RegisteredFunction too: functions=[*registered_functions(), my_function].
Use the Datacircle tools beside your own tools
You can put the Datacircle tools in the same list as yours: tools=[*datacircle_tools(), my_tool].
call() runs one tool call. For your own tools, call() returns None. Your code then runs the tool itself:
from openai_datacircle import call
for tool_call in message.tool_calls or []:
messages.append(call(tool_call) or my_tool_message(tool_call))
call_output() runs one tool call from one item of a Responses API answer. To give the model fewer Datacircle tools, list the tool names: datacircle_tools(["datacircle_best_plans"]).
Use the tools on another server
The tools work with any server that offers OpenAI's API. Give the server's address to the client: OpenAI(base_url="https://.../v1", api_key="...").
Call a tool yourself
You can call each tool without a model. You get the JSON text of the tool's answer:
import json
from openai_datacircle import run
answer = json.loads(run("datacircle_best_plans", {"slug": "email-finder", "limit": 3}))
print(answer["plans"])
What the model reads
Each tool gives the model a JSON object as text. Each plan comes with a rank, provider, plan, score, price per 1,000 (perThousand, in dollars) and a page on datacircle.dev. That page lists every field.
You can give a provider's name in place of a slug. The tool turns Bright Data into bright-data.
The tool returns {"error": "..."} with the API's message when the API gives no data, such as for an unknown slug. The error for an unknown API slug lists every valid slug. The tool checks each number from the model first. For a number out of range, the tool returns {"error": "..."} and makes no API call. If the network fails, the tool returns {"error": "..."} with the network error's message. The model can then call the tool again.
Network
Each tool call makes one HTTPS GET request to https://api.datacircle.dev/v1 and nothing else. The request holds only the tool's own arguments: no key and nothing from your chats. The API takes up to 60 calls a minute from one IP address. The API can ask the tool to wait. The tool then waits once, for a minute at most. Each call uses only Python's standard library. Nothing goes to disk.
Links
- Datacircle: https://datacircle.dev
- The API: https://datacircle.dev/api
- The API's spec: https://api.datacircle.dev/v1/openapi.json
- Every field of a plan: https://datacircle.dev/fields
MIT license.
Metadata
Release files for openai-datacircle 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openai_datacircle-0.1.0.tar.gz | 17.5 kB | Without provenance | Details for openai_datacircle-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openai_datacircle-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for openai_datacircle-0.1.0-py3-none-any.whl |
Total release size: 30.0 kB
Release files / openai_datacircle-0.1.0.tar.gz
| Download URL | openai_datacircle-0.1.0.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd14ddbdba95b816e9fffaa87394e6d3edb93c750990a252299264898242b7c8
|
|
BLAKE2b-256 checksum How to use checksums |
648faccb2479696adb102dd4ed5f0e6ec80fa3094d7f06cc6a3592c2ab0866f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / openai_datacircle-0.1.0-py3-none-any.whl
| Download URL | openai_datacircle-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19b6418f0a07a7dfdbb915bb2be457e637fae68e446f333cd532141844676fc3
|
|
BLAKE2b-256 checksum How to use checksums |
b5bbb68e0aee75b763d4818789baf435d8b31444c8d7fa1814cff4ecdf06cda2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for openai-datacircle 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.