Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Object Storage
  • Terraform reference
    • Authentication with the API
      • How to use the API
      • Signing requests
        • All services and methods
          • All methods
          • upload
          • get
          • patch
          • copy
          • getObjectMeta
          • delete
          • deleteMultipleObjects
          • options
          • selectObjectContent
          • putObjectRetention
          • putObjectLegalHold
          • getObjectRetention
          • getObjectLegalHold
          • putObjectTagging
          • getObjectTagging
          • deleteObjectTagging
        • Common request headers
        • Common response headers
        • Responses
  • Monitoring metrics
  • Audit Trails events
  • Bucket logs
  • Release notes
  • FAQ

In this article:

  • Request
  • Path parameters
  • Request parameters
  • Headers
  • Data schema
  • Response
  • Headers
  • Response codes
  • Data schema
  1. API reference
  2. REST (Amazon S3-compatible)
  3. REST
  4. Object
  5. selectObjectContent

selectObjectContent method

Written by
Yandex Cloud
Updated at March 19, 2025
  • Request
    • Path parameters
    • Request parameters
    • Headers
    • Data schema
  • Response
    • Headers
    • Response codes
    • Data schema

Filters and returns the contents of an Object Storage object using an S3 Select request.

Warning

To be able to make S3 Select requests, contact support. You must also have the s3:GetObject permission. For more information, see Bucket policy.

Features of objects you can query:

  • Objects in CSV, JSON, and Parquet formats are supported.

  • UTF-8 encoded objects are supported.

  • GZIP and BZIP2 compression methods are supported for CSV files. For Parquet files, columnar compression with GZIP, Snappy, and ZSTD is supported.

  • Objects can be protected by server-side encryption.

For objects that are encrypted with managed encryption keys stored in YC Key Management Service (SSE-KMS), server-side encryption is transparent. This means you do not need to specify anything else.

For more information on getting started with the API and the general request format, see How to use the S3 API.

RequestRequest

POST /{bucket}/{key}?select&select-type=2 HTTP/2

Path parametersPath parameters

Parameter Description
bucket Bucket name.
key Object key.

Request parametersRequest parameters

Parameter Description
select Required parameter that indicates the type of operation.
select-type Optional parameter that indicates the type of query.

HeadersHeaders

Use the appropriate common headers in your request.

Data schemaData schema

Request parameters are provided in XML format:

<SelectObjectContentRequest xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
   <Expression>string</Expression>
   <ExpressionType>string</ExpressionType>
   <RequestProgress>
      <Enabled>boolean</Enabled>
   </RequestProgress>
   <InputSerialization>
      <CompressionType>string</CompressionType>
      <CSV>
         <AllowQuotedRecordDelimiter>boolean</AllowQuotedRecordDelimiter>
         <Comments>string</Comments>
         <FieldDelimiter>string</FieldDelimiter>
         <FileHeaderInfo>string</FileHeaderInfo>
         <QuoteCharacter>string</QuoteCharacter>
         <QuoteEscapeCharacter>string</QuoteEscapeCharacter>
         <RecordDelimiter>string</RecordDelimiter>
      </CSV>
      <JSON>
         <Type>string</Type>
      </JSON>
      <Parquet>
      </Parquet>
   </InputSerialization>
   <OutputSerialization>
      <CSV>
         <FieldDelimiter>string</FieldDelimiter>
         <QuoteCharacter>string</QuoteCharacter>
         <QuoteEscapeCharacter>string</QuoteEscapeCharacter>
         <QuoteFields>string</QuoteFields>
         <RecordDelimiter>string</RecordDelimiter>
      </CSV>
      <JSON>
         <RecordDelimiter>string</RecordDelimiter>
      </JSON>
   </OutputSerialization>
   <ScanRange>
      <End>long</End>
      <Start>long</Start>
   </ScanRange>
</SelectObjectContentRequest>
Tag Description
SelectObjectContentRequest Root-level tag used for providing request parameters.

This tag is required.

Path: /SelectObjectContentRequest.
Expression SQL expression used to query object data.

Data type: String.

This tag is required.

Path: /SelectObjectContentRequest/Expression.
ExpressionType Expression type used for the request.

Data type: String.

The acceptable value is SQL.

This tag is required.

Path: /SelectObjectContentRequest/ExpressionType.
InputSerialization Description of data format in the queried object.

Data type: InputSerialization.

This tag is required.

Path: /SelectObjectContentRequest/InputSerialization.
OutputSerialization Description of the returned data format.

Data type: OutputSerialization.

This tag is required.

Path: /SelectObjectContentRequest/OutputSerialization.
RequestProgress Tag that indicates whether regular notifications on the request progress are enabled.

Data type: RequestProgress.

This tag is optional.

Path: /SelectObjectContentRequest/RequestProgress.
ScanRange Tag that specifies the byte range of the object to get the records from. A record is processed when its first byte is within the range. It is used only for objects in CSV format.

Data type: ScanRange.

This tag is optional.

Path: /SelectObjectContentRequest/ScanRange.

ResponseResponse

HeadersHeaders

Responses can only contain common headers.

Response codesResponse codes

For a list of possible responses, see Responses.

A successful response contains additional data in XML format with the schema described below.

Data schemaData schema

<Payload>
   <Records>
      <Payload>blob</Payload>
   </Records>
   <Stats>
      <Details>
         <BytesProcessed>long</BytesProcessed>
         <BytesReturned>long</BytesReturned>
         <BytesScanned>long</BytesScanned>
      </Details>
   </Stats>
   <Progress>
      <Details>
         <BytesProcessed>long</BytesProcessed>
         <BytesReturned>long</BytesReturned>
         <BytesScanned>long</BytesScanned>
      </Details>
   </Progress>
   <Cont>
   </Cont>
   <End>
   </End>
</Payload>
Tag Description
Payload Root-level tag used for providing response parameters.

Path: /Payload.
Cont Message indicating that the request is being processed.

Path: /Payload/Cont.
End Message indicating that the request has been processed.

Path: /Payload/End.
Progress Information about the request progress.

Path: /Payload/Progress.
Records Request result.
Path: /Payload/Records.
Stats Statistics on the processed data, which is sent once at the end of the request.
Path: /Payload/Stats.

See alsoSee also

  • Debugging requests using the AWS CLI
  • Example of sending a signed request using curl
  • Code example for generating a signature

Was the article helpful?

Previous
options
Next
putObjectRetention
© 2025 Direct Cursus Technology L.L.C.