---
title: "Retrieve results in the same HTTP response"
method: POST
path: "/v1/queries/realtime"
tags: ["Data Queries"]
---

# Retrieve results in the same HTTP response

`POST /v1/queries/realtime`

## Request

- Base URL: `https://data.flashdata.dev`
- URL: `https://data.flashdata.dev/v1/queries/realtime`
- Auth: API key in header `X-API-Key`

## Request body

- union
  - QueryGoogleSearch: Google Search. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'google_search', required
    - `query` string, required
    - `params` object
      - `gl` string: Country code. Set explicitly when needed; omitted values use the search provider’s behavior.
      - `hl` string: Interface language. Set explicitly when needed; omitted values use the search provider’s behavior.
      - `location` string
      - `num` integer: Requested result count. Actual count varies by query and search type; no fixed value is added when omitted.
      - `page` integer: Requested page. Set explicitly for pagination; each page is a separate query.
      - `tbs` string
      - `autocorrect` boolean
  - QueryGoogleImages: Google Images. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'google_images', required
    - `query` string, required
    - `params` object
      - `gl` string: Country code. Set explicitly when needed; omitted values use the search provider’s behavior.
      - `hl` string: Interface language. Set explicitly when needed; omitted values use the search provider’s behavior.
      - `location` string
      - `num` integer: Requested result count. Actual count varies by query and search type; no fixed value is added when omitted.
      - `page` integer: Requested page. Set explicitly for pagination; each page is a separate query.
      - `tbs` string
      - `autocorrect` boolean
  - QueryGoogleNews: Google News. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'google_news', required
    - `query` string, required
    - `params` object
      - `gl` string: Country code. Set explicitly when needed; omitted values use the search provider’s behavior.
      - `hl` string: Interface language. Set explicitly when needed; omitted values use the search provider’s behavior.
      - `location` string
      - `num` integer: Requested result count. Actual count varies by query and search type; no fixed value is added when omitted.
      - `page` integer: Requested page. Set explicitly for pagination; each page is a separate query.
      - `tbs` string
      - `autocorrect` boolean
  - QueryGoogleShopping: Google Shopping. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'google_shopping', required
    - `query` string, required
    - `params` object
      - `gl` string: Country code. Set explicitly when needed; omitted values use the search provider’s behavior.
      - `hl` string: Interface language. Set explicitly when needed; omitted values use the search provider’s behavior.
      - `location` string
      - `num` integer: Requested result count. Actual count varies by query and search type; no fixed value is added when omitted.
      - `page` integer: Requested page. Set explicitly for pagination; each page is a separate query.
      - `tbs` string
      - `autocorrect` boolean
  - QueryGoogleVideos: Google Videos. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'google_videos', required
    - `query` string, required
    - `params` object
      - `gl` string: Country code. Set explicitly when needed; omitted values use the search provider’s behavior.
      - `hl` string: Interface language. Set explicitly when needed; omitted values use the search provider’s behavior.
      - `location` string
      - `num` integer: Requested result count. Actual count varies by query and search type; no fixed value is added when omitted.
      - `page` integer: Requested page. Set explicitly for pagination; each page is a separate query.
      - `tbs` string
      - `autocorrect` boolean
  - QueryGooglePlaces: Google Places. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'google_places', required
    - `query` string, required
    - `params` object
      - `gl` string: Country code. Set explicitly when needed; omitted values use the search provider’s behavior.
      - `hl` string: Interface language. Set explicitly when needed; omitted values use the search provider’s behavior.
      - `location` string
      - `num` integer: Requested result count. Actual count varies by query and search type; no fixed value is added when omitted.
      - `page` integer: Requested page. Set explicitly for pagination; each page is a separate query.
      - `tbs` string
      - `autocorrect` boolean
  - QueryYoutubeSearch: YouTube Search. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'youtube_search', required
    - `query` string, required
    - `params` object
      - `max_results` integer
      - `filters` object, nullable
        - `360` boolean
        - `duration` '<4' | '4-20' | '>20'
        - `sort_by` 'rating' | 'relevance' | 'view_count' | 'upload_date'
        - `type` 'video' | 'channel' | 'playlist' | 'movie'
        - `upload_date` 'today' | 'last_hour' | 'this_week' | 'this_month' | 'this_year'
        - `3d` boolean
        - `4k` boolean
        - `creative_commons` boolean
        - `hd` boolean
        - `hdr` boolean
        - `live` boolean
        - `location` boolean
        - `purchased` boolean
        - `subtitles` boolean
        - `vr180` boolean
  - QueryYoutubeSearchExtended: YouTube Extended Search. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'youtube_search_extended', required
    - `query` string, required
    - `params` object
      - `max_results` integer
      - `filters` object, nullable
        - `360` boolean
        - `duration` '<4' | '4-20' | '>20'
        - `sort_by` 'rating' | 'relevance' | 'view_count' | 'upload_date'
        - `type` 'video' | 'channel' | 'playlist' | 'movie'
        - `upload_date` 'today' | 'last_hour' | 'this_week' | 'this_month' | 'this_year'
        - `3d` boolean
        - `4k` boolean
        - `creative_commons` boolean
        - `hd` boolean
        - `hdr` boolean
        - `live` boolean
        - `location` boolean
        - `purchased` boolean
        - `subtitles` boolean
        - `vr180` boolean
  - QueryYoutubeMetadata: YouTube Metadata. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'youtube_metadata', required
    - `video_id` string, required
    - `params` object
      - `include_formats` boolean
      - `include_chapters` boolean
  - QueryYoutubeTranscript: YouTube Transcript. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'youtube_transcript', required
    - `video_id` string, required
    - `params` object
      - `language` string
      - `auto` boolean: true selects automatically generated captions; false selects manually provided captions. Does not fall back between the two.
  - QueryYoutubeCaptions: YouTube Captions. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'youtube_captions', required
    - `video_id` string, required
    - `params` object
      - `language` string
      - `auto` boolean: true selects automatically generated captions; false selects manually provided captions. Does not fall back between the two.
  - QueryYoutubeTrainability: YouTube Trainability. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'youtube_trainability', required
    - `video_id` string, required
    - `params` object
  - QueryYoutubeChannel: YouTube Channel. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'youtube_channel', required
    - `handle` string, required
    - `params` object
      - `video_limit` integer
  - QueryYoutubeSuggestions: YouTube Suggestions. Supported modes: realtime, async, batch. Provider-specific storage requirements and conditional media options are validated by the server; see the source reference.
    - `source` 'youtube_suggestions', required
    - `query` string, required
    - `params` object
      - `language` string
      - `region` string

## Response `200`

Successful response

- DataQueryResponse: Source-specific JSON results. See the source reference for response fields and examples.
  - `source` string
  - `status` string
  - `created_at` string, date-time
  - `results` unknown[]
    - unknown
  - `usage` object
    - `credits` number

## Other responses

- `default`: Query rejected or upstream unavailable. Inspect the HTTP status, code and message; see /docs/errors.

---

[API](https://skmtc.dev/flashdata/apis/flashdata-customer-api.md) · [All operations](https://skmtc.dev/flashdata/apis/flashdata-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flashdata/apis/flashdata-customer-api/revisions/109179fe9313?raw)
