Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Instagram City Locations

Tài liệu API
https://api.sandbase.ai/v1/api/instagram/v1/locations

Returns a list of Instagram location points for a designated city. Filter results using the city identifier and paginate through records by page number.

Giá
$0.001USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 1 tùy chọn

Phòng thử nghiệm

Đầu vào
City ID (from fetch_cities API)
Page number, default 1 Tối thiểu: 1.
Đầu raVí dụ
Phản hồioutputs · 801 B · 37 dòng
[
  {
    "data": {
      "attempts": "16",
      "city_info": {
        "id": "c2791472",
        "name": "LosAngelesCounty",
        "slug": "losangelescounty-united-states"
      },
      "country_info": {
        "id": "US",
        "name": "United States",
        "slug": "united-states"
      },
      "location_list": [
        {
          "id": "1639313",
          "name": "Crypto.com Arena",
          "slug": "cryptocom-arena"
        },
        {
          "id": "237788205",
          "name": "The Broad",
          "slug": "the-broad"
        },
        {
          "id": "117616",
          "name": "Grand Central Market",
          "slug": "grand-central-market"
        },
        "… 93 more items in the full response"
      ],
      "next_page": 2,
      "status": "ok"
    }
  }
]

Ví dụ

Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.

README API

Instagram City Locations API

Returns a page of Instagram location points for one city, each with an ID, a name, and a slug. It needs a city_id, such as c2791472, and takes an optional page number.

Use cases

  • List well-known venues in a city, such as arenas, museums, and markets, to build a local points-of-interest list.
  • Collect location IDs for a city to feed into location-based post lookups.
  • Page through a city's locations to build a dataset of place names for geo-targeted content research.
  • Check which city and country a city_id belongs to by reading the returned city and country details.

Request

curl -X POST "https://api.sandbase.ai/v1/api/instagram/v1/locations" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"city_id": "c2791472"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
city_idstringYesCity ID (from fetch_cities API)
pageintegerNoPage number, default 1

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "attempts": "0",
  "city_info": {
    "id": "c2791472",
    "name": "LosAngelesCounty",
    "slug": "losangelescounty-united-states"
  },
  "country_info": {
    "id": "US",
    "name": "United States",
    "slug": "united-states"
  },
  "location_list": [
    {
      "id": "1639313",
      "name": "Crypto.com Arena",
      "slug": "cryptocom-arena"
    }
  ],
  "next_page": 2,
  "status": true
}

Response fields

FieldMeaning
location_list[].idInstagram ID of the location. Use it to look up that location in other location APIs.
location_list[].nameDisplay name of the location, for example Crypto.com Arena.
location_list[].slugURL-style short name of the location.
city_info.id / city_info.name / city_info.slugID, name, and slug of the city the locations belong to. The name can appear without spaces, for example LosAngelesCounty.
country_info.id / country_info.name / country_info.slugCountry code, name, and slug for the city.
next_pagePage number to send as page to get the next set of locations.
statustrue when the request succeeded.

Notes

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Instagram$0.001 mỗi lần gọiJSON
Instagram$0.001 mỗi lần gọiJSON
Instagram$0.001 mỗi lần gọiJSON
Instagram$0.001 mỗi lần gọiJSON
Instagram$0.001 mỗi lần gọiJSON
Instagram$0.001 mỗi lần gọiJSON

Hướng dẫn:Instagram API cost: official limits and per-call pricesBest Instagram API in 2026: Pricing Compared

Câu hỏi

FAQ

Làm thế nào để dùng API Instagram City Locations?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/instagram/v1/locations với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Instagram City Locations có giá bao nhiêu?

$0.001 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API Instagram City Locations chấp nhận những tham số nào?

Bắt buộc: city_id (string). Tùy chọn: page (integer). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Instagram City Locations trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Instagram không?

Không. Instagram City Locations chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Instagram.