Skip to main content

FlashData tools and readers for LlamaIndex

Give a research agent current Google and YouTube results, or load existing video captions into a RAG pipeline with timestamps and source links. Choose the needed sources when building your application. The package supplies 17 native FunctionTool objects for 15 capabilities and a reader for the 14 data sources. Media delivery uses job tools, not a text reader.

This is an independently maintained integration. It is not an official LlamaIndex endorsement or a claim of 15 LlamaHub listings. Install the versioned package from PyPI:

python -m pip install 'llama-index-tools-flashdata==0.2.0'

Requires Python 3.11+ and llama-index-core 0.14.25–0.14.x. Get an API key from the FlashData console and provide it through your application's secret manager as FLASHDATA_API_KEY.

Installation is free; FlashData API requests use paid Credits. Check the current pricing and source-specific charges. LlamaIndex model, embedding and customer-storage charges are separate. These examples make no model or embedding calls.

Search evidence for a research agent

from llama_index.tools.flashdata import FlashDataTools, to_documents

tools = FlashDataTools(sources=["google_search"]).to_tool_list()
output = tools[0].call(query="RAG evaluation precision recall", num=5)
raw = output.raw_output  # Complete structured API response and usage.
documents = to_documents("google_search", raw)  # No second API request.
for doc in documents:
    print(doc.metadata.get("url"), doc.text)

Pass tools to your application's LlamaIndex FunctionAgent with the model you have configured. Tool schemas contain only source arguments; API key, storage credentials, source selection and download permission belong to the application. Treat returned web/caption text as untrusted evidence, not agent instructions. Google results contain search snippets and metadata, not fetched web-page text.

Caption Documents for retrieval

from llama_index.tools.flashdata import FlashDataReader

reader = FlashDataReader(source="youtube_transcript")
documents = reader.load_data(video_id="jNQXAC9IVRw", language="en")
for doc in documents:
    print(doc.metadata.get("url"), doc.metadata.get("start"), doc.text)

Each caption segment becomes a Document with its text, available start/end, video URL, languageCode and isAutoGenerated. If segments are unavailable but fullText exists, it becomes one Document without invented timestamps. Transcript defaults to automatic captions; youtube_captions defaults to uploader captions. Neither generates speech recognition, translates, or falls back to another track.

Search readers produce one JSON Document per result record, preserving optional record fields. Image URLs/dimensions are metadata, not image embeddings. Places may have no URL. The reader does not invent missing source links. Use tool raw_output for the full response, including Google related-search lists, usage and other provider envelope fields. to_documents() converts an existing result without a second paid query.

await tool.acall(...) and await reader.aload_data(...) use LlamaIndex's native thread offloading. Cancelling an await does not cancel an accepted paid job; check FlashData Jobs before resubmitting.

All capabilities

See the task guides below for inputs, outputs, a runnable example and limitations.

Task Source Guide
Collect web evidence for a research agent google_search Google Search
Build a news evidence feed for an agent google_news Google News
Prepare an image reference shortlist google_images Google Images
Ground a product comparison with search snapshots google_shopping Google Shopping
Find video references across websites google_videos Google Videos
Collect local options for a planning assistant google_places Google Places
Discover videos before building a caption collection youtube_search YouTube Search
Create a larger video research candidate set youtube_search_extended YouTube Extended Search
Inspect chapters before choosing retrieval material youtube_metadata YouTube Metadata
Load timestamped automatic captions for RAG youtube_transcript YouTube Transcript
Build a collection from uploader captions youtube_captions YouTube Captions
Record license-label metadata during dataset review youtube_trainability YouTube License Metadata
Snapshot a channel for research triage youtube_channel YouTube Channel
Explore query phrasing before a video search youtube_suggestions YouTube Autocomplete
Deliver approved media for a downstream workflow youtube_download YouTube Download to Cloud Storage

Media delivery lifecycle

Configure FLASHDATA_DOWNLOAD_STORAGE as a secret JSON destination. Supported providers are S3, S3-compatible, GCS, Azure, OSS, COS, BOS and TOS. Use fields from the download contract; the packaged storage.schema.json describes the credential structure. Bucket names belong in storage_url; optional folders belong in object_prefix.

