Skip to main content

LLMLayer

LLMLayer is a web API for AI applications. Use one account and one API key to search the web, scrape pages, crawl websites, map URLs, extract structured data, process PDFs and YouTube transcripts, and generate web-grounded answers.

Get API Key

Create an account and start with free credits.

API Reference

Inspect every endpoint and schema.

Choose the Right API

JobAPIUse it when
Answer a question with current web contextAnswerYou want an LLM response with optional sources/images
Get raw search resultsWeb SearchYou want to rank, filter, or scrape results yourself
Scrape one pageScraperYou need markdown, HTML, or a screenshot from a URL
Extract data from one pageExtractYou need schema-shaped data, a summary, Q&A, links, or brand data
Crawl multiple pagesCrawlYou need streamed markdown from a site
Discover URLsMapYou need a URL inventory before scraping or crawling
Read a PDFPDF ContentYou need text from a public PDF URL
Read a YouTube videoYouTube TranscriptYou need transcript text and video metadata

Install an SDK

pip install llmlayer

First Request

from llmlayer import LLMLayerClient

client = LLMLayerClient(api_key="YOUR_LLMLAYER_API_KEY")

response = client.answer(
    query="What changed in AI regulation this week?",
    model="llmlayer-web",
    search_type="news",
    return_sources=True,
)

print(response.answer)
print(response.sources)

Core Patterns

Structured extraction

program = client.extract(
    "https://www.ycombinator.com/about",
    modes=["json"],
    json_schema={
        "program": "string",
        "duration": "string",
        "funding": "string",
        "benefits": ["string"],
    },
)

print(program.structured_data)

Search then scrape

const search = await client.searchWeb({
  query: 'latest LLM evaluation research',
  domainFilter: ['arxiv.org', 'openai.com', '-reddit.com'],
});

const firstUrl = search.results[0]?.link;
if (typeof firstUrl === 'string') {
  const page = await client.scrape(firstUrl, {
    formats: ['markdown'],
    mainContentOnly: true,
  });
  console.log(page.markdown);
}

Stream a crawl

for event in client.crawl_stream("https://www.ycombinator.com", max_pages=10):
    if event.get("type") == "page":
        print(event["page"].get("final_url"))

Models

The currently documented model IDs are:
ModelPricing styleBest for
llmlayer-webFlat per queryDefault web-grounded answers
llmlayer-fastFlat per queryLower latency answers
openai/gpt-4o-miniToken priced + LLMLayer feeBudget token-priced answers
openai/gpt-5.1Token priced + LLMLayer feePremium reasoning
provider_key is accepted for backward compatibility but currently ignored; provider usage is not billed to the user’s provider account.

Pricing Snapshot

APICost
Answer$0.004 × max_queries + model tokens, or flat LLMLayer model pricing
Web Search$0.002 per request
Scraper$0.001 per supported format
Extract$0.005 per AI mode, $0.001 links, $0.002 brand
Crawl$0.001 per successful page, reported in the usage event
Map$0.002 per request
YouTube Transcript$0.003 per request
PDF Content$0.002 per request
Use response cost fields and the dashboard ledger as billing source of truth.

Next Steps

Answer API

Generate web-grounded answers.

Extract API

Turn pages into structured data.

Examples

Copy production-shaped recipes.