Skip to content

Dataset

Search query log and click session datasets for AI training

A search query log dataset is a set of session records from a business's own search box: each query as typed, the ranked results that were shown, the clicks and dwell that followed, the reformulations, and how the session ended, whether in a purchase, an opened document or an exit. SourceX sources these logs to a buyer's spec from established businesses such as retailers, marketplaces, publishers and software companies that run site, in-app or intranet search. Each dataset is de-identified and licensed for an agreed permitted use.

Dataset manifest

Sourced to your spec
What it is
Search sessions: queries, the ranked results shown, clicks, dwell, reformulations and the session's outcome
Typical systems
Elasticsearch, OpenSearch, Solr, Algolia, Coveo and in-house engines, with front-end event tracking
Typical history
Specified by the buyer; limited by when impression logging began and the log retention the site set
Modality
Structured session events with short query text
Delivery formats
Agreed per order; commonly JSONL or Parquet with one session or one query per row, plus an item snapshot
Preparation
Session IDs replaced; rare and self-identifying queries suppressed to an agreed threshold; bot and internal traffic flagged
Licensing
Rights reviewed against the site's privacy notice and consent; permitted use set in the license
Availability
Sourced to your spec from businesses that logged impressions; supply is not guaranteed
Structured recordsIllustrative

What a delivery contains

Fields vary by source system and are fixed per order. A typical delivery includes:

FieldTypeWhat it holds
search_session_idstringRandom identifier for one search session, with no link to an account, cookie or device.
query_idstringIdentifier of one search request, which impressions, clicks and reformulations refer to.
query_textstringThe query as the user entered it, before spelling correction or normalization.
query_sourceenumTyped and submitted, keystroke request, autocomplete suggestion, recent search or voice input.
query_rewriteobjectWhat the engine ran instead: spelling correction, synonyms applied, or a redirect rule that skipped the results page.
refinementsobjectFacets selected, sort order and page number in force for this request.
result_countintegerTotal results the engine reported, where zero marks a failed search.
impressionsarrayThe ranked list as rendered: position, item ID, slot type such as organic, sponsored or pinned, and whether it entered the viewport.
rankerobjectRanking configuration or model version, index build and whether results were personalized.
experimentobjectExperiment ID and arm the request was assigned to, or the interleaving scheme used.
clicksarrayEach click with position, item ID, time, dwell and whether the user came back to the results.
reformulationobjectThe earlier query this one revises, the kind of revision and the seconds between them.
outcomeobjectHow the session ended: add to cart, purchase, document opened, support contact or exit.
item_snapshot_refstringPointer to the catalog or document index as it stood on the query date, where it is in scope.
Sample recordIllustrative

Field names from the table above; values are masked placeholders.

Example record

{
  "search_session_id": "ss_c41e9a",
  "queries": [
    {
      "query_id": "q_0001",
      "t": "2025-02-11T14:03:22Z",
      "query_text": "6203 2rs bearing",
      "query_source": "typed_submit",
      "result_count": 0,
      "impressions": [],
      "clicks": []
    },
    {
      "query_id": "q_0002",
      "t": "2025-02-11T14:03:41Z",
      "query_text": "6203-2RS",
      "query_source": "typed_submit",
      "query_rewrite": {
        "spell_corrected": false,
        "synonyms_applied": [],
        "redirect": null
      },
      "refinements": {
        "facets": {},
        "sort": "relevance",
        "page": 1
      },
      "result_count": 14,
      "impressions": [
        {
          "pos": 1,
          "item": "sku_88214",
          "slot": "sponsored",
          "in_viewport": true
        },
        {
          "pos": 2,
          "item": "sku_10377",
          "slot": "organic",
          "in_viewport": true
        },
        {
          "pos": 3,
          "item": "sku_10391",
          "slot": "organic",
          "in_viewport": true
        },
        {
          "pos": 4,
          "item": "sku_52006",
          "slot": "organic",
          "in_viewport": false
        }
      ],
      "ranker": {
        "config": "parts_search_v31",
        "index_build": "2025-02-10",
        "personalized": false
      },
      "experiment": {
        "id": "exp_hyphen_tokens",
        "arm": "control"
      },
      "clicks": [
        {
          "pos": 3,
          "item": "sku_10391",
          "t": "2025-02-11T14:03:55Z",
          "dwell_s": 48,
          "returned": false
        }
      ],
      "reformulation": {
        "from": "q_0001",
        "kind": "respelled_part_number",
        "gap_s": 19
      }
    }
  ],
  "outcome": {
    "type": "add_to_cart",
    "item": "sku_10391",
    "t": "2025-02-11T14:04:43Z"
  },
  "item_snapshot_ref": "catalog/2025-02-10/"
}

