Sign in

Search within a site

documented

Search within a site using an Elasticsearch Query API.

POST /sites/{site}/searchSitesno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

npx -y keychains@latest curl "https://public-api.wordpress.com/rest/v1.2/sites/{{$site}}/search" \
  -X POST \
  -H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "Accept: application/json" \
  --data-urlencode 'size={{$size}}' \
  --data-urlencode 'from={{$from}}' \
  --data-urlencode 'query={"multi_match":{"query":"{{$query}}","fields":["title.en","content.en"]}}' \
  --data-urlencode 'fields=post_id' \
  --data-urlencode 'sort=["_score",{"date":"desc"}]'
Search within a site · WordPress.com · OpenIntegrations