{"openapi":"3.1.0","info":{"title":"AI Web Scraper - Extract Structured Data to JSON","description":"Turn any web page into JSON: give a URL and typed fields, get clean data, one object or every item of a list. Also page to Markdown.","version":"v1"},"servers":[{"url":"https://ai-web-scraper-extract-structured-data-to-json.p.rapidapi.com","description":"RapidAPI"}],"paths":{"/v1/scraper/extract":{"post":{"tags":["Extraction"],"summary":"Extract structured data from a web page with AI","description":"Extract the fields you name from a web page URL as clean JSON;\n`multiple=true` returns every repeated item (product lists, job boards).\n10 credits per page (20 above 10,000 characters of text), +5 per 5 items\nwith `multiple=true`. Pages that need JavaScript are refused, not billed.","operationId":"extractStructuredData","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequest"},"examples":{"Extract Structured Data":{"summary":"Extract Structured Data","value":{"url":"https://books.toscrape.com/","fields":[{"name":"title","type":"string"},{"description":"price in GBP","name":"price","type":"number"},{"name":"in_stock","type":"boolean"},{"description":"book page","name":"link","type":"url"}],"multiple":true,"max_items":10}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractResponse"},"examples":{"Extract Structured Data":{"summary":"Extract Structured Data (real response)","value":{"url":"https://books.toscrape.com/","final_url":"https://books.toscrape.com/","title":"All products | Books to Scrape - Sandbox","items":[{"title":"A Light in the Attic","price":51.77,"in_stock":true,"link":"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"},{"title":"Tipping the Velvet","price":53.74,"in_stock":true,"link":"https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html"}],"item_count":20,"page_truncated":false,"credits":30}}}}}},"400":{"description":"Invalid input, or the target could not be processed (see `error.code`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing proxy secret (call through RapidAPI with your key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Invalid proxy secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Daily limit of your plan reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The AI provider failed (`ai_error`) or capacity is temporarily exhausted (`capacity_exhausted`); retry. Not billed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-rapidapi-endpoint":"Extract Structured Data"}},"/v1/scraper/markdown":{"get":{"tags":["Markdown"],"summary":"Convert a web page to clean Markdown","description":"LLM-ready Markdown of a page: headings, lists, tables and absolute\nlinks, without navigation, scripts or footers; plus its JSON-LD. No AI.\n1 credit.","operationId":"convertPageToMarkdown","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","maxLength":2048,"description":"Web page to convert.","examples":["https://books.toscrape.com/"],"title":"Url"},"description":"Web page to convert."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkdownResponse"},"examples":{"Convert Page to Markdown":{"summary":"Convert Page to Markdown","value":{"url":"https://books.toscrape.com/","json_ld":[{}],"characters":5603,"truncated":false}}}}}},"400":{"description":"Invalid input, or the target could not be processed (see `error.code`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing proxy secret (call through RapidAPI with your key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Invalid proxy secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Daily limit of your plan reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-rapidapi-endpoint":"Convert Page to Markdown"}}},"components":{"schemas":{"ErrorBody":{"properties":{"status":{"type":"integer","title":"Status","examples":[400]},"code":{"type":"string","title":"Code","examples":["invalid_url"]},"message":{"type":"string","title":"Message","examples":["A website URL is required."]}},"type":"object","required":["status","code","message"],"title":"ErrorBody"},"ErrorEnvelope":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"type":"object","required":["error"],"title":"ErrorEnvelope"},"ExtractRequest":{"properties":{"url":{"type":"string","maxLength":2048,"title":"Url","examples":["https://books.toscrape.com/"]},"fields":{"items":{"$ref":"#/components/schemas/FieldSpec"},"type":"array","maxItems":30,"minItems":1,"title":"Fields","examples":[[{"name":"title","type":"string"},{"description":"price in GBP","name":"price","type":"number"},{"name":"in_stock","type":"boolean"},{"description":"book page","name":"link","type":"url"}]]},"multiple":{"type":"boolean","title":"Multiple","description":"false: one object for the page's main entity; true: every repeated item (products, jobs, articles...) in `items`.","default":false,"examples":[true]},"max_items":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Max Items","description":"With multiple=true.","default":25,"examples":[10]}},"type":"object","required":["url","fields"],"title":"ExtractRequest"},"ExtractResponse":{"properties":{"url":{"type":"string","title":"Url","examples":["https://books.toscrape.com/"]},"final_url":{"type":"string","title":"Final Url","examples":["https://books.toscrape.com/index.html"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","examples":["All products | Books to Scrape"]},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data","description":"multiple=false: the fields, null when not on the page."},"items":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Items","description":"multiple=true: one object per item, in page order.","examples":[[{"in_stock":true,"link":"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html","price":51.77,"title":"A Light in the Attic"}]]},"item_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Item Count","examples":[20]},"page_truncated":{"type":"boolean","title":"Page Truncated","description":"The page was too long and only its beginning was read.","default":false},"credits":{"type":"integer","title":"Credits","examples":[30]}},"type":"object","required":["url","final_url","credits"],"title":"ExtractResponse"},"FieldSpec":{"properties":{"name":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,39}$","title":"Name","description":"Output key: letters, digits and underscores, 40 max.","examples":["price"]},"type":{"type":"string","enum":["string","number","integer","boolean","url","date","list"],"title":"Type","description":"string, number, integer, boolean, url (absolute link), date (YYYY-MM-DD) or list (of short strings).","default":"string"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description","description":"What to look for, e.g. 'price in GBP, without the symbol'."}},"type":"object","required":["name"],"title":"FieldSpec"},"MarkdownResponse":{"properties":{"url":{"type":"string","title":"Url","examples":["https://books.toscrape.com/"]},"final_url":{"type":"string","title":"Final Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"markdown":{"type":"string","title":"Markdown","description":"Headings, paragraphs, lists, tables and absolute links; navigation, scripts and footers removed."},"json_ld":{"items":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}]},"type":"array","title":"Json Ld","description":"The page's schema.org JSON-LD blocks."},"characters":{"type":"integer","title":"Characters","examples":[5603]},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["url","final_url","markdown","characters"],"title":"MarkdownResponse"}},"securitySchemes":{"RapidAPIKey":{"type":"apiKey","in":"header","name":"X-RapidAPI-Key"},"RapidAPIHost":{"type":"apiKey","in":"header","name":"X-RapidAPI-Host"}}},"tags":[{"name":"Extraction","description":"Your fields, extracted from any page and checked against it."},{"name":"Markdown","description":"Any page as clean Markdown, no AI."}],"security":[{"RapidAPIKey":[],"RapidAPIHost":[]}]}