Synthetic record for illustration. Field names, structure and format are agreed per order.

What AI teams use it for

Train rankers for domain search

Impression lists with clicks and outcomes are the training data for learning to rank on product, help center and intranet search.

Learn query rewriting from users

Reformulation pairs teach spelling correction, synonym expansion and part-number normalization in the vocabulary real users bring.

Mine positives and hard negatives for retrievers

A clicked item with a long dwell is a likely positive, and items shown above it and skipped are candidate hard negatives for embedding and reranker training.

Evaluate retrieval for RAG and search agents

Real queries with known outcomes, including the ones that returned nothing, test a retriever or a searching agent on the inputs it will meet.

Build autocomplete and suggestion models

Keystroke requests, accepted suggestions and the query finally submitted show what users meant when they started typing.

Use-case guides: Document AI, enterprise search and RAG, Private evaluation sets, Enterprise and computer-use agents, Customer support agents

What makes this data valuable

Full impression lists

Every result shown is logged with its position, not only the ones clicked.

Ranker and experiment on each query

Each record names the ranking configuration and test arm that produced its list.

Randomized or interleaved traffic

Some share of traffic with shuffled or interleaved results lets position bias be estimated.

Intact reformulation chains

Sessions are whole, and keystroke requests, suggestions and paging are told apart from new queries.

Outcomes joined

Purchases, opened documents and support contacts are tied to the session that led to them.

Item snapshot

The catalog or document index as of the query dates is available, so item IDs still resolve.

Retrieval

Search query log dataset

This page covers search query logs and click sessions.Illustrative

A click is a judgment on what was shown

A click does not say a result is relevant. It says that, of the results this person saw, this one looked better than the ones above it. People click the top of the list partly because it is the top, and a result in eighth place with no click may never have been on screen. Click models and counterfactual learning to rank correct for this position bias, and both need the same input: every result that was shown, in order, for every query, clicked or not. On a phone only a few results fit the screen, so the list should also say which rows were rendered in the viewport.

That list is the part most businesses never stored. Web analytics tools typically record the search term and the page viewed next. The search engine's own logs record the request it received, not the page built afterward, once the front end had pinned merchandised items, inserted sponsored placements, grouped product variants and re-ranked for the signed-in user. Click-tracking features record the clicked item and its position only when the site was built to send them. So the first scoping question is whether impressions were logged at render time, by the page, with a query ID that the clicks carry.

The second question is which ranker produced the list. During an A/B test two rankers answer the same queries, and a click-through rate at position three means two different things until each query carries its experiment and arm. Over months the ranking model, the synonym file and the index all change, so the ranker configuration belongs on every record. Traffic where the order was partly randomized, or where two rankers were interleaved in one list, lets position effects be measured instead of assumed. Ask whether any exists.

Failed searches teach the most

A session with one query, one click on the first result and a purchase tells a ranker what it already knew. The informative sessions went wrong first. Someone types a part number with a space, gets nothing, retypes it with a hyphen and clicks. That pair is a labeled rewrite the engine lacked, supplied by a user who needed the part. Chains show spelling fixes, a term added to narrow, a term dropped when too little came back, and the swap from the user's word to the catalog's. Zero-result queries list the gaps, though the count alone cannot separate a vocabulary gap from an item the business does not carry.

This is also where a business's search differs from the web search data researchers already have. The public collections researchers know best come from web search engines: keyword queries and natural-language questions answered by pages of prose. A parts distributor's queries are part numbers, thread sizes and model compatibility. A software company's are error codes and feature names. An intranet's are project code names, form numbers and acronyms that mean something only inside the company, and results are trimmed by permissions, so two employees see different lists for one query. Often exactly one result is right. Embedding retrievers trained on web questions can miss exact identifiers that plain keyword matching finds, and real sessions show where.

