# Facebook Location ID Resolver

> Facebook Location ID Resolver is a paid API for AI agents from x402.apidirect.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-30).

Resolves a place name (city, region, or country) to Facebook location IDs for use in Facebook targeting and search.

## Facts

- Endpoint: GET https://x402.apidirect.io/v1/facebook/locations?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/facebook-location-id-resolver-256ea76f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_T0Ep6CvpfAjQ9sZ9dIy7X

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability facebook-location-id-resolver-256ea76f
```

Example prompt: Can you resolve 'London' to its Facebook location ID so I can use it for ad targeting?

## When to prefer this

Use this endpoint when you need to translate human-readable place names into Facebook-specific location IDs for use in Facebook ad targeting, event creation, or social media automation. Prefer this over manual lookup when building automated pipelines that need to programmatically resolve geographic names to Facebook's internal location codes.

## Known failure modes

- Place name not recognized or too ambiguous — returns empty or no results
- Misspelled or non-existent place name — returns no matching location IDs
- Rate limiting or payment failure — HTTP 402 or 429 error
- Query string exceeds 500 character limit — validation error
- Ambiguous place name with multiple matches — may return multiple location IDs requiring disambiguation

## How this service works

Resolve a place name (city, region, or country) to Facebook location IDs.

## Output

Returns Facebook location IDs corresponding to the queried place name, enabling use in Facebook advertising targeting, event creation, group management, or social media automation workflows.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "query"
     ],
     "properties": {
      "query": {
       "type": "string",
       "maxLength": 500,
       "description": "Place name to resolve, e.g. \"London\" or \"Paris, France\" (max 500 characters)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/facebook-location-id-resolver-256ea76f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.apidirect.io](https://www.zero.xyz/host/x402.apidirect.io/llms.txt)
