Skip to main content

apogeoapi-langchain

LangChain tools for ApogeoAPI — geographic data, live exchange rates, and IP geolocation for AI agents.

Installation

pip install apogeoapi-langchain

Quick Start

from apogeoapi_langchain import ApogeoAPIToolkit
from langchain_openai import ChatOpenAI
from langchain.agents import AgentExecutor, create_openai_tools_agent
from langchain_core.prompts import ChatPromptTemplate

# Get your free API key at apogeoapi.com
toolkit = ApogeoAPIToolkit(api_key="your_apogeoapi_key")
tools = toolkit.get_tools()

llm = ChatOpenAI(model="gpt-4o")
prompt = ChatPromptTemplate.from_messages([
    ("system", "You are a helpful assistant with access to geographic and financial data."),
    ("human", "{input}"),
    ("placeholder", "{agent_scratchpad}"),
])

agent = create_openai_tools_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)

result = executor.invoke({"input": "What's the current EUR to USD rate?"})
print(result["output"])

Available Tools

Tool Description
get_country Full data for a country by ISO code
list_countries All 250+ countries
search_countries Search by name, region, or currency
get_states States/provinces for a country
get_cities 150K+ cities with coordinates
get_currency_rate Live exchange rate for 161 currencies
geolocate_ip IP geolocation (IPv4 + IPv6)
global_search Search across countries, states, and cities

Get Your API Key

Free tier available at apogeoapi.com — includes a 14-day full trial.

Metadata

Release files for apogeoapi-langchain 0.1.0

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

Source distribution (sdist)

Source distribution for apogeoapi-langchain 0.1.0
File Size Uploaded Provenance Actions
apogeoapi_langchain-0.1.0.tar.gz 5.3 kB Without provenance Details for apogeoapi_langchain-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apogeoapi-langchain 0.1.0
File Interpreter ABI Platform Actions
apogeoapi_langchain-0.1.0-py3-none-any.whl Python 3 none any Details for apogeoapi_langchain-0.1.0-py3-none-any.whl

Total release size: 11.3 kB

Release files / apogeoapi_langchain-0.1.0.tar.gz

Download URL apogeoapi_langchain-0.1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
590de8207791b2e5afb7b1d3049a3bfaabad97c6b41fd2a88504a1ad93f91e34
BLAKE2b-256 checksum
How to use checksums
2f25645dad0e9e4ac56ed15f34dc0d6037e0d13d98119a335e3fb62d4e16e159
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release files / apogeoapi_langchain-0.1.0-py3-none-any.whl

Download URL apogeoapi_langchain-0.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b3d49c35ae95ad5e53a7cb93902f568f67caf60f7bf048870a807ea1ed66837
BLAKE2b-256 checksum
How to use checksums
46855d475d70b35e99c08419f67f1859cb4d6190bd9274bd00f3d0a01fe02046
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Security for apogeoapi-langchain 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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