Skip to main content
This guide walks you from zero to a working API call inside your agent. All APIs in the directory are Apify Actors — cloud-hosted tools you call via HTTP with a single POST request. You’ll need an Apify account to get an API token. Signing up is free.
1

Browse the directory by category

Start at the API Categories section and pick the category that matches your agent’s goal:Each category page lists APIs ranked by quality score, with descriptions to help you pick the right one quickly.
2

Pick an API using the rating system

Every API in the directory shows a star rating and a review count, for example: ⭐ 4.8 (115).Rankings use a Bayesian average — not a raw mean. This means an API with a 4.8 rating from 115 reviews ranks higher than one with a 5.0 rating from 2 reviews. The formula balances the API’s own rating against the category average, weighted by review volume.
Filter for APIs with at least 20 reviews when you need a proven, production-ready tool. Newer APIs with fewer reviews may still be excellent, but have less evidence behind their rating.
Once you’ve chosen an API, its listing URL follows this pattern:
https://apify.com/{username}/{actor-name}?fpr=hs6s8
Click through to the Apify listing to read the full documentation, input schema, and pricing for that Actor.
3

Get your Apify API token

All Apify Actors are called via the Apify REST API. You need an API token to authenticate requests.
  1. Log in to apify.com
  2. Go to SettingsIntegrations
  3. Copy your Personal API token
Keep this token private — treat it like a password.
4

Call the API from your agent

Each Apify Actor is called by sending a POST request to the Actor run endpoint. The request body contains the Actor’s input parameters, which vary by Actor — check the listing’s input schema tab for the full reference.Here’s a complete example using the Website Content Crawler, one of the top-ranked APIs in the AI category. It crawls a website and returns clean Markdown text, ready to feed into an LLM or vector store.
call_actor.py
import requests
import time

APIFY_TOKEN = "YOUR_APIFY_TOKEN"
ACTOR_ID = "apify~website-content-crawler"

# Start the Actor run
run_response = requests.post(
    f"https://api.apify.com/v2/acts/{ACTOR_ID}/runs",
    headers={"Authorization": f"Bearer {APIFY_TOKEN}"},
    json={
        "startUrls": [{"url": "https://example.com"}],
        "maxCrawlPages": 5,
        "outputFormats": ["markdown"]
    }
)
run_response.raise_for_status()
run_id = run_response.json()["data"]["id"]

# Wait for the run to finish
while True:
    status_response = requests.get(
        f"https://api.apify.com/v2/actor-runs/{run_id}",
        headers={"Authorization": f"Bearer {APIFY_TOKEN}"}
    )
    status = status_response.json()["data"]["status"]
    if status in ("SUCCEEDED", "FAILED", "ABORTED"):
        break
    time.sleep(2)

# Fetch the results from the dataset
dataset_id = status_response.json()["data"]["defaultDatasetId"]
results_response = requests.get(
    f"https://api.apify.com/v2/datasets/{dataset_id}/items",
    headers={"Authorization": f"Bearer {APIFY_TOKEN}"}
)
results = results_response.json()

for item in results:
    print(item.get("markdown", ""))
The Actor ID format is {username}~{actor-name}. You can find this on any Apify listing page.
5

Integrate with LangChain or OpenAI tools

Once you have results from an Actor, pass them directly into your agent framework.LangChain — use the result as a document in a retrieval chain:
langchain_agent.py
from langchain.schema import Document
from langchain.chains import RetrievalQA
from langchain_community.vectorstores import FAISS
from langchain_openai import OpenAIEmbeddings, ChatOpenAI

# Convert Actor results to LangChain documents
docs = [
    Document(page_content=item["markdown"], metadata={"url": item["url"]})
    for item in results
    if item.get("markdown")
]

# Build a retrieval chain
vectorstore = FAISS.from_documents(docs, OpenAIEmbeddings())
qa_chain = RetrievalQA.from_chain_type(
    llm=ChatOpenAI(model="gpt-4o"),
    retriever=vectorstore.as_retriever()
)

answer = qa_chain.invoke("What does this website offer?")
print(answer["result"])
OpenAI function calling — wrap the API call as a tool:
openai_tool.py
import json
import requests
from openai import OpenAI

client = OpenAI()

def call_actor(actor_id: str, input_params: dict) -> str:
    """Call an Apify Actor and return the results as a JSON string."""
    run = requests.post(
        f"https://api.apify.com/v2/acts/{actor_id}/runs",
        headers={"Authorization": f"Bearer {APIFY_TOKEN}"},
        params={"waitForFinish": 60},
        json=input_params
    )
    run.raise_for_status()
    dataset_id = run.json()["data"]["defaultDatasetId"]
    items = requests.get(
        f"https://api.apify.com/v2/datasets/{dataset_id}/items",
        headers={"Authorization": f"Bearer {APIFY_TOKEN}"}
    ).json()
    return json.dumps(items[:5])  # return first 5 results

tools = [
    {
        "type": "function",
        "function": {
            "name": "call_actor",
            "description": "Call an Apify Actor to scrape data or run a task",
            "parameters": {
                "type": "object",
                "properties": {
                    "actor_id": {"type": "string", "description": "The Apify Actor ID"},
                    "input_params": {"type": "object", "description": "Input parameters for the Actor"}
                },
                "required": ["actor_id", "input_params"]
            }
        }
    }
]

Next steps

Browse categories

Explore all 17 API categories and find tools for your use case.

Use cases

See example agents you can build with these APIs.

Build docs developers (and LLMs) love