Skip to main content

langchain-apiverve

PyPI version Python versions License: MIT LangChain

LangChain integration for APIVerve - Access 388+ utility APIs for AI agents and LLM applications.

Build powerful AI agents with access to validation, conversion, generation, analysis, and lookup APIs.


Features

  • 388+ APIs - Email validation, DNS lookup, IP geolocation, QR codes, currency conversion, and more
  • 29 Categories - Text Processing, Data Generation, Games, Entertainment, Calendar, and more
  • LangChain Native - Works with any LangChain agent or chain
  • Type Safe - Full Pydantic schemas for inputs and outputs
  • Async Support - Both sync and async API calls
  • Flexible - Use individual tools or the "run any" meta-tool

Installation

pip install langchain-apiverve

Quick Start

from langchain_apiverve import APIVerveToolkit
from langchain_openai import ChatOpenAI
from langchain.agents import create_tool_calling_agent, AgentExecutor
from langchain_core.prompts import ChatPromptTemplate

# Initialize toolkit with your API key
toolkit = APIVerveToolkit(api_key="your-api-key")
# Or set APIVERVE_API_KEY environment variable

# Get tools
tools = toolkit.get_tools()

# Create an agent
llm = ChatOpenAI(model="gpt-4")
prompt = ChatPromptTemplate.from_messages([
    ("system", "You are a helpful assistant with access to various utility APIs."),
    ("human", "{input}"),
    ("placeholder", "{agent_scratchpad}"),
])

agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools, verbose=True)

# Use the agent
result = executor.invoke({"input": "Is test@example.com a valid email?"})
print(result["output"])

Usage Examples

Using Individual Tools

from langchain_apiverve import APIVerveToolkit

toolkit = APIVerveToolkit(api_key="your-api-key")

# Get specific tools
tools = toolkit.get_tools(include_apis=["emailvalidator", "dnslookup"])

# Use a tool directly
email_tool = tools[0]
result = email_tool.invoke({"email": "user@example.com"})
print(result)

Using the "Run Any" Tool

from langchain_apiverve import APIVerveToolkit

toolkit = APIVerveToolkit(api_key="your-api-key")

# Get the flexible run-any tool
run_any = toolkit.get_run_any_tool()

# Call any API dynamically
result = run_any.invoke({
    "api_id": "qrcodegenerator",
    "parameters": {"value": "https://example.com"}
})
print(result)

Filtering Tools by Category

from langchain_apiverve import APIVerveToolkit

toolkit = APIVerveToolkit(api_key="your-api-key")

# Get only validation tools
validation_tools = toolkit.get_tools(categories=["Validation"])

# Get only lookup tools
lookup_tools = toolkit.get_tools(categories=["Lookup"])

Low-Level Client Usage

from langchain_apiverve import APIVerveClient

client = APIVerveClient(api_key="your-api-key")

# Make API calls directly
result = client.call_api("emailvalidator", {"email": "test@example.com"})
print(result)

# Async usage
import asyncio

async def main():
    result = await client.acall_api("dnslookup", {"domain": "example.com"})
    print(result)

asyncio.run(main())

Available APIs

APIVerve provides 388+ APIs across 29 categories:

Category APIs Examples
Text Processing 45 Acronym Expander, Anagram Detector, Antonym Finder
Data Generation 32 Acronym Generator, Baby Name Generator, Barcode Generator
Games 21 Acrostic Puzzle Generator, Anagram Puzzle Generator, Card Deck Shuffler
Entertainment 24 Advice Generator, Bucket List, Charades Generator
Calendar 5 Age Calculator, Date Calculator, Liturgical Calendar
Transportation 8 Airline Lookup, Airport Code Converter, Airport Distance
Weather 9 Air Quality, Worldwide Earthquakes, Marine Weather
AI/Computer Vision 6 Article Ideas Generator, Code Detector, Image Caption
Data Conversion 33 ASCII85 Encoder, Base64 Encoder/Decoder, Color Converter
Data Lookup 19 ASN Lookup, Bible, Country Calling Code

Browse all APIs →


API Response Format

All APIVerve APIs return a consistent response format:

{
  "status": "ok",
  "error": null,
  "data": {
    // API-specific response data
  }
}

Configuration

Environment Variables

Variable Description
APIVERVE_API_KEY Your APIVerve API key

Toolkit Options

toolkit = APIVerveToolkit(
    api_key="...",           # API key (or use env var)
    base_url="...",          # Custom API base URL
)

tools = toolkit.get_tools(
    categories=["..."],      # Filter by category
    include_apis=["..."],    # Only include specific APIs
    exclude_apis=["..."],    # Exclude specific APIs
    include_run_any=True,    # Include the "run any" tool
    include_popular=True,    # Include pre-built popular tools
)

Development

Setup

# Clone the repository
git clone https://github.com/apiverve/langchain-apiverve.git
cd langchain-apiverve

# Install with Poetry
poetry install

# Or with pip
pip install -e ".[dev]"

Running Tests

pytest

Linting

ruff check .
mypy src/

Resources

Resource Link
APIVerve Website apiverve.com
API Documentation docs.apiverve.com
API Marketplace apiverve.com/marketplace
LangChain Docs python.langchain.com
GitHub Issues github.com/apiverve/langchain-apiverve/issues

License

MIT License - see LICENSE for details.

Copyright (c) 2026 APIVerve

Metadata

Release files for langchain-apiverve 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-apiverve 0.2.3
File Size Uploaded Provenance Actions
langchain_apiverve-0.2.3.tar.gz 11.5 kB Without provenance Details for langchain_apiverve-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-apiverve 0.2.3
File Interpreter ABI Platform Actions
langchain_apiverve-0.2.3-py3-none-any.whl Python 3 none any Details for langchain_apiverve-0.2.3-py3-none-any.whl

Total release size: 23.4 kB

Release files / langchain_apiverve-0.2.3.tar.gz

Download URL langchain_apiverve-0.2.3.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
811d598206a7b4b8ec713ca3efbe12904b4e4cbd35e3bf1c8d873f4b7a1ce34e
BLAKE2b-256 checksum
How to use checksums
fd2d241a64caccdddc22e696d03ec95e6ce3c16317d2c7404071479489438b2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / langchain_apiverve-0.2.3-py3-none-any.whl

Download URL langchain_apiverve-0.2.3-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2da20faaed2c3dce7cceddc08e9d503bcf34d50a9e4cdcd91f214df6df07d110
BLAKE2b-256 checksum
How to use checksums
b5d0255c240c192c15128fcd5342ba775246a1caf0331a43fdc8b4c172d9749d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for langchain-apiverve 0.2.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page