# Query using NEST API if a point (Lat/lng) falls within a Polygon

**URL:** <https://discuss.elastic.co/t/query-using-nest-api-if-a-point-lat-lng-falls-within-a-polygon/301498>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [April 4, 2022, 11:10am UTC](https://discuss.elastic.co/t/query-using-nest-api-if-a-point-lat-lng-falls-within-a-polygon/301498 "2022-04-04T11:10:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xef](https://avatars.discourse-cdn.com/v4/letter/x/898d66/32.png) [@xef](https://discuss.elastic.co/u/xef)\
**Post date:** [April 4, 2022, 11:10am UTC](https://discuss.elastic.co/t/query-using-nest-api-if-a-point-lat-lng-falls-within-a-polygon/301498/1 "2022-04-04T11:10:53Z")

</div>

Say we have an index that has a field of geo\_shape and in it are the co-ordinates of a polygon.

How do I query to return all documents that have the point described by a lat/lng(not a field value but just a pair of values such as "40,10") within the polygons.

We have looked in the docs, but all examples seem to require a Field for the Lat/lng as opposed to passing just the actual values.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 2, 2022, 11:11am UTC](https://discuss.elastic.co/t/query-using-nest-api-if-a-point-lat-lng-falls-within-a-polygon/301498/2 "2022-05-02T11:11:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
