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
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Query
  • Access management
  • Pricing policy
    • SDK
      • Overview
      • Authentication
        • All methods
        • create-query
        • get-query
        • get-query-status
        • stop-query
        • get-query-results
      • YQL and JSON type mapping
    • Apache Airflow™
  • Integration
  • Audit Trails events
  • FAQ

In this article:

  • Request
  • Response
  • Example
  1. Reference
  2. HTTP API
  3. Methods
  4. get-query-results

get-query-results

Written by
Yandex Cloud
Updated at October 28, 2024
  • Request
  • Response
  • Example

The method returns query results. If a query contains multiple SELECT statements, there will be multiple query results. In this case, you need to get the results by their index.

When using the HTTP API, authenticate and specify the required headers. You can also specify optional headers for setting up request execution. The HTTP API may return errors while running.

RequestRequest

GET request to /queries/{query_id}/results/{<query_result_number_starting_from_0>}?project={folder_id}, where {folder_id} is a folder ID and {query_id} is the query ID.

Parameters are provided in URLs as query parameters.

Parameter Description Default value Limitations
offset Number of the result array string to get query results from 0 Cannot be negative
limit Number of result rows 100 The value must be from 1 to 1,000.

ResponseResponse

If successful, an HTTP response with code 200 and query execution results is returned.

{
  "columns": [
    {
      "name": "column0",
      "type": "Int32"
    },
    {
      "name": "column1",
      "type": "Int32"
    }    
  ],
  "rows": [
    [
      "1",
      "2"
    ],
    [
      "3",
      "4"
    ]    
  ]
}
Field Description
columns Array of returned value columns
columns[].name Column name
columns[].type Column data type
rows Array of result rows with the returned value. The number of array elements in each row is the same as the number of columns from the columns parameter.

The rules for converting YQL data types to JSON-compatible data types are described in the Correspondence of YQL and JSON types section.

ExampleExample

Request:

curl \
  --request 'GET' \
  'https://api.yandex-query.cloud.yandex.net/api/fq/v1/queries/cseugn35bc3r********/results/0?project=b1gaue5b382m********&offset=0&limit=100' \
  --header 'accept: application/json'

Response:

{
  "columns": [
    {
      "name": "column0",
      "type": "Int32"
    },
    {
      "name": "column1",
      "type": "Int32"
    }    
  ],
  "rows": [
    [
      "1",
      "2"
    ],
    [
      "3",
      "4"
    ]
  ]
}

Was the article helpful?

Previous
stop-query
Next
YQL and JSON type mapping
Yandex project
© 2025 Yandex.Cloud LLC