from llama_index.tools.flashdata import FlashDataTools

# Only enable after authorizing this paid write to your own destination.
submit, status, result = FlashDataTools(
    sources=["youtube_download"], allow_download=True
).to_tool_list()
receipt = submit.call(video_id="jNQXAC9IVRw", download_type="audio", output_format="m4a").raw_output
job_id = receipt["id"]  # Persist before any follow-up; never resubmit to poll.
state = status.call(job_id=job_id).raw_output
# Later, read result with the same ID. Pending jobs return status, not an error.
delivery = result.call(job_id=job_id).raw_output

Download submission is disabled by default. You can use status/result tools without enabling it or supplying destination credentials. Completed result JSON expires after 24 hours; media retention depends on your storage. Supply only content you are entitled to download and use. Storage authorization is not a training license.

Failure handling

Calls are single-attempt, bounded to 120 seconds (15-second connection timeout) and 20 MiB. Failed/ambiguous POSTs are never automatically retried. A timeout can mean the paid job was accepted: check the FlashData Jobs console before another submission. Missing credits, unauthorized sources and unavailable captions are errors, not successful empty results or reasons to silently change source.

Job reads verify the ID and youtube_download source. Download status/receipt outputs exclude storage parameters. Result JSON is fetched only from the trusted HTTPS origin returned by FlashData authentication; the API key is not sent there. Redirects are not followed automatically. Raw HTTP errors and credentials are not included in FlashDataError messages.

Local verification

uv sync --frozen
uv run --frozen pytest -q
uv run --frozen python -m build
uv run --frozen twine check dist/*
uv run --frozen python scripts/verify_install.py

Tests disable network sockets and exercise real LlamaIndex tools/readers against HTTP fixtures. They do not establish live API, model, storage-write or public directory acceptance. Shared parameter and HTTP contracts come from the reviewed FlashData Haystack adapter; contract-provenance.json records exact origins and differences. No Haystack runtime dependency is needed.

Subtitle languages

For transcript and captions, language accepts one code or a list of 1–10 distinct codes, such as ["en", "es"]. Omit it to prefer en-orig, then en, returning one track. Explicit strings keep the single-track response. Lists, including one-element lists, return tracks and per-language errors inside each result. Keep available tracks and report the failed languages; if none succeed, tracks is empty. The auto choice applies to every language and never switches caption source.

The reader keeps each track’s language and timestamps. subtitle_errors in document metadata records partial failures; an all-failed result produces an error document.

Metadata

Release files for llama-index-tools-flashdata 0.2.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 llama-index-tools-flashdata 0.2.0
File Size Uploaded Provenance Actions
llama_index_tools_flashdata-0.2.0.tar.gz 246.4 kB Without provenance Details for llama_index_tools_flashdata-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-flashdata 0.2.0
File Interpreter ABI Platform Actions
llama_index_tools_flashdata-0.2.0-py3-none-any.whl Python 3 none any Details for llama_index_tools_flashdata-0.2.0-py3-none-any.whl

Total release size: 266.3 kB

Release files / llama_index_tools_flashdata-0.2.0.tar.gz

Download URL llama_index_tools_flashdata-0.2.0.tar.gz
Size 246.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f1dccff775eed8c5c825ef641a1cc554d3510e9b52226cfb4f5fd777d09f8d77
BLAKE2b-256 checksum
How to use checksums
a84e020956494f1da84d8e0b4f993e2709a129c5347074c9e6d313380b325dd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / llama_index_tools_flashdata-0.2.0-py3-none-any.whl

Download URL llama_index_tools_flashdata-0.2.0-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0538d5892174ee7550b953b65a09d99fd83c13c3634ebdd561fea0e075c52563
BLAKE2b-256 checksum
How to use checksums
780913a57ace3eda9bd48b170364149044605039c88a843149860e7b5371ef93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for llama-index-tools-flashdata 0.2.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.

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