Skip to Content
CompanySpec
API referenceDiscovery

Search page summaries

POST
/pages/search

Search inside the summaries of company web pages, optionally limited to some page types and to companies that match filters. Returns one result per company: its best-matching page. Sorted by match.score.

Costs 1 discovery per company returned that isn't already paid for this billing month.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Your API key, sent as Authorization: Bearer <key>. Create keys in the dashboard.

Request Body

application/json
  1. body
query*string

What to look for in page summaries, in plain language. For example 14-day free trial, no credit card required.

Lengthlength <= 500
page_types?array<>

Only search these page types. Default: all.

company?

Only search pages of companies that match these filters.

limit?integer

Companies per page.

Range1 <= value <= 100
Default25
cursor?string

The next_cursor from the previous page.

min_score?number

Minimum match.score (how well the page matches query).

Range0 <= value <= 1

Response Body

Matching pages.

application/json
  1. response
results*array<>
next_cursor*|

Pass as cursor to get the next page. null when there are no more results.

usage*

What this request cost and what is left this billing month.

Example Request
curl -X POST 'https://api.companyspec.com/v1/pages/search' \  -H 'Content-Type: application/json' \  -d '{  "query": "14-day free trial, no credit card required",  "page_types": [    "pricing"  ],  "company": {    "countries": [      "GB"    ]  },  "limit": 20}'
Example Response
{  "results": [    {      "company": {        "id": "cmp_7tw3e",        "domain": "ledgerly.co.uk",        "name": "Ledgerly",        "logo_url": null      },      "page": {        "page_type": "pricing",        "url": "https://ledgerly.co.uk/pricing",        "summary": "Three plans from £12 to £49 per month. All plans start with a 14-day free trial; no card required."      },      "match": {        "score": 0.91      }    }  ],  "next_cursor": null,  "usage": {    "charged": {      "lookups": 0,      "discoveries": 1    },    "already_paid": 0,    "remaining": {      "lookups": 9750,      "discoveries": 1976    }  }}