Arcadium Data Scrapers
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

ActorActor ID
Agoda and Trip.com Reviews Scraperarcadium/agoda-tripcom-reviews
ATS Lookuparcadium/ats-lookup
Booking.com Reviews Scraperarcadium/booking-reviews
Capterra Products Scraperarcadium/capterra-products
Capterra Reviews Scraperarcadium/capterra-reviews
Career Site Jobs Scraperarcadium/career-site-jobs
AutoScout24 Scraperarcadium/eu-car-listings
Google Hotel Reviews Scraperarcadium/google-hotel-reviews
Google Hotels Scraperarcadium/google-hotels
Google News Scraperarcadium/google-news
Google Trends Scraperarcadium/google-trends
Hotel Reviews Scraperarcadium/hotel-reputation
Review Monitorarcadium/reputation-monitor
Seek Jobs Scraperarcadium/seek-jobs
Software Reviews Scraperarcadium/software-reviews
Tripadvisor Reviews Scraperarcadium/tripadvisor-reviews
TrustRadius Reviews Scraperarcadium/trustradius-reviews
YouTube Transcript & Subtitles Scraperarcadium/youtube-transcripts
YouTube Scraperarcadium/youtube-videos