search

Find websites whose page source contains a code fragment

Results are websites ranked by popularity. Bulk is this endpoint with a large per_page (up to the plan's row limit, see /v1/account); the answer streams as it is produced. A plan covers the first max_per_page rows of a query: page * per_page may not exceed it.

get/v1/search

Request

  • Base URL: https://api.publicwww.com
  • URL: https://api.publicwww.com/v1/search
  • Auth: HTTP bearer

Query parameters

querystring required

The search, in the same syntax as the website search box: "exact phrase", several words for all of them, -word to exclude, site:de, depth:all. Several phrases: separate them with newlines. https://publicwww.com/docs/query-syntax/

pageinteger

Page number, from 1.

per_pageinteger

Rows per page, up to the plan's max_per_page (max_per_page_snippets with snippets) from /v1/account.

snippetsboolean

1 to include fragments of page source around the match (up to 5 per row). Costs one from the daily searches and one from the daily snippet limit: refused once either is used up.

format'json' | 'ndjson' | 'xml' | 'csv' | 'tsv' | 'txt'

json (default); ndjson - one object per line, metadata first; xml; csv - semicolon separated, no header, domain;rank by default; tsv - tab separated; txt - one url per line. Totals for csv, tsv and txt are in the X-Total-Results, X-Truncated and X-Index-Complete headers.

columnsstring

Comma separated subset and order of domain, url, rank, ranked, snippets (snippets needs snippets=1). Defaults: all fields for json, ndjson and xml; domain,rank for csv and tsv; url for txt.

delimiterstring

Field separator for csv and tsv. Default ; for csv and tab for tsv.

headerboolean

1 to put a header line on csv and tsv.

Response

Search results. The body follows format; the totals are also in the headers.

querystring required
pageinteger required
per_pageinteger required
totalinteger required

Websites matching the query in the index.

total_pagesinteger required
returnedinteger required

Rows in this answer.

truncatedboolean required

true when the plan cut this page short.

index_completeboolean required

false when part of the index did not answer in time; the results may be incomplete.

took_msinteger required
query_notestring

Present when the query could not be run as written, with the reason.

Changes

No recorded changes to this operation across all 1 revision of this API.