From API key to production crawl
Short pages, runnable examples, no ceremony. Start at the quickstart and branch out.
Authenticate
Every request carries a bearer token. Keys are created in the dashboard and can be scoped per environment.
export IRMU_API_KEY="irmu_sk_live_..."
curl -G https://app.irmu.com/api/crawl \
-H "Authorization: Bearer $IRMU_API_KEY" \
--data-urlencode "url=https://example.com"Make your first request
Generated from the live OpenAPI spec, so it always matches the current surface.
curl -X GET "https://app.irmu.com/api/crawl?url=&premium=&js=&images=&ai_query=&adblock=&wait_until=&cookies_banner=&viewport=&device_scale_factor=&mobile=&landscape=&touch=&user_agent=&country=&city=&output=&main_content=&key=" \
-H "Authorization: Bearer $IRMU_API_KEY"Read the response
A page comes back as text/html with the credit headers set. A crawl that produces no page — an ai_query — answers a JSON envelope with the answer in data instead, so branch on the content type rather than the status code. A slow page returns 202 with a job_id you collect from /crawl/{job} for free.
"string"Handling errors
Errors are typed and stable. Retry 429 (you exceeded your plan concurrency) with exponential backoff, and retry 502 a couple of times — Irmu could not serve the request internally, so it was not billed. Note that a 404, 500 or anti-bot response from the target is a successful request and is billed.
Do not retry 400 or 401: the request or the key is wrong and retrying will fail identically. 402 means the credit pool is exhausted, so top up or wait for the reset instead of hammering the endpoint.
The ideas behind every parameter
The handful of ideas that explain every parameter and every bill.
Credits & billing
Everything is priced in credits, and only successful requests are billed. If a fetch fails after our internal retries, you are not charged for it.
On GET /crawl, cost depends on what you asked for: plain fetches are cheapest, JavaScript rendering and premium IPs cost more. Recipes, screenshots, ChatGPT and Booking.com requests are 30 credits flat. The response includes credits_used so you can attribute spend per job.
Retries & idempotency
Irmu retries transient failures server-side — blocked responses, timeouts, proxy hiccups — before returning anything to you. What reaches your code is either a usable response or a typed error.
Reads are idempotent: re-sending the same request returns the same shape and bills again only if it succeeds. Make your own retry loop bounded and jittered so a bad target does not burn your daily budget.
Rate limits & concurrency
Limits are expressed as concurrent requests, not requests per second: Free 1, Lite 5, Standard 50, Pro 100. Enterprise plans go higher.
Going over your concurrency returns 429. Cap your worker pool at your plan's number rather than relying on retries, and add a per-domain cap of your own so one slow target cannot starve the rest of the queue.
Output formats: HTML, JSON or markdown
output sets how a finished page comes back from GET /crawl, POST /crawl and GET /crawl/{job}: html (default, the page as text/html), json (always the JSON envelope, HTML in content) or markdown (text/markdown with scripts, styles and <head> dropped and links made absolute). Markdown costs the same as HTML.
Add main_content=true with output=markdown to keep only the important part of the page: navigation, the site header and footer, sidebars, dialogs and cookie banners are removed first. Free. If almost no text is left, the whole page is converted instead. main_content with any other output, or markdown with ai_query, is refused with a 422 before anything is charged.
A 202 job does not remember the format: pass output and main_content again when collecting from GET /crawl/{job}.
curl -G https://app.irmu.com/api/crawl \
-H "Authorization: Bearer $IRMU_API_KEY" \
--data-urlencode "url=https://example.com/blog/post" \
--data-urlencode "output=markdown" \
--data-urlencode "main_content=true"Recipes (POST /crawl)
POST /crawl runs a recipe: a list of blocks executed against a page in order — fill a form, click, wait, scroll, paginate, extract fields. The body accepts only blocks, name and expectedOutput; any other field is a 422. Fetch options (premium, country, js, wait_until…) stay in the query string, meaning the same as on GET /crawl.
Only the start url of your first block (blocks[0].details.source) is used; the start block itself is built from the query string. Blocks after the first run as written. A recipe costs 30 credits flat — the number of blocks, premium, country and city don't change it. Long runs may return 202; collect them free from GET /crawl/{job}.
Every block type, with its fields and examples, is listed in the recipe blocks reference: https://irmu.com/docs/recipes.
curl -X POST "https://app.irmu.com/api/crawl?country=us" \
-H "Authorization: Bearer $IRMU_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"titles","expectedOutput":"list","blocks":[
{"type":"start","details":{"source":"https://news.ycombinator.com"}},
{"type":"extract","details":{"selector":".titleline > a","fields":{"title":"text","url":"href"}}}
]}'Ask ChatGPT
GET /chatgpt?prompt=… opens ChatGPT, types your prompt (up to 1,000 characters), waits for the answer and returns it as JSON nodes — paragraphs, headings, lists, tables and product lists — with the citations ChatGPT showed. No OpenAI key is involved.
Always JSON. 30 credits flat; country and city change where the question is asked from (and often the answer), not the price.
Google AI Overview
GET /google-ai-overview?query=… searches Google and returns the AI Overview shown above the results: ai_overview (the answer as text) and sources (the pages it cites). query is up to 500 characters; domain picks which Google to ask (com by default, or de, es, co.uk, com.br…) and so the language. Add country (and city) to search from inside that market. premium is on by default.
30 credits flat. A query with no overview returns ai_overview: null with status: done and is still charged. A 500 is refunded. A 202 is collected free from GET /crawl/{job}, where the answer arrives under data.ai_overview and data.ai_overview_sources.
Booking.com data
GET /booking/search?destination=Rome returns the properties on the first results page, one row per card, with optional checkin, checkout, adults, rooms and currency. Fields are text as Booking prints them; an empty search is still charged.
GET /booking/hotel?url=… reads one property page into an object with parsed prices, rating, rooms and facilities. Send checkin and checkout for room prices. A page that could not be read is not charged. Both are 30 credits flat.
Tripadvisor hotel data
GET /tripadvisor/search?destination=Lisbon returns hotels with rating, subratings, ranking, price and amenities. Add checkin, checkout, guests, filters, price_min/price_max, sort and max_pages (1–5). 30 credits per page.
GET /tripadvisor/hotel?url=… reads one hotel page: coordinates, rating breakdown, partner prices, photos, nearby places and reviews. 30 credits flat, refunded if the page could not be read. Premium IPs are on by default at no extra cost.
Airbnb listings
GET /airbnb/search?destination=Barcelona returns listings with numeric prices, rating, beds, bathrooms, badges and photos, 18 per page until limit. Add checkin, checkout, currency, locale, price_type and filters such as free_cancellation or instant_book. 30 credits per page of 18.
GET /airbnb/listing?url=… reads one listing: host, amenities, house rules, ratings by category, latest 24 reviews, a year of availability, photos and the price for your dates. 30 credits flat, not charged if the listing could not be read.
Sessions & cookies
Sticky sessions across requests are not part of the API. Each crawl is independent; for multi-step flows within one visit (forms, clicks, pagination), use a recipe on POST /crawl.
For paginated targets, request each page by URL and keep country constant so the results stay in one market.
Rendering JavaScript
JavaScript rendering is on by default: the page loads in a real browser and you get the DOM after execution instead of the initial HTML shell. Control when the capture happens with wait_until — networkidle0 by default, or domcontentloaded for pages that hold a connection open.
Rendering is slower and costs more credits, so send js=false for static pages. A quick test: fetch the page with js=false, and if the field you need is missing from the HTML, leave rendering on for that route.
Geo-targeting
Pass a country code to route the request through an IP in that country. Use it for localized pricing, regional search results and geo-fenced content. Country targeting costs no extra credits; adding a city doubles what a /crawl request costs.
Combine country with premium=true when a target only serves real residential visitors from that market.
Endpoints
Every operation the API exposes, with parameters, responses and a runnable example.
Crawl
Crawl a url
Fetches a URL through a proxy pool and returns the page. The charge is computed before the fetch and tallied against the URL's host for the day; the response reports what was requested and what it cost. Boolean options (premium, js, images, adblock, mobile, landscape, touch, main_content) accept true/false, 1/0, yes/no, on/off in any case; anything else is refused.
When to use it
Use it to retrieve a rendered page, optionally with images, an AI answer about its content, or as Markdown. A 202 means the crawl is paid for and running; collect it from /crawl/{job}, which is free.
Notes
- Branch on the response content type, not the status code.
output=json, anai_query, or a result carrying both a page and a screenshot returns the JSON envelope; otherwise a finished crawl returns the document itself. cityrequirescountryand doubles the crawl's cost, surcharges included. Check the response'scityfield for the city actually targeted.markdownwithai_query, andmain_contentwith anyoutputother thanmarkdown, are refused with a422before anything is charged.
curl -X GET "https://app.irmu.com/api/crawl?url=&premium=&js=&images=&ai_query=&adblock=&wait_until=&cookies_banner=&viewport=&device_scale_factor=&mobile=&landscape=&touch=&user_agent=&country=&city=&output=&main_content=&key=" \
-H "Authorization: Bearer $IRMU_API_KEY"Run a recipe
Runs a recipe: an ordered list of blocks the crawler executes against a page. The request body is the recipe (blocks, name, expectedOutput); all crawler options stay in the query string and are rejected with 422 if placed in the body. Only blocks[0].details.source is read from the first block — its other settings are ignored and rebuilt from the query string. Costs a flat 30 credits regardless of block count, premium, country, or city.
When to use it
Use it when the built-in GET /crawl cannot express the work: filling a form, paging through results, or extracting specific fields with selectors. For a plain page fetch, use the GET instead.
Notes
- Branch on the response content type, not the status code. A single-block recipe returns the page (
text/html, ortext/markdownwithoutput=markdown); anything longer returns the JSON envelope with results indata. - A
202means the crawl is paid for and running; collect it from/crawl/{job}(free). The credits are already spent. output=markdownis refused with422before charging unless the recipe is the start block alone. A500refunds the charge; a recipe that ran and extracted nothing is a200— checkdata.
curl -X POST "https://app.irmu.com/api/crawl?premium=&js=&images=&adblock=&wait_until=&cookies_banner=&viewport=&device_scale_factor=&mobile=&landscape=&touch=&user_agent=&country=&city=&output=&main_content=&key=" \
-H "Authorization: Bearer $IRMU_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Products, page 2", "expectedOutput": "list", "blocks": [ { "type": "start", "details": { "type": "url", "source": "https://example.com/products" } }, { "id": "rows", "type": "extract", "details": { "selector": ".product .title", "name": "title", "property": "textContent" } }, { "type": "paginate", "details": { "selector": ".pagination .next", "startBlock": "rows" } } ] }'Collect a crawl
Retrieves a crawl that was still running when the initial POST /crawl request returned 202 Accepted. Call this endpoint repeatedly to collect the result once processing completes.
When to use it: Use after receiving a 202 from /crawl to poll for completion. Use with debug=1 to inspect crawl progress in real time without cost. Use when you need a different output format than originally requested, since nothing is remembered server-side.
- Query parameter
?key=is not accepted; authentication requires theAuthorizationheader. - A
404means either the job never existed or belongs to another organization; these cases are intentionally indistinguishable. outputandmain_contentmust be passed on every request; the server does not persist your original crawl parameters.
curl -X GET "https://app.irmu.com/api/crawl/{job}?output=&main_content=" \
-H "Authorization: Bearer $IRMU_API_KEY"ChatGPT
Ask ChatGPT
Sends a prompt to ChatGPT through a browser automation and returns the response as structured JSON with citations preserved. The crawler opens chatgpt.com, types the prompt character by character, waits for the streamed answer, and converts it into typed nodes—paragraphs, headings, lists, tables, product lists.
When to use it. Use this when you need ChatGPT's output with inline citations intact, or when you want the answer shaped by a specific geographic origin without managing proxies or browser infrastructure yourself. For simple text extraction from static pages, /crawl is cheaper and faster.
Notes
- Flat 30 credits.
premium,country, andcityaffect routing and access but never change the price, unlike on/crawl. - Prompts are typed slowly. The 1000-character limit exists because each character is typed individually; a long prompt consumes significant time before ChatGPT begins responding.
- Collect 202s via `/crawl/{job}`. Slow prompts return 202; poll the crawl collection endpoint. The answer nests under
data.conversation, not top-levelconversation.
curl -X GET "https://app.irmu.com/api/chatgpt?prompt=&premium=&country=&city=&key=" \
-H "Authorization: Bearer $IRMU_API_KEY"Screenshot
Screenshot a url
Returns a full-page screenshot of a URL as base64 JPEG. Uses the same fetch pipeline as /crawl — identical URL, options, and ai_query support — but captures the entire scroll height as an image instead of returning HTML. Costs 30 credits flat regardless of proxy, location, or feature flags used.
When to use it: when you need a visual record of a page state, when rendering output matters more than DOM structure, or when pairing an ai_query with visual context. Use viewport to constrain tall pages that would otherwise generate multi-megabyte responses.
- `images` defaults to `true` (opposite of
/crawl) to prevent empty image boxes in the screenshot; disable only if you explicitly want holes. - Response payload grows quickly: base64 adds ~33% overhead, so set
viewportfor long pages and review timeout configuration. - On
202 Accepted, collect the result from/crawl/{job}where the image sits atdata.screenshots[0]instead of the directscreenshotfield.
curl -X GET "https://app.irmu.com/api/screenshot?url=&premium=&js=&images=&ai_query=&adblock=&wait_until=&cookies_banner=&viewport=&device_scale_factor=&mobile=&landscape=&touch=&user_agent=&country=&city=&key=" \
-H "Authorization: Bearer $IRMU_API_KEY"Booking
Search Booking.com
Searches Booking.com for accommodations and returns the first page of property results, with one row per property card. Results are always scraped from the English-language site.
When to use it: Use this endpoint when you need structured property listings from Booking.com for a specific destination, with optional date and guest filtering. Prefer this over /crawl when you only need the first page of results and want a flat 30-credit cost regardless of proxy routing choices. Use the key query parameter or Authorization header for authentication.
checkinandcheckoutare interdependent: providing one without the other returns422- Empty result sets still cost 30 credits and return
200withstatus: doneand an emptyhotelsarray premiumdefaults totrue; explicitly sendfalseto use the standard proxy pool, though this typically results in blocks from Booking.com
curl -X GET "https://app.irmu.com/api/booking/search?destination=&checkin=&checkout=&adults=&rooms=¤cy=&premium=&country=&city=&key=" \
-H "Authorization: Bearer $IRMU_API_KEY"Read a Booking.com property
Retrieves a single Booking.com property page as a structured object. Extracts rendered blob fields into typed values: price and per-room prices as { amount, currency, original, discount }, rating as { score, word, count }, and facilities grouped by page layout. Also returns text lists including points of interest, review subscores, featured reviews, questions, and page sections. Costs 30 credits flat; no charge for unreadable pages such as challenge screens.
When to use it: Use when you need parsed property data with resolved pricing and ratings rather than raw HTML. Use when you know the exact property URL and want immediate synchronous response; if the crawl is slow, a 202 is returned and results are collected via /crawl/{job}. Use when you need English-language output regardless of source URL language.
Notes
checkinandcheckoutare interdependent: both required for room prices, both omitted for property details without pricing. Single date or past dates return 422.premiumdefaults totrue; explicitfalserequired to use standard proxy pool. Standard pool is more likely blocked by Booking.countrywithoutcityis valid, butcitywithoutcountryreturns 422. Geographic parameters affect pricing and ranking but do not change response language.
curl -X GET "https://app.irmu.com/api/booking/hotel?url=&checkin=&checkout=&adults=&rooms=¤cy=&premium=&country=&city=&key=" \
-H "Authorization: Bearer $IRMU_API_KEY"Tripadvisor
Search Tripadvisor hotels
Searches Tripadvisor for hotels and returns one row per hotel card, including rating, subratings, ranking, price, amenities, and the quoted review. The crawler interacts with the page as a visitor would: typing the destination, selecting dates, setting rooms and guests, applying filters, entering a price range, and choosing sort order. Only destination is required; omitted parameters leave the page unchanged rather than applying defaults.
When to use it
Use this when you need structured hotel data from Tripadvisor's search results, including properties that appear nearby or as sponsored listings. Use max_pages to control result volume and credit cost. Use checkin and checkout together when you need stay-specific pricing; omit both when you only need hotel listings without rates.
Notes
- A broader result set than expected means a filter or step could not be applied and was skipped; check
nearbyandsponsoredflags to identify non-matching entries. - Each page in
max_pagescosts 30 credits upfront, charged when the crawl starts, even if no results are found or fewer pages exist. - Authentication via
Authorizationheader takes precedence over?key=; if both are present, the query parameter is ignored.
curl -X GET "https://app.irmu.com/api/tripadvisor/search?destination=&checkin=&checkout=&rooms=&adults=&children=&filters=&price_min=&price_max=&sort=&max_pages=&premium=&country=&city=&key=" \
-H "Authorization: Bearer $IRMU_API_KEY"Read a Tripadvisor hotel
Reads a single Tripadvisor hotel page into a structured object containing address, coordinates, ranking, rating with distribution and subratings, hotel class, amenities, feature groups, photos, offers with prices, directions, nearby points of interest, first-page reviews, and similar hotels. The page is always fetched from Tripadvisor's English site regardless of which country site the URL originates from, and any query string parameters on the provided URL are stripped.
When to use it: Use this endpoint when you need comprehensive hotel data in a single request and do not require review pagination beyond the first page. For multi-page review collection or asynchronous workflows, initiate a crawl via /crawl instead. The 202 response indicates the request is being processed as a background job; poll /crawl/{job} to retrieve results.
- The
urlparameter must match the exact Tripadvisor hotel page format (Hotel_Review-g<geo>-d<hotel>-Reviews-<name>.html); anything else returns 422. premiumdefaults to enabled; explicitly disable withfalse,0,no, oroffif standard proxy routing is acceptable.- A 500 response refunds credits but still records the attempt against
www.tripadvisor.com; retrying immediately may hit rate limits.
curl -X GET "https://app.irmu.com/api/tripadvisor/hotel?url=&premium=&country=&city=&key=" \
-H "Authorization: Bearer $IRMU_API_KEY"Airbnb
Search Airbnb
Searches Airbnb listings by scraping Airbnb's own URL structure and rendered page data, returning structured results with resolved numeric prices, ratings, beds, bathrooms, badges, and photos. Results are paginated automatically in batches of 18 until the requested limit is reached.
When to use it: Use this endpoint when you need Airbnb search data without maintaining your own scraping infrastructure, particularly for price monitoring, market research, or travel product integrations where real-time listing data matters. For large-scale ongoing collection, prefer /crawl with callback delivery; use this synchronous endpoint for ad-hoc queries or when you need immediate results.
- Credits are charged per page of 18 results (30 credits each) upfront when the crawl starts, not upon completion; empty searches and searches with fewer results than
limitstill consume the full estimated credits checkinandcheckoutare interdependent—either both must be provided or both omitted; single-date requests return 422countryis required when usingcity, andpremiumdefaults to enabled unless explicitly set tofalsewith accepted boolean spellings
curl -X GET "https://app.irmu.com/api/airbnb/search?destination=&domain=&checkin=&checkout=&locale=¤cy=&price_type=&free_cancellation=&instant_book=&guest_favorite=&self_check_in=&page=&limit=&premium=&country=&city=&key=" \
-H "Authorization: Bearer $IRMU_API_KEY"Read an Airbnb listing
Retrieves a single Airbnb listing as a structured object containing description, location, capacity, host details, amenities, house rules, check-in/out policies, safety information, cancellation policy, ratings, recent reviews, availability calendar, photo tour, and pricing for the requested dates. The listing is fetched from the URL's native Airbnb site using the request's locale, currency, guest count, and dates; the URL's query parameters are discarded.
When to use it: Use for one-off listing lookups where you need comprehensive data including dynamic pricing, or when you require immediate results rather than batch collection. For large-scale extraction, use /crawl instead; this endpoint returns 202 with a job ID if the fetch is slow, which you then collect via /crawl/{job}.
Notes
checkinandcheckoutare interdependent: both required or both omitted. Without them, the listing returns without pricing.premiumdefaults totrue; explicitly sendfalseto use the standard proxy pool.- Failed reads (500 responses) refund credits, but the attempt still counts against the target Airbnb site's rate limits.
curl -X GET "https://app.irmu.com/api/airbnb/listing?url=&adults=&checkin=&checkout=&locale=¤cy=&premium=&country=&city=&key=" \
-H "Authorization: Bearer $IRMU_API_KEY"Read Google's AI Overview
Searches Google for a query and returns the AI Overview panel: the generated answer text and the source pages it cites. The overview is expanded before reading; the consent dialog on first visit is automatically dismissed.
When to use it: Use this when you need the synthesized answer Google shows above organic results, not the results themselves. Pair domain with country to get region-specific overviews in the correct language and market context.
- Always charged for missing overviews: A query with no AI Overview returns
ai_overview: nullandstatus: donebut still costs 30 credits. - Premium proxy default:
premiumdefaults totruebecause standard proxies are frequently blocked by Google; explicitly setfalseto opt out. - Asynchronous fallback: A
202response means the crawl is queued; collect results from/crawl/{job}where fields are nested underdata.ai_overviewanddata.ai_overview_sources.
curl -X GET "https://app.irmu.com/api/google-ai-overview?query=&domain=&premium=&country=&city=&key=" \
-H "Authorization: Bearer $IRMU_API_KEY"Handle failures explicitly
Target responses — including 404s, 500s and anti-bot blocks — are returned to you and billed as successful requests. Typed errors below are Irmu-side or coverage failures and are not billed.
Operating safely
What to watch, what to cap and how to keep keys safe once you are past the first crawl.
Observability
The dashboard reports success rate and usage per API key, and credit consumption broken down by day, website and key. Tagging jobs with their own key is the cheapest way to get per-pipeline telemetry without building it yourself.
Watch success rate per site rather than in aggregate — a single target changing its defences is invisible in a global number.
Cost control
Set a daily credit limit in organization settings. It is the most your organization may spend in a day; a crawl that would go over it is refused until midnight. Leave it empty for no limit.
For crawls that ask a question about a page, plug in your own language model in settings — extraction then runs on your model and no additional credits are charged.
Security best practices
Keep keys in your secret manager, never in source control or client-side code. Rotate on a schedule and immediately after anyone with access leaves.
Because keys are unlimited and individually revocable, prefer many narrow keys over one shared key: revoking a compromised key should never require a coordinated redeploy.
What you get once you sign up
Unlimited API keys with per-key telemetry, team invites, plan and billing, credit usage by day, site and key, plus daily spend limits and your own extraction model.
Start building with Irmu today
200 free credits every month, no card required. Every API, every integration, one key.