{"openapi":"3.1.0","info":{"title":"ScrapeMole Wiki: Wikipedia summaries, Wikipedia search and Wikidata facts for AI agents (attributed)","version":"1.0.0","description":"Pay-per-call encyclopedic knowledge for agents: Wikipedia article summaries and full-text search in any language edition, and structured Wikidata facts (organizations, places, products, concepts) with labels resolved. Every response carries the license and credit (Wikipedia CC BY-SA 4.0, Wikidata CC0). Non-personal data only: articles and entities about individual people are refused and not charged. USDC via x402, no accounts.\n\nPayments: x402 v2, scheme \"exact\", USDC on Base (eip155:8453). The payment is verified before the work and settled only when the response is 200. Terms: https://wiki.scrapemole.workers.dev/terms","contact":{"email":"edgaras@mail.grokbot.com","url":"https://scrapemole.pages.dev"},"x-guidance":"Call any /v1 endpoint without payment to receive a 402 with the exact price, then retry with an x402 client (e.g. @x402/fetch). 4xx/5xx responses are never charged."},"servers":[{"url":"https://wiki.scrapemole.workers.dev"}],"components":{"securitySchemes":{"x402":{"type":"http","scheme":"x402","description":"HTTP 402 payment with USDC via the x402 protocol."}}},"paths":{"/v1/summary":{"get":{"operationId":"summary","summary":"Lead summary of a Wikipedia article in any language: title, short description, plain-text extract, thumbnail, Wikidata ID, last edit time, with CC BY-SA attribution.","description":"Use when you need a short, sourced explanation of a topic, place, organization, product or concept: returns the Wikipedia article's lead section as plain text plus title, short description, thumbnail and original image, page URL, Wikidata ID and last-modified time, in any Wikipedia language (redirects followed). Every response carries the CC BY-SA 4.0 license, credit line and source link required for reuse. Articles about individual people are not served (non-personal data only).","tags":["wikipedia","knowledge","summaries","encyclopedia","rag","facts"],"parameters":[{"name":"title","in":"query","required":true,"description":"Article title (e.g. \"Cloudflare\", \"Vilnius\") or a Wikipedia article URL.","schema":{"type":"string","examples":["Cloudflare"]}},{"name":"lang","in":"query","required":false,"description":"Wikipedia language code (en, de, fr, lt, ja…).","schema":{"type":"string","default":"en"}}],"security":[{"x402":[]}],"x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.001","currency":"USD","network":"eip155:8453","networks":["eip155:8453"],"asset":"USDC"},"responses":{"200":{"description":"Result (the payment settles only for this status).","content":{"application/json":{"example":{"title":"Cloudflare","description":"American technology company","extract":"Cloudflare, Inc. is an American company that provides content delivery network services, cybersecurity, DDoS mitigation…","url":"https://en.wikipedia.org/wiki/Cloudflare","wikidataId":"Q4778915","lang":"en","lastModified":"2026-10-05T12:00:00Z","thumbnail":"https://upload.wikimedia.org/…/330px-….jpg","attribution":{"license":"CC BY-SA 4.0","licenseUrl":"https://creativecommons.org/licenses/by-sa/4.0/","credit":"Wikipedia contributors, \"Cloudflare\", en.wikipedia.org","source":"https://en.wikipedia.org/wiki/Cloudflare"}}}}},"400":{"description":"Invalid input. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"402":{"description":"Payment required (x402). The PAYMENT-REQUIRED header (mirrored in the body) carries price, network and payTo."},"404":{"description":"Not found / no data. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"502":{"description":"Upstream error. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"504":{"description":"Upstream timeout. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}}}}},"/v1/search":{"get":{"operationId":"search","summary":"Full-text search of Wikipedia in any language: matching article titles with text snippets, word count and last edit, best match first.","description":"Use to find the right Wikipedia article before reading it: full-text search over one Wikipedia language edition, returning up to 20 results with title, plain-text snippet, page URL, word count and last edit time, ranked by relevance. Results are titles and snippets only; use /v1/summary for content.","tags":["wikipedia","search","knowledge","encyclopedia"],"parameters":[{"name":"q","in":"query","required":true,"description":"Search text.","schema":{"type":"string","examples":["content delivery network"]}},{"name":"lang","in":"query","required":false,"description":"Wikipedia language code.","schema":{"type":"string","default":"en"}},{"name":"limit","in":"query","required":false,"description":"Max results (1-20).","schema":{"type":"string","default":"10"}}],"security":[{"x402":[]}],"x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.001","currency":"USD","network":"eip155:8453","networks":["eip155:8453"],"asset":"USDC"},"responses":{"200":{"description":"Result (the payment settles only for this status).","content":{"application/json":{"example":{"query":"content delivery network","lang":"en","count":1,"totalHits":1840,"results":[{"title":"Content delivery network","snippet":"A content delivery network (CDN) is a geographically distributed network of proxy servers…","url":"https://en.wikipedia.org/wiki/Content_delivery_network","wordCount":3410,"lastEdited":"2026-09-30T10:11:12Z"}],"attribution":{"license":"CC BY-SA 4.0","credit":"Wikipedia contributors"}}}}},"400":{"description":"Invalid input. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"402":{"description":"Payment required (x402). The PAYMENT-REQUIRED header (mirrored in the body) carries price, network and payTo."},"404":{"description":"Not found / no data. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"502":{"description":"Upstream error. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"504":{"description":"Upstream timeout. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}}}}},"/v1/entity":{"get":{"operationId":"entity","summary":"Structured facts about an organization, place, product or concept from Wikidata: type, country, HQ, inception, website, industry, employees, revenue, ticker, LEI, population, coordinates and more, labels resolved.","description":"Use when you need structured, machine-readable facts rather than prose: give a Wikidata ID (Q95) or a name (resolved to the best-matching item) and get its label, description, aliases, Wikipedia link and up to ~50 curated properties with human-readable labels: instance of, country, location, coordinates, inception/dissolution, official website, headquarters, industry, employees, revenue, stock exchange and ticker, LEI, parent and subsidiaries, population, area, capital, currency, languages, time zone, ISO codes, software license/version/repository, and more. Entities that are individual people are refused (non-personal data only).","tags":["wikidata","knowledge-graph","facts","entities","companies","places"],"parameters":[{"name":"id","in":"query","required":false,"description":"Wikidata item ID, e.g. Q95 (Google). Give id or q.","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Name to look up, e.g. \"Cloudflare\" or \"Vilnius\". Give id or q.","schema":{"type":"string","examples":["Cloudflare"]}},{"name":"lang","in":"query","required":false,"description":"Label language.","schema":{"type":"string","default":"en"}}],"security":[{"x402":[]}],"x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.002","currency":"USD","network":"eip155:8453","networks":["eip155:8453"],"asset":"USDC"},"responses":{"200":{"description":"Result (the payment settles only for this status).","content":{"application/json":{"example":{"id":"Q4778915","label":"Cloudflare","description":"American technology company","wikipedia":"https://en.wikipedia.org/wiki/Cloudflare","facts":{"instanceOf":[{"id":"Q4830453","label":"business"},{"id":"Q72588","label":"content delivery network"}],"country":{"id":"Q30","label":"United States"},"inception":"2009-07-01","officialWebsite":"https://www.cloudflare.com/","headquarters":{"id":"Q62","label":"San Francisco"},"stockExchange":{"id":"Q13677","label":"New York Stock Exchange"},"ticker":"NET"},"url":"https://www.wikidata.org/wiki/Q4778915","attribution":{"license":"CC0 1.0 (Wikidata)","credit":"Wikidata contributors"}}}}},"400":{"description":"Invalid input. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"402":{"description":"Payment required (x402). The PAYMENT-REQUIRED header (mirrored in the body) carries price, network and payTo."},"404":{"description":"Not found / no data. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"502":{"description":"Upstream error. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}},"504":{"description":"Upstream timeout. Not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"charged":{"type":"boolean","const":false}}}}}}}}}}}}}