{"openapi":"3.1.0","info":{"title":"apexlinks public API","version":"1.0.0","description":"search for local services, handmade goods, and people who can help — then message them directly. free to list what you sell or offer.\n\nRead-only and public: no API key, no OAuth, no scopes. Browsing needs nothing; listing a product or service and sending a message need a signed-in human account in a browser, which this API does not offer. See https://apexlinks.org/auth.md.","contact":{"name":"apexlinks","email":"hi@x2.studio","url":"https://apexlinks.org/contact"},"license":{"name":"Site terms","url":"https://apexlinks.org/terms"}},"servers":[{"url":"https://apexlinks.org"}],"security":[],"tags":[{"name":"search","description":"find products, services and people"}],"x-permission-model":{"scopes":[],"note":"No OAuth scopes and no credentials exist. Every endpoint is public and read-only; account actions are browser-only and for the human."},"x-versioning":{"strategy":"header","header":"x-api-version","current":"1.0.0","deprecation":"Deprecation and Sunset headers are announced at least 90 days ahead."},"x-rate-limit":{"limit":10,"window":"60s","headers":["RateLimit-Policy","RateLimit-Limit","RateLimit-Remaining","RateLimit-Reset","Retry-After"]},"paths":{"/ask":{"get":{"tags":["search"],"operationId":"ask","summary":"natural-language search","description":"Ask for what you need in plain words and get matching products, services and people back as JSON. No account or key. The same ranking the site search box uses.","parameters":[{"name":"q","in":"query","required":true,"description":"what you are looking for","schema":{"type":"string","maxLength":120}},{"name":"limit","in":"query","required":false,"description":"how many results to return, 1-100 (default 50)","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","required":false,"description":"skip this many results (default 0)","schema":{"type":"integer","minimum":0,"default":0}},{"name":"cursor","in":"query","required":false,"description":"an opaque cursor from next_cursor: pass it back to continue the list (it wins over offset)","schema":{"type":"string"}},{"name":"prefer.streaming","in":"query","required":false,"description":"send NLWeb server-sent events (start, result, complete) instead of one JSON document","schema":{"type":"boolean","default":false}},{"name":"x-api-version","in":"header","required":false,"description":"Pin the API version. The current and only version is 1; an unknown value answers 400.","schema":{"type":"string","enum":["1"],"default":"1"}}],"responses":{"200":{"description":"matches, ranked by meaning","headers":{"RateLimit-Limit":{"schema":{"type":"string"}},"RateLimit-Policy":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}},"text/event-stream":{"schema":{"type":"string","description":"NLWeb SSE: start, result, complete events"}}}},"400":{"description":"unsupported x-api-version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"too many searches in a minute; Retry-After is set","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"search is temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"any other error; the body is Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["search"],"operationId":"ask_post","summary":"NLWeb POST search","description":"The NLWeb JSON shape: { \"query\": \"...\", \"limit\"?, \"offset\"?, \"prefer\": { \"streaming\": true } }. Same answer as GET, including server-sent events when streaming is preferred.","parameters":[{"name":"x-api-version","in":"header","required":false,"description":"Pin the API version. The current and only version is 1; an unknown value answers 400.","schema":{"type":"string","enum":["1"],"default":"1"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"optional client key, echoed back. The API is read-only, so a retry is already idempotent.","schema":{"type":"string","maxLength":255}},{"name":"Prefer","in":"header","required":false,"description":"respond-async asks for a 202 with a Location to poll instead of the answer now (RFC 7240).","schema":{"type":"string","example":"respond-async"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","maxLength":120},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50},"offset":{"type":"integer","minimum":0,"default":0},"prefer":{"type":"object","properties":{"streaming":{"type":"boolean","default":false}}}},"required":["query"]}}}},"responses":{"200":{"description":"matches, ranked by meaning","headers":{"RateLimit-Limit":{"schema":{"type":"string"}},"RateLimit-Policy":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}},"text/event-stream":{"schema":{"type":"string","description":"NLWeb SSE: start, result, complete events"}}}},"202":{"description":"accepted: poll the Location, which answers with the result","headers":{"Location":{"schema":{"type":"string","format":"uri"}},"Retry-After":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"unsupported x-api-version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"too many searches in a minute; Retry-After is set","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"search is temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"any other error; the body is Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/discover":{"get":{"tags":["search"],"operationId":"discover","summary":"search or browse listings","description":"JSON search over listings and people. With no q it returns what is new. Same data as /ask, plus the raw listing fields.","parameters":[{"name":"q","in":"query","required":false,"description":"what you are looking for; empty returns the newest listings","schema":{"type":"string","maxLength":120}},{"name":"x-api-version","in":"header","required":false,"description":"Pin the API version. The current and only version is 1; an unknown value answers 400.","schema":{"type":"string","enum":["1"],"default":"1"}}],"responses":{"200":{"description":"listings and people","headers":{"RateLimit-Limit":{"schema":{"type":"string"}},"RateLimit-Policy":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discover"}}}},"400":{"description":"unsupported x-api-version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"too many searches in a minute; Retry-After is set","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"search is temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"any other error; the body is Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ask/jobs/{id}":{"get":{"tags":["search"],"operationId":"ask_job","summary":"poll an async search","description":"The result of a /ask submitted with Prefer: respond-async. The job is stateless.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"the job id from the 202 answer"}],"responses":{"200":{"description":"the answer, same shape as /ask","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"404":{"description":"no such job","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ask":{"get":{"tags":["search"],"operationId":"ask_v1","summary":"natural-language search","description":"Ask for what you need in plain words and get matching products, services and people back as JSON. No account or key. The same ranking the site search box uses.","parameters":[{"name":"q","in":"query","required":true,"description":"what you are looking for","schema":{"type":"string","maxLength":120}},{"name":"limit","in":"query","required":false,"description":"how many results to return, 1-100 (default 50)","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","required":false,"description":"skip this many results (default 0)","schema":{"type":"integer","minimum":0,"default":0}},{"name":"cursor","in":"query","required":false,"description":"an opaque cursor from next_cursor: pass it back to continue the list (it wins over offset)","schema":{"type":"string"}},{"name":"prefer.streaming","in":"query","required":false,"description":"send NLWeb server-sent events (start, result, complete) instead of one JSON document","schema":{"type":"boolean","default":false}},{"name":"x-api-version","in":"header","required":false,"description":"Pin the API version. The current and only version is 1; an unknown value answers 400.","schema":{"type":"string","enum":["1"],"default":"1"}}],"responses":{"200":{"description":"matches, ranked by meaning","headers":{"RateLimit-Limit":{"schema":{"type":"string"}},"RateLimit-Policy":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}},"text/event-stream":{"schema":{"type":"string","description":"NLWeb SSE: start, result, complete events"}}}},"400":{"description":"unsupported x-api-version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"too many searches in a minute; Retry-After is set","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"search is temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"any other error; the body is Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["search"],"operationId":"ask_post_v1","summary":"NLWeb POST search","description":"The NLWeb JSON shape: { \"query\": \"...\", \"limit\"?, \"offset\"?, \"prefer\": { \"streaming\": true } }. Same answer as GET, including server-sent events when streaming is preferred.","parameters":[{"name":"x-api-version","in":"header","required":false,"description":"Pin the API version. The current and only version is 1; an unknown value answers 400.","schema":{"type":"string","enum":["1"],"default":"1"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"optional client key, echoed back. The API is read-only, so a retry is already idempotent.","schema":{"type":"string","maxLength":255}},{"name":"Prefer","in":"header","required":false,"description":"respond-async asks for a 202 with a Location to poll instead of the answer now (RFC 7240).","schema":{"type":"string","example":"respond-async"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","maxLength":120},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50},"offset":{"type":"integer","minimum":0,"default":0},"prefer":{"type":"object","properties":{"streaming":{"type":"boolean","default":false}}}},"required":["query"]}}}},"responses":{"200":{"description":"matches, ranked by meaning","headers":{"RateLimit-Limit":{"schema":{"type":"string"}},"RateLimit-Policy":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}},"text/event-stream":{"schema":{"type":"string","description":"NLWeb SSE: start, result, complete events"}}}},"202":{"description":"accepted: poll the Location, which answers with the result","headers":{"Location":{"schema":{"type":"string","format":"uri"}},"Retry-After":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"unsupported x-api-version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"too many searches in a minute; Retry-After is set","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"search is temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"any other error; the body is Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api/discover":{"get":{"tags":["search"],"operationId":"discover_v1","summary":"search or browse listings","description":"JSON search over listings and people. With no q it returns what is new. Same data as /ask, plus the raw listing fields.","parameters":[{"name":"q","in":"query","required":false,"description":"what you are looking for; empty returns the newest listings","schema":{"type":"string","maxLength":120}},{"name":"x-api-version","in":"header","required":false,"description":"Pin the API version. The current and only version is 1; an unknown value answers 400.","schema":{"type":"string","enum":["1"],"default":"1"}}],"responses":{"200":{"description":"listings and people","headers":{"RateLimit-Limit":{"schema":{"type":"string"}},"RateLimit-Policy":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discover"}}}},"400":{"description":"unsupported x-api-version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"too many searches in a minute; Retry-After is set","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"search is temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"any other error; the body is Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Result":{"type":"object","description":"one listing or person","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri","description":"the page to read or share"},"kind":{"type":"string","enum":["product","service","person"]},"description":{"type":"string"},"price":{"type":"string","description":"display price, or \"ask price\""},"place":{"type":"string"},"handle":{"type":"string","description":"the owner, messageable at /@{handle}"},"score":{"type":"number","description":"closeness to the query, 0 to 1"}}},"Answer":{"type":"object","properties":{"query":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Result"}},"total":{"type":"integer","description":"matches before limit/offset"},"limit":{"type":"integer"},"offset":{"type":"integer"},"next":{"type":["string","null"],"format":"uri","description":"the next page, or null at the end"},"next_cursor":{"type":["string","null"],"description":"opaque token for the next page, or null at the end"},"more":{"type":"string","format":"uri","description":"the human search page"}}},"Job":{"type":"object","properties":{"_meta":{"type":"object","properties":{"response_type":{"type":"string","enum":["promise"]}}},"job":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","complete","failed"]},"url":{"type":"string","format":"uri"}}}}},"Discover":{"type":"object","description":"the raw search answer the site itself uses","properties":{"listings":{"type":"array","items":{"type":"object","additionalProperties":true}},"people":{"type":"array","items":{"type":"object","additionalProperties":true}},"busy":{"type":"boolean","description":"the embedder was unavailable, so these are the latest, not the closest"}}},"Error":{"type":"object","description":"the error body, RFC 9457 style","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string","description":"machine-readable code, e.g. slow_down"},"message":{"type":"string","description":"human-readable explanation"},"error":{"type":"string","description":"alias of code, kept for the first version: e.g. unsupported_api_version"},"hint":{"type":"string","description":"what to do about it"},"instance":{"type":"string"}},"required":["status"],"anyOf":[{"required":["error"]},{"required":["code"]}]}}}}