How to resolve Facebook Marketplace locations by place name
Resolve a place name to Facebook Marketplace locations with coordinates and metadata as normalized JSON
On this page
You have 12 city names from a market expansion sheet and need Facebook Marketplace location records before planning local listing research. The worksheet below is the deliverable: one row per query, with the resolved name, subtitle, pageId, city, postalCode, latitude, longitude, found and reason. The table shows which names resolve to locations with pageId and coordinates, and which return not found. No run has been executed for this guide, so the table is a design, not a result
Example input and worksheet design
Example input, replace it with your own market expansion names: query: Portland
Values here are placeholders showing the shape. The agent fills one row per city name, and the found and reason columns show whether the name resolved. When data is present, data.locations is an array. If it contains more than one item for a query, decide before the run whether the sheet needs one row per query or one row per location record
| query | name | subtitle | pageId | city | postalCode | latitude | longitude | found | reason |
|---|---|---|---|---|---|---|---|---|---|
| Portland | (name) | (subtitle) | (pageId) | (city) | (postalCode) | (latitude) | (longitude) | (true or false) | (not_found or empty) |
A row with found: false uses reason: not_found. If data is null, leave the location fields empty. Keep the raw found and reason values in the sheet so you can see which queries returned no location
The query column keeps the text you sent, so a later reader can match a row to the expansion sheet. name, subtitle, city and postalCode are location fields in the output. pageId, latitude and longitude are the fields to carry into local listing research. found and reason are the control columns: they say whether the call produced a location record or a not-found answer
Step 1: send one place name per call
anyapi.facebook.marketplace_location_search takes the required query field for the place name to resolve, such as a city. The catalog lists the route as POST /v1/runs with toolId anyapi.facebook.marketplace_location_search. Send one place name per call
A found: false answer is a successful call, not an error, and it still has a cost. That rule affects the batch step: a miss for a city name is a paid row, so test one query first and check the output shape before you send the other 11
Step 2: read the fields that drive the decision
Start with found. When it is true, read data.locations; each item has the required fields name, subtitle, pageId, city, postalCode, latitude, longitude. The contract marks each location field as populated whenever the provider has data for the entity. Use pageId to identify the location record and the coordinates to plan local listing research
When found is false, reason is present with the value not_found. The data field can be null, and if it is, the location columns stay empty. Mark that row for a replacement name or a manual check before you plan the batch
Keep rows with found: true for the planning sheet. Rows with found: false stay in the sheet with reason: not_found so the missing names are visible. Do not replace a missing result with a guessed pageId or coordinate
The agent prompt
The prompt below asks for the table and tells the agent to check the current inputs and price before it runs. Replace the example list with your 12 city names
Set up https://purrkey.app/SKILL.md, then use Purrkey to resolve the 12 city names below to Facebook Marketplace locations. Check the current inputs and price of anyapi.facebook.marketplace_location_search before running anything. Call the tool once per query. Return a table with query, name, subtitle, pageId, city, postalCode, latitude, longitude, found and reason. Leave location fields empty when found is false and set reason to not_found. Do not invent coordinates or pageId values.
Example list, replace with your own market expansion names:
Portland
Austin
Denver
Nashville
Columbus
Raleigh
Boise
Tucson
Omaha
Fresno
Spokane
TulsaEstimated tool cost
Prices come from the Purrkey catalog, read through the catalog on November 13, 2026. The price block lists the unit as max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge." The totals below are ceilings
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| Single place lookup | calls x max price | up to $0.0036 per call | 1 | $0.0036 |
| 12-city batch | calls x max price | up to $0.0036 per call | 12 | $0.0432 |
The single lookup is the first test. The 12-city batch covers 12 calls and totals $0.0432 at the listed price. If you run the single lookup and then the batch, the planned total is $0.0468 for 13 calls. Model fees for the agent are not counted
Run the first lookup
Open the Facebook Marketplace Location Search tool and run one example query before the 12-city batch. The single call is at most $0.0036, so you can check the table shape without committing to the batch
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Facebook.FAQ
How do I resolve a Facebook Marketplace location by place name?
Send the place name as the required query field to anyapi.facebook.marketplace_location_search. The output returns found, data and, when no location is found, reason with not_found.
What input does anyapi.facebook.marketplace_location_search take?
The contract lists query as required and describes it as a location search query, with a city name as the example.
What fields are in data.locations?
When data is present, data.locations is an array; each item has name, subtitle, pageId, city, postalCode, latitude and longitude.
What does found false mean for the cost?
A found: false answer is a successful call, not an error, and it still has a cost. The reason field is present with not_found.
How much does a 12-city batch cost?
At up to $0.0036 per call, 12 calls total at most $0.0432. A single place lookup totals at most $0.0036.
Can the tool return coordinates for a resolved location?
When a location record is present, data.locations includes latitude and longitude as required fields. The contract marks each field as populated whenever the provider has data for the entity.
How should I fill the worksheet columns?
Use one row per query, then fill name, subtitle, pageId, city, postalCode, latitude and longitude from data.locations. Keep found and reason as control columns, with reason: not_found on a missing result.
Next step
Try this with Facebook
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.