POST
/
api
/
v1
/
documents
/
pages
/
search
Search Document Pages
curl --request POST \
  --url https://api.fieldwise.ai/api/v1/documents/pages/search \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "metadata_filter": {
    "$and": [
      {
        "year": "2023"
      },
      {
        "category": {
          "$in": [
            "finance",
            "earnings"
          ]
        }
      }
    ]
  },
  "optimize_metadata": true,
  "optimize_query": true,
  "query": "Find information about revenue growth",
  "top_k": 5
}'
{
  "success": true,
  "data": {
    "pages": [
      {
        "document_id": 123,
        "page_number": 123,
        "content": "<string>",
        "score": 123,
        "document_metadata": {}
      }
    ],
    "optimized_query": "<string>",
    "optimized_metadata": {}
  },
  "error": {
    "error_code": "RESOURCE_NOT_FOUND",
    "message": "Resource not found"
  },
  "meta": {
    "timestamp": "2023-11-07T05:31:56Z",
    "version": "1.0"
  }
}

Authorizations

X-API-Key
string
header
required

Headers

X-API-Key
string | null

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.