The repository or configuration that created this release differ from a previous release. View details.
langchain-flashdata
Google Search, News, Images, Shopping, Videos and Places; YouTube search, metadata, transcripts, captions, license labels, channel data, autocomplete and media delivery for LangChain and LangGraph. Each task has a source-specific Python tool and a runnable guide.
This package is maintained by FlashData. It implements LangChain's BaseTool and
BaseToolkit interfaces with synchronous and native asynchronous HTTP calls.
Installation
Requires Python 3.10 or newer (below Python 4). Install from PyPI:
pip install -U langchain-flashdata
Create an API key in the FlashData console, enable the sources you need, and provide it through your environment:
export FLASHDATA_API_KEY='YOUR_FLASHDATA_API_KEY'
The MIT package is free to install. FlashData API queries are paid and consume credits. Check current pricing and your account's available credits before running examples. Model provider charges are separate.
Quick start
from langchain_flashdata import FlashDataGoogleSearch
search = FlashDataGoogleSearch()
result = search.invoke({"query": "LangGraph durable execution", "num": 3})
for item in result["results"][0].get("organic", []):
print(item.get("title"), item.get("link"))
All tools also accept api_key="..." at construction time. Do not put real keys
in source files. Credentials are excluded from model-facing argument schemas
and tool serialization.
Choose a task
Version 0.2.0 supports all 15 FlashData sources. Each class sends only its named source; importing a single class does not give an agent the other query tools.
| Capability | Class | Inputs and result guide |
|---|---|---|
| Google Search | FlashDataGoogleSearch |
Find citable web results for an agent |
| Google News | FlashDataGoogleNews |
Build a topic briefing with publisher links |
| Google Images | FlashDataGoogleImages |
Find image candidates with source pages |
| Google Shopping | FlashDataGoogleShopping |
Compare merchant result snapshots |
| Google Video Search | FlashDataGoogleVideos |
Discover video pages across websites |
| Google Places | FlashDataGooglePlaces |
Find local business candidates |
| YouTube Search | FlashDataYouTubeSearch |
Shortlist videos by topic |
| YouTube Extended Search | FlashDataYouTubeExtendedSearch |
Collect a larger video discovery set |
| YouTube Video Metadata | FlashDataYouTubeMetadata |
Inspect a video before deeper processing |
| YouTube Transcript | FlashDataYouTubeTranscript |
Build timestamped transcript evidence |
| YouTube Captions | FlashDataYouTubeCaptions |
Read the uploader-provided caption track |
| YouTube License Metadata | FlashDataYouTubeTrainability |
Inspect the Creative Commons label |
| YouTube Channel Data | FlashDataYouTubeChannel |
Snapshot a channel and recent uploads |
| YouTube Autocomplete | FlashDataYouTubeSuggestions |
Explore phrasing before video search |
| YouTube Download | FlashDataYouTubeDownload |
Deliver video or audio to customer storage |
Two additional tools, FlashDataDownloadJob and FlashDataDownloadResult, read
existing download jobs. Download submission is asynchronous and requires
FLASHDATA_DOWNLOAD_STORAGE JSON in the application environment. Storage credentials
are excluded from model-facing schemas. See the download guide before enabling it.
The original four classes and FlashDataToolkit() behavior remain compatible.
The default toolkit still returns Google Search, YouTube Search, Metadata and
Transcript. Select the needed sources explicitly for other workflows:
from langchain_flashdata import FlashDataToolkit
tools = FlashDataToolkit(sources=("google_news", "youtube_captions")).get_tools()
Selecting youtube_download adds its two readers and requires storage configuration.
Google Search retains num=10, page=1, autocorrect=True; the five other Google
tools omit unset options so the provider chooses its behavior. YouTube Search
retains a default of 10 (maximum 20); Extended Search defaults to 20 (maximum 700)
and uses a separate source/rate. Requested counts are not guaranteed.
Transcript defaults to automatic captions; Captions defaults to uploader captions. Both select English by default, read existing tracks, and never generate, translate or fall back. License Metadata inspects Creative Commons labels and does not grant training permission. See each guide for input constraints and exact output fields.
Use with a LangChain / LangGraph agent
The research example uses create_agent, which runs
on LangGraph. The model chooses tools and arguments from the question. A tool call
limit bounds the number of queries; it does not set a credit or dollar limit.
git clone https://github.com/rocosen/langchain-flashdata.git
cd langchain-flashdata
pip install '.[examples]'
export OPENAI_API_KEY='YOUR_MODEL_PROVIDER_KEY'
export OPENAI_MODEL='YOUR_TOOL_CALLING_MODEL'
# Optional for a Chat Completions compatible provider:
# export OPENAI_BASE_URL='https://YOUR_PROVIDER/v1'
python examples/research_agent.py \
'Find recent LangGraph tutorials using Google Search. Request 3 results and cite their URLs.' \
--max-tool-calls 1
This example uses ChatOpenAI with the Chat Completions API. Use a model that
supports tool calling. You can replace that model adapter with another LangChain
chat model. The FlashData tools do not depend on a particular model provider.
For a custom graph, pass the tools from FlashDataToolkit().get_tools() to
LangGraph's ToolNode. Use handle_tool_errors=False to propagate query failures
and stop execution before a model can resubmit an unknown-outcome query. Avoid
automatic graph retries or replay of paid tool nodes.
from langchain_flashdata import FlashDataToolkit
from langgraph.prebuilt import ToolNode
tools = FlashDataToolkit().get_tools()
tool_node = ToolNode(tools, handle_tool_errors=False)
See the examples guide for direct tool calls, transcript research, and the hosted MCP alternative.
Output and errors
invoke and ainvoke return the complete API response dictionary. The envelope
contains source, results, and available usage/timestamp fields; some successful
responses omit status. Tool-call invocations produce a LangChain ToolMessage
containing the JSON response.
| Operation | Data location |
|---|---|
| Google Search | results[0].organic |
| YouTube search | results[0].results |
| Video metadata | results[0] |
| Transcript | results[0].segments, with available fullText, languageCode, and isAutoGenerated |
Invalid arguments fail locally before sending a request. API failures raise
FlashDataError, a LangChain ToolException. HTTP 401 indicates an invalid key,
402 insufficient credits, 403 a source/access restriction, and 429 a rate/quota
limit. Upstream error bodies and credentials are not included in exception messages.
Paid POST requests are not automatically retried or redirected. A timeout, connection failure, unreadable result, or unexpected response may occur after a query was submitted and charged: check Jobs in the FlashData console before submitting again. The client connects directly to FlashData over HTTPS, with a 15-second connect timeout and a 120-second I/O timeout. Environment proxy settings are not used.
Existing MCP users
You can also connect LangChain to the existing hosted MCP endpoint at
https://data.flashdata.dev/mcp using the X-API-Key header. The native Python
tools above cover all 15 sources; the MCP catalog also contains account operations
and varies with key scopes. See hosted_mcp.py.
The example uses the current langchain[mcp] API, which LangChain labels beta.
Development
uv sync --extra examples
uv run --extra examples pytest --disable-socket --allow-unix-socket
uv run ruff check .
uv run ruff format --check .
uv build
uv run twine check dist/*
Tests include LangChain's standard tool suite, request contracts, validation,
sync/async calls, ToolMessage delivery, Agent error propagation, and tool budgets.
Unit tests do not call external services. Run the four paid API integration tests
explicitly with FLASHDATA_API_KEY configured:
FLASHDATA_RUN_LIVE=1 uv run --extra examples pytest tests/integration_tests -q
Release instructions: RELEASING.md. Data handling: PRIVACY.md. License: MIT. Support: support@flashdata.dev.
Metadata
Release files for langchain-flashdata 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Change of provenance
The repository or configuration that created these release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_flashdata-0.2.1.tar.gz | 289.1 kB | With provenance | Details for langchain_flashdata-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_flashdata-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for langchain_flashdata-0.2.1-py3-none-any.whl |
Total release size: 307.8 kB
Release files / langchain_flashdata-0.2.1.tar.gz
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | langchain_flashdata-0.2.1.tar.gz |
|---|---|
| Size | 289.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0c97fccb7b92024701bd77dd109b423a289c6b29c91e65b075322441494b333
|
|
BLAKE2b-256 checksum How to use checksums |
c3172512fd42a376555ceae01ed1e6815cd3ce9139186ac18d5128c64d1470e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logRelease files / langchain_flashdata-0.2.1-py3-none-any.whl
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | langchain_flashdata-0.2.1-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c0df2f00d5cb3cf124eb49a53d683022a01cb76011d289ef5a06dd7dd21ad4c5
|
|
BLAKE2b-256 checksum How to use checksums |
0bb5880b693449612aebd77f8f37eaaa50452c96b5697870536a53ea041d5704
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logSecurity for langchain-flashdata 0.2.1
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.
Change of provenance
The repository and configuration that created this release differ from a previous release.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Repository
- Removed 0.2.0 github.com/flashdata-dev/langchain-flashdata
- Added 0.2.1 github.com/rocosen/langchain-flashdata
Attestation for langchain_flashdata-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logA 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.