{"openapi":"3.1.0","info":{"title":"SitesUsing API","version":"1.0.0","description":"Find websites by the technology they use. Searching, previews and stored site lookups are free with a key. Exports and enrichment cost 1 credit per site. Every paid operation can be priced first with a dry run, and accepts an Idempotency-Key header so a retry is never charged twice."},"servers":[{"url":"https://sitesusing.com/api/v1"}],"security":[{"apiKey":[]}],"paths":{"/technologies":{"get":{"operationId":"listTechnologies","summary":"Find technology slugs by name","description":"No key needed. Use the returned `slug` values in searches and exports. Without `q`, returns the most common technologies.","security":[],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Part of a technology name, at least 2 characters.","example":"shop"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"Matching technologies, most common first.","content":{"application/json":{"schema":{"type":"object","properties":{"technologies":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"sites_found":{"type":"integer"},"url":{"type":"string"}}}}}}}}},"429":{"description":"Too many requests. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search":{"get":{"operationId":"previewSearch","summary":"Count matching sites and preview the top 25","description":"Free. Returns how many sites use every technology in `use` and none in `not`, plus the 25 most popular.","parameters":[{"name":"use","in":"query","required":true,"schema":{"type":"string"},"description":"Comma-separated slugs a site must use.","example":"shopify,klaviyo"},{"name":"not","in":"query","schema":{"type":"string"},"description":"Comma-separated slugs a site must not use.","example":"gorgias"}],"responses":{"200":{"description":"The count and the preview.","content":{"application/json":{"schema":{"type":"object","properties":{"total_sites":{"type":"integer"},"preview_limit":{"type":"integer"},"sites":{"type":"array","items":{"$ref":"#/components/schemas/SiteRow"}},"full_list":{"type":["string","null"],"description":"How to get the rest, when there is more than the preview."}}}}}},"400":{"description":"The request was malformed. `message` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{domain}":{"get":{"operationId":"lookupSite","summary":"Get a site's stored technology stack","description":"Free. Returns the stored result with the evidence for each detection. A site that has never been checked returns 404; send it to `/enrich` to have it checked.","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"},"example":"example.com"}],"responses":{"200":{"description":"The site and its technologies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteStack"}}}},"400":{"description":"The request was malformed. `message` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No stored result for this site yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/enrich":{"post":{"operationId":"enrichDomains","summary":"Check up to 25 domains now","description":"1 credit per domain that comes back with a result. Domains with a result from the last 30 days are answered from storage; the rest are checked while you wait, which can take up to a minute. Unreadable domains are not charged.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domains"],"properties":{"domains":{"type":"array","maxItems":25,"items":{"type":"string"},"example":["example.com","example.org"]}}}}}},"responses":{"200":{"description":"One result per input, in order.","content":{"application/json":{"schema":{"type":"object","properties":{"credits_charged":{"type":"integer"},"credits_balance":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"input":{"type":"string"},"status":{"type":"string","enum":["ok","unreadable","not_a_website"]},"reason":{"type":"string","description":"Why the site was unreadable, when it was."}}}}}}}}},"400":{"description":"The request was malformed. `message` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits. The body gives `credits_required`, `credits_balance` and a `buy_url` for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key's own spending cap would be exceeded. The body gives a `keys_url` for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A request with the same Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/exports":{"post":{"operationId":"createExport","summary":"Export the full list for a search","description":"1 credit per site. Send `dry_run: true` first to get the price and whether the key can afford it, without spending anything. The export is fixed at creation and can be fetched again for free.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["use"],"properties":{"use":{"type":"array","items":{"type":"string"},"description":"Slugs a site must use.","example":["shopify","klaviyo"]},"not":{"type":"array","items":{"type":"string"},"description":"Slugs a site must not use.","example":["shopify","klaviyo"]},"limit":{"type":"integer","minimum":1,"description":"Export only the most popular N sites. Defaults to all matches, up to 25,000."},"dry_run":{"type":"boolean","default":false,"description":"Price the export without creating it."}}}}}},"responses":{"200":{"description":"The export, or its price when `dry_run` is true.","content":{"application/json":{"schema":{"type":"object","properties":{"export_id":{"type":"string","format":"uuid"},"credits_charged":{"type":"integer"},"credits_balance":{"type":"integer"},"sites":{"type":"array","items":{"$ref":"#/components/schemas/SiteRow"}},"csv_url":{"type":"string"},"dry_run":{"type":"boolean"},"credits_required":{"type":"integer"},"can_afford":{"type":"boolean"}}}}}},"400":{"description":"The request was malformed. `message` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits. The body gives `credits_required`, `credits_balance` and a `buy_url` for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key's own spending cap would be exceeded. The body gives a `keys_url` for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A request with the same Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/exports/{id}":{"get":{"operationId":"getExport","summary":"Fetch an export again","description":"Free. Add `format=csv` for a CSV file.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"format","in":"query","schema":{"type":"string","enum":["json","csv"],"default":"json"}}],"responses":{"200":{"description":"The export.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"The request was malformed. `message` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such export in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/credits":{"get":{"operationId":"getCredits","summary":"See the balance and what this key may still spend","responses":{"200":{"description":"Balance, this key's cap, and where a person can buy more.","content":{"application/json":{"schema":{"type":"object","properties":{"credits_balance":{"type":"integer"},"key_spend_limit":{"type":["integer","null"]},"key_credits_spent":{"type":"integer"},"spendable_credits":{"type":"integer"},"buy_url":{"type":"string"}}}}}},"400":{"description":"The request was malformed. `message` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from https://sitesusing.com/app/api-keys, sent as `Authorization: Bearer su_...`."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":200},"description":"Any unique string. A repeat of the request with the same key returns the first answer and is not charged again."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_request","unauthorized","payment_required","spend_limit_reached","not_found","conflict","rate_limited","internal_error"]},"message":{"type":"string"},"credits_required":{"type":"integer"},"credits_balance":{"type":"integer"},"buy_url":{"type":"string"},"docs_url":{"type":"string"}}}}},"SiteRow":{"type":"object","properties":{"domain":{"type":"string","example":"example.com"},"title":{"type":["string","null"]},"url":{"type":["string","null"],"description":"Where the homepage ended up after redirects."},"popularity_rank":{"type":["integer","null"],"description":"Lower is more popular. Null when unknown."},"checked_at":{"type":["string","null"],"format":"date","description":"The date this site was last checked."},"technologies":{"type":"array","items":{"type":"string"},"description":"Technology names."}}},"SiteStack":{"type":"object","properties":{"domain":{"type":"string","example":"example.com"},"title":{"type":["string","null"]},"url":{"type":["string","null"],"description":"Where the homepage ended up after redirects."},"popularity_rank":{"type":["integer","null"],"description":"Lower is more popular. Null when unknown."},"checked_at":{"type":["string","null"],"format":"date","description":"The date this site was last checked."},"technologies":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"version":{"type":["string","null"]},"confidence":{"type":"integer","description":"50 to 100."},"evidence":{"type":"array","items":{"type":"string"},"description":"Where it was found, e.g. script URL, header, DNS record."},"first_seen_at":{"type":["string","null"],"format":"date"}}}}}}}}}