From 65acee9a9b500c17b9426f80997401758ec326b1 Mon Sep 17 00:00:00 2001 From: s Date: Sun, 9 Nov 2025 14:26:42 -0500 Subject: feat: add osint geo search command for address information lookup --- internal/client/osint.go | 22 ++++++++++++++++++++++ internal/models/osint.go | 9 +++++++++ 2 files changed, 31 insertions(+) (limited to 'internal') diff --git a/internal/client/osint.go b/internal/client/osint.go index d7e795c..2ee10c6 100644 --- a/internal/client/osint.go +++ b/internal/client/osint.go @@ -184,3 +184,25 @@ func (c *Client) SearchShortlinks(params *models.ShortlinksSearchParams) (*model return &response, nil } + +func (c *Client) SearchGeo(params *models.GeoSearchParams) (*models.GeoSearchResponse, error) { + path := "/osint/geo" + + queryParams := url.Values{} + queryParams.Add("street", params.Street) + queryParams.Add("city", params.City) + queryParams.Add("state", params.State) + queryParams.Add("zip", params.Zip) + + data, err := c.Get(path, queryParams) + if err != nil { + return nil, err + } + + var response models.GeoSearchResponse + if err := json.Unmarshal(data, &response); err != nil { + return nil, fmt.Errorf("failed to parse geo search response: %w", err) + } + + return &response, nil +} diff --git a/internal/models/osint.go b/internal/models/osint.go index 950225d..d025836 100644 --- a/internal/models/osint.go +++ b/internal/models/osint.go @@ -90,3 +90,12 @@ type ShortlinksSearchResponse struct { Credits CreditsInfo `json:"credits"` Results interface{} `json:"results"` } + +type GeoSearchParams struct { + Street string + City string + State string + Zip string +} + +type GeoSearchResponse map[string]interface{} -- cgit v1.2.3