Skip to main content

Mapfy

Mapfy queries public Google Maps results, normalizes each candidate as a PlaceResult, builds a direct Google Maps link, and returns a single Street View image URL when one is available.

What it returns

Each result can include place_id, name, category, address, website, rating, reviews_count, latitude, longitude, maps_url, and image_url. maps_url opens the location in Google Maps; image_url points to its Street View image and does not expose the panorama ID separately.

Mapfy uses an internal Maps endpoint that Google does not document. Changes to the response format may require a parser update.

Public API

The client exposes two searches:

  • search(): resolves an address, coordinates, or free-text location query.
  • search_places(): finds establishments by name, category, or type.

Installation

uv add mapfy

Usage

from mapfy import Mapfy

with Mapfy() as client:
    places = client.search_places(
        query="coffee shop",
        near="Seattle, WA",
        limit=10,
    )

for place in places:
    print(place.name, place.maps_url, place.image_url)

near is optional and accepts an address, a coordinate string ("47.61,-122.33"), or a coordinate tuple ((47.61, -122.33)). language and country are optional; when omitted, Google determines the request context.

limit=None returns every result received. A positive integer returns up to that many results while preserving the order returned by Maps.

search() preserves every candidate returned by Maps, so ambiguous addresses do not get reduced to an arbitrary first result.

addresses = client.search("47.61, -122.33")

Structure

src/mapfy/
├── client.py
├── models.py
├── parser.py
├── common.py
└── __init__.py

Development

uv sync --no-dev --group lint --group test
uv run ruff format
uv run ruff check
uv run ty check

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mapfy-0.1.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mapfy-0.1.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file mapfy-0.1.1.tar.gz.

File metadata

  • Download URL: mapfy-0.1.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mapfy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c4da881bf72e851836b9e44213a286282c46efba053e18df28c360c6573fe32d
MD5 43034ec609bceabb7f19dd75b1f9318e
BLAKE2b-256 be7ca7efdf7cf8e2dec614d8618da29712fb9f405444914b4386c184f921662c

See more details on using hashes here.

File details

Details for the file mapfy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mapfy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mapfy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 48826bb697ef0a2a37177cb320cdbf71809dec62ec69eb941fbbcdb754a4a2ad
MD5 ffd17d783bd45fb8d77364d7cef1f973
BLAKE2b-256 96438954ed23aafe273b55eab0ef54df50ee0d492b0f70135d372eb55b67b25a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page