Home / Integrations / LlamaIndex
LlamaIndex
Load actor results into a LlamaIndex index with the Apify reader. The example uses YouTube Transcript & Subtitles Scraper; swap in any actor ID below.
The Apify reader for LlamaIndex runs an actor and maps each row to a Document.
# pip install llama-index-readers-apify
import os
from llama_index.core import Document, VectorStoreIndex
from llama_index.readers.apify import ApifyActor
reader = ApifyActor(os.environ["APIFY_TOKEN"])
documents = reader.load_data(
actor_id="arcadium/youtube-transcripts",
run_input={
"urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
"languages": [],
"captionType": "any",
"maxVideosPerSource": 10,
"subtitleFormat": "none",
},
dataset_mapping_function=lambda item: Document(text=str(item.get("transcript") or ""), metadata={"url": item.get("url")}),
)
index = VectorStoreIndex.from_documents(documents)Actor IDs
| Actor | Actor ID |
|---|---|
| Agoda and Trip.com Reviews Scraper | arcadium/agoda-tripcom-reviews |
| ATS Lookup | arcadium/ats-lookup |
| Booking.com Reviews Scraper | arcadium/booking-reviews |
| Capterra Products Scraper | arcadium/capterra-products |
| Capterra Reviews Scraper | arcadium/capterra-reviews |
| Career Site Jobs Scraper | arcadium/career-site-jobs |
| AutoScout24 Scraper | arcadium/eu-car-listings |
| Google Hotel Reviews Scraper | arcadium/google-hotel-reviews |
| Google Hotels Scraper | arcadium/google-hotels |
| Google News Scraper | arcadium/google-news |
| Google Trends Scraper | arcadium/google-trends |
| Hotel Reviews Scraper | arcadium/hotel-reputation |
| Review Monitor | arcadium/reputation-monitor |
| Seek Jobs Scraper | arcadium/seek-jobs |
| Software Reviews Scraper | arcadium/software-reviews |
| Tripadvisor Reviews Scraper | arcadium/tripadvisor-reviews |
| TrustRadius Reviews Scraper | arcadium/trustradius-reviews |
| YouTube Transcript & Subtitles Scraper | arcadium/youtube-transcripts |
| YouTube Scraper | arcadium/youtube-videos |