egdata API

Natural-Language Offer Search

Find Epic Games Store offers by meaning with Workers AI and Cloudflare Vectorize.

Use POST /search/natural-language to describe the kind of game or content you want instead of composing keyword filters. The API embeds the query, ranks the offer vectors, and then uses each match's indexed offer ID to load the current offer document from MongoDB. Vector metadata is not used as the source of offer fields.

curl -X POST "https://api.egdata.app/search/natural-language?locale=en-US" \
  -H "Content-Type: application/json" \
  -d '{"query":"open world co-op survival games","topK":10}'

query is required and may contain up to 500 characters. topK is optional, defaults to 10, and accepts values from 1 through 50.

Response

Results retain Vectorize similarity order. Each match contains the similarity score and a Mongo-backed offer, including the same localization metadata used by other public offer responses.

{
  "query": "open world co-op survival games",
  "count": 1,
  "matches": [
    {
      "score": 0.91,
      "offer": {
        "id": "example-offer-id",
        "title": "Example Game",
        "locale": "en-US",
        "localeStatus": "canonical"
      }
    }
  ]
}

count can be smaller than topK when a Vectorize entry is stale or its ID no longer resolves to an offer document. Treat scores as ranking signals within a response rather than as fixed relevance thresholds.

On this page