Grep File
POST/api/v1/retrieval/files/grep
Grep within a file’s parsed content using a regex pattern.
Grep File
curl https://api.cloud.llamaindex.ai/api/v1/retrieval/files/grep \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
-d '{
"file_id": "file_id",
"index_id": "idx-abc123",
"pattern": "revenue|profit"
}'{
"matches": [
{
"content": "content",
"end_char": 0,
"start_char": 0
}
]
}Returns Examples
{
"matches": [
{
"content": "content",
"end_char": 0,
"start_char": 0
}
]
}