Chains are easy to corrupt in the log. Search-as-you-type can send a request per keystroke, so prefixes pile up and look like reformulations. Choosing an autocomplete suggestion is not typing. Paging and facet clicks reissue the same query. Session boundaries are an inactivity rule somebody chose. Bots, uptime monitors and the search team's own testing all issue queries. Ask how each was marked, and check the sample.

What to check before licensing

  • Open the sample and confirm each query carries the full ranked list as the page rendered it, after merchandising, sponsored placements and personalization, with positions and slot types.
  • Ask whether the experiment arm and ranker version are on every query, and whether any traffic was served with randomized or interleaved rankings.
  • Ask how rare and self-identifying queries were suppressed, including the minimum number of distinct sessions a query must appear in. Then search the sample for names, emails, phone numbers and order numbers.
  • Confirm session identifiers are freshly generated, not hashes of account IDs, cookies or IP addresses, so they cannot be linked back to accounts. Ask whether the supplier keeps a mapping table.
  • Read the site's privacy notice and consent records for the log period and have counsel confirm they cover licensing search behavior to a third party. For intranet search, check what employees were told.
  • Check how keystroke requests, paging, facet refinements, bots and internal test traffic were separated from real queries.
  • Ask whether the item snapshot is in scope and who owns its content. Catalogs carry brand and marketplace seller content, and intranet documents need their own review.

Delivery No files move before a signed license. A listing or a request grants no files by itself.

How licensing works through SourceX

  1. 1

    Define

    Send the domain, modality, volume, format, timeline and permitted use you need.

  2. 2

    Source

    SourceX identifies businesses that hold matching data and are open to licensing it.

  3. 3

    Qualify

    Fit, rights and quality are checked, and you review samples before committing.

  4. 4

    License

    Scope, permitted use, exclusivity, price and obligations are agreed in writing.

  5. 5

    Deliver

    Approved data is prepared, de-identified where required and transferred securely.

Questions Acquisition Partners ask

How is this different from public learning-to-rank datasets?

It comes from one business's search with the sessions intact. The best-known public learning-to-rank sets come from web search engines and are released as feature vectors with relevance grades or as queries with judged passages. A few public click logs and product-search sets exist, but few keep the session, the full list shown and the outcome together. A sourced log can keep all three, in a domain where queries are part numbers or internal terms.

Can clicks be used directly as relevance labels?

No, not without correction. A click is shaped by position, by what else was on the page and by how each result was presented, so raw click counts mostly reproduce the old ranker. Treat a click as a preference over the results shown above it, weight by estimated position effects, and use outcomes such as a purchase or a long dwell to separate satisfied clicks from quick returns.

What if the business logged queries and clicks but no impressions?

The data is still useful, for fewer things. Query text, reformulation chains and zero-result queries support query understanding, rewriting and test sets. Unbiased ranker training needs the lists shown, and replaying old queries against today's index does not recover them, because the catalog, the ranker and the merchandising rules have all changed since. State in your request whether impressions are required or preferred.

How are personal queries handled?

Personal details such as names, emails and phone numbers are removed or replaced before delivery, and the method is recorded for each dataset. Search logs need more than that. People type addresses, order numbers and health questions into search boxes, and a run of queries can identify a person even under a random ID. Specify the minimum number of sessions a query must appear in to be kept. No method is perfect, so check the sample and have counsel review the notice and consent basis.

Does the dataset include the products or documents that were searched?

Only if it is scoped in. The log refers to items by ID, and ranker training usually needs their titles, attributes and text as of the query date. That content has its own owners and its own review: brand copy, marketplace seller listings, or internal documents. Ask for a dated snapshot alongside the log, and expect some items to be withheld.

What should our request specify?

Say what kind of search you need: retail, marketplace, publisher, software help or intranet, and in which languages. Then give the period, the minimum number of sessions, and which signals are required: impressions, viewport data, experiment arms, outcomes and an item snapshot. State your threshold for rare queries. These choices decide which businesses can supply the log, and supply is not guaranteed.

Evaluating this data for procurement?

Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.

Request dataset diligence

Tell us what your models need

Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.

Updated 25 November 2026.

See if your company qualifies