Skip to main content

Mapfy

Mapfy queries public Google Maps results, normalizes each candidate as a PlaceResult, and builds ready-to-use Street View image links.

What it returns

Each result can include place_id, name, category, address, website, streetview, rating, reviews_count, latitude, and longitude.

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.streetview)

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 --all-groups
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.0.tar.gz (7.4 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.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mapfy-0.1.0.tar.gz
  • Upload date:
  • Size: 7.4 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.0.tar.gz
Algorithm Hash digest
SHA256 976786f01f472d6a8064b3a7af104e8acc596d59235035392823cf78e4756c22
MD5 3bf9a03324d95c9239d3c585682aeb9f
BLAKE2b-256 943d26646ed7b06b066a9624a3de8c0747eefdac6361dd5792a021875114bfcc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mapfy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 985b8aba4a504b009118f5afeee6291291e1bc317a0e51dc5dd74186b6046e46
MD5 a42f8a88aa10d964d11c67824fe0880b
BLAKE2b-256 1015d5f968044d6355e1758a16b71499086545ee0e34bdc5e8a2f4441d818d1c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

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