Skip to content
APIGet started

SDKs

lobstrio for Python and Node.js, a typed method for each operation, every page in one loop, retries never charged twice, a lobstr command, and tools for LangChain, CrewAI and the Vercel AI SDK.

lobstrio, the same name on PyPI and npm, open source under Apache 2.0: lobstrio-python, lobstrio-node. Both read your key from LOBSTR_API_KEY.

Install

pip install lobstrio

Python 3.9 or later; Node.js 18 or later, ESM or CommonJS, no dependencies.

One call

A typed method for each operation, its options and its record checked by your editor:

from lobstrio import Lobstr

client = Lobstr()

run = client.google_maps.places.get(place="Gramercy Tavern, New York")
print(run.results[0]["name"], run.cost)

client.run("google_maps/places/get", {...}) does the same by the operation's id, and runs an operation newer than your SDK, untyped. The answer keeps the API's fields: Run an operation.

Every page

iterate follows next until there is no more, or until your cap:

for review in client.iterate(
    "google_maps/reviews/list", {"place": "ChIJCar0f49ZwokR6ozLV-dHNTE"}, max_records=100
):
    print(review["rating"]["value"], review["text"])

Each page is a call, at the operation's price: Pagination.

Retries and errors

Every call sends an Idempotency-Key and keeps it across the SDK's retries, so a retry is never charged twice. What can work later is retried (a retryable error, a 429 with retry_after, a lost connection); the rest is raised with the API's code, message, param and doc_url: Errors.

The CLI

Both install a lobstr command:

lobstr run google_maps/places/search query="bakeries in Austin, TX" --limit 5 --fields name,phone
lobstr catalog google maps
lobstr balance

Agent frameworks

The MCP server's tools for an agent written in code: lobstr_find_operations, lobstr_get_operation and lobstr_run_operation, and one tool per operation if you name them.

# pip install "lobstrio[langchain]" langchain langchain-anthropic
from langchain.agents import create_agent
from lobstrio.langchain import LobstrToolkit

tools = LobstrToolkit(operations=["google_maps/places/search"]).get_tools()
agent = create_agent("anthropic:claude-sonnet-5-5", tools)

A guide for each: LangChain, CrewAI, Vercel AI SDK. Agents that use them, end to end: lobstrio/examples.