API para Facebook

API para Facebook: Buscar posts

Busque posts públicos do Facebook por palavra-chave, opcionalmente filtrados por localização, e receba registros estruturados de posts (texto, autor, engajamento).

US$ 30,00/mil req., pague por requisição, sem assinatura.

fharvest festival | Facebook Search
facebook.com/search/posts?q=harvest%20festival

Riverside Community Market

Sep 26, 2024

Fall Harvest Festival is back this Saturday! Live music, a pumpkin patch, cider pressing and over 40 local vendors. Free entry, 10am to 5pm at Riverside Park.

84296 comments
LikeCommentShare
O que a API retornouitems[0]
{
"id": "743920185640217",
"url": "https://www.facebook.com/riversidecommunitymarket/posts/743920185640217",
"text": "Fall Harvest Festival is back this Saturday! Live music, a pumpkin patch, cider pressing and over 40 local vendors. Free entry, 10am to 5pm at Riverside Park.",
"authorName": "Riverside Community Market",
"authorUrl": "https://www.facebook.com/riversidecommunitymarket",
"reactionCount": 842,
"commentCount": 96,
"shareCount": 213,
... 8 campos a mais
}
Disponibilidade
99,17%
30d · 17.172 chamadas
Requisições
17.300
30d · semanal, últimas 12 sem.
Resposta
19,6s
mediana · 30d

Teste

Obtenha Buscar posts do Facebook em uma só requisição

requireFieldsarray
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `imagesCount` or `albumPreview`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a post that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
Abrir em
Obter chave grátis
Resposta de exemplo
Execuções grátis retornam só os primeiros 3 resultados. Recarregue uma chave para receber a resposta completa.

Este exemplo mostra 13 de 31 campos. Ver todos os campos

{
  "found": true,
  "data": {
    "items": [
      {
        "id": "743920185640217",
        "url": "https://www.facebook.com/riversidecommunitymarket/posts/743920185640217",
        "text": "Fall Harvest Festival is back this Saturday! Live music, a pumpkin patch, cider pressing and over 40 local vendors. Free entry, 10am to 5pm at Riverside Park.",
        "authorName": "Riverside Community Market",
        "authorUrl": "https://www.facebook.com/riversidecommunitymarket",
        "reactionCount": 842,
        "commentCount": 96,
        "shareCount": 213,
        "image": "https://scontent.xx.fbcdn.net/v/t39.30808-6/harvest_festival_banner.jpg",
        "createdUtc": 1727366400,
        "type": "post",
        "authorId": "187204093312",
        "authorImage": "https://scontent.xx.fbcdn.net/v/t39.30808-1/riverside_market_avatar.jpg",
        "imagesCount": 3,
        "reactions": {
          "like": 610,
          "love": 178,
          "care": 22,
          "haha": 9,
          "wow": 14,
          "sad": 2,
          "angry": 1
        },
        "albumPreview": [
          {
            "id": "743920182306884",
            "type": "photo",
            "url": "https://www.facebook.com/photo/?fbid=743920182306884",
            "image": "https://scontent.xx.fbcdn.net/v/t39.30808-6/harvest_festival_1.jpg"
          },
          {
            "id": "743920182306901",
            "type": "photo",
            "url": "https://www.facebook.com/photo/?fbid=743920182306901",
            "image": "https://scontent.xx.fbcdn.net/v/t39.30808-6/harvest_festival_2.jpg"
          }
        ]
      },
      {
        "id": "601487723190845",
        "url": "https://www.facebook.com/oldtownfarmers/posts/601487723190845",
        "text": "Harvest Festival vendor lineup is confirmed. Come say hi to us at booth 12!",
        "authorName": "Old Town Farmers Collective",
        "authorUrl": "https://www.facebook.com/oldtownfarmers",
        "reactionCount": 214,
        "commentCount": 18,
        "shareCount": 31,
        "image": "",
        "createdUtc": 1726934400,
        "type": "post",
        "authorId": "220981473052",
        "authorImage": "https://scontent.xx.fbcdn.net/v/t39.30808-1/oldtown_farmers_avatar.jpg",
        "imagesCount": 0,
        "reactions": {
          "like": 180,
          "love": 24,
          "care": 4,
          "haha": 3,
          "wow": 2,
          "sad": 0,
          "angry": 1
        },
        "albumPreview": []
      },
      {
        "id": "918204573110982",
        "url": "https://www.facebook.com/mapleridgeschool/posts/918204573110982",
        "text": "Our 3rd grade class made scarecrows for the Harvest Festival parade this weekend. So proud of this crew!",
        "authorName": "Maple Ridge Elementary PTA",
        "authorUrl": "https://www.facebook.com/mapleridgeschool",
        "reactionCount": 356,
        "commentCount": 42,
        "shareCount": 8,
        "image": "https://scontent.xx.fbcdn.net/v/t39.30808-6/scarecrow_parade.jpg",
        "createdUtc": 1726761600,
        "type": "post",
        "authorId": "339812065521",
        "authorImage": "https://scontent.xx.fbcdn.net/v/t39.30808-1/maple_ridge_avatar.jpg",
        "imagesCount": 1,
        "reactions": {
          "like": 290,
          "love": 55,
          "care": 8,
          "haha": 2,
          "wow": 1,
          "sad": 0,
          "angry": 0
        },
        "albumPreview": []
      }
    ]
  }
}

Referência completa de parâmetros e resposta - todos os campos, tipos e exemplos deste endpoint.

Referência

Uma requisição, um formato de resposta.

Cada campo que você envia e cada campo que você recebe, cada um com um exemplo real.

Última verificação em 2026-11-14 · disponibilidade e latência medidas em 30d

Corpo da requisição

JSON, enviado via POST para este endpoint.

  • querystring

    harvest festival

    Palavra-chave ou frase para buscar posts do Facebook (ex.: 'product launch').

  • endDatestring

    Retorna apenas posts publicados nesta data ou antes, no formato YYYY-MM-DD (ex.: 2024-12-31).

  • limitinteger

    3

    Número máximo de resultados a retornar (1-20, padrão 20).

  • locationstring

    Portland, United States

    Optional place name; include both city and country for best matches (e.g. 'Paris, France'). Uses Facebook's place filter, which favors posts tagged at that place rather than every post by people who live there, and can still return some posts from elsewhere.

  • requireFieldsarray

    Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `imagesCount` or `albumPreview`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a post that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.

  • startDatestring

    Retorna apenas posts publicados nesta data ou depois, no formato YYYY-MM-DD (ex.: 2024-01-01).

Você envia. Um corpo JSON pequeno. Os valores mostrados são exemplos para você trocar pelos seus.

Resposta

JSON, um valor de exemplo por campo.

each albumPreviewdata.albumPreview[]

Preview of the photos attached to the post.

  • idstring

    Numeric Facebook id of the photo, as a string.

  • imagestring

    Image URL of the photo.

  • typestringpode ser exigido

    Kind of attachment, e.g. "photo".

  • urlstring

    Canonical Facebook URL of the photo.

datadata
  • authorIdstring

    Numeric Facebook id of the page or profile that posted, as a string.

  • authorImagestring

    Profile picture URL of the page or profile that posted.

  • imagesCountintegerpode ser exigido

    Number of images attached to the post. Null when the source does not report it.

  • typestringpode ser exigido

    Kind of record Facebook returned, e.g. "post".

each itemdata.items[]

Matching public Facebook post records for the query. Populated whenever the provider has data for the entity.

  • authorNamestring

    Riverside Community Market

    Display name of the post's author. Empty when the upstream omits it.

  • authorUrlstring

    https://www.facebook.com/riversidecommunitymarket

    Canonical profile URL of the post's author, with tracking query params stripped. Empty when the upstream omits it.

  • commentCountinteger

    96

    Total number of comments on the post.

  • createdUtcnumber

    1727366400

    UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds.

  • idstring

    743920185640217

    The post's numeric Facebook ID, as a string. Populated whenever the provider has data for the entity.

  • imagestring

    https://scontent.xx.fbcdn.net/v/t39.30808-6/harvest_festival_banner.jpg

    URL of the post's primary image, a signed CDN URL whose query must be kept. Empty for text-only or video posts.

  • reactionCountinteger

    842

    Total number of reactions on the post.

  • shareCountinteger

    213

    Total number of shares/reshares of the post.

  • textstring

    Fall Harvest Festival is back this Saturday! Live music, a pumpkin patch, cider pressing and over 40 local vendors. Free entry, 10am to 5pm at Riverside Park.

    The post's text/message. Empty for media-only posts with no caption.

  • urlstring

    https://www.facebook.com/riversidecommunitymarket/posts/743920185640217

    Canonical URL of the post. A post with no page path keeps the query that identifies it (permalink.php?story_fbid=...&id=...). Populated whenever the provider has data for the entity.

reactionsdata.reactions

Reaction counts on the post, broken down by reaction type.

  • angryinteger

    Angry reactions.

  • careinteger

    Care reactions.

  • hahainteger

    Haha reactions.

  • likeinteger

    Like reactions.

  • loveinteger

    Love reactions.

  • sadinteger

    Sad reactions.

  • wowinteger

    Wow reactions.

top level
  • foundboolean

    true

    Whether any matching posts were returned for the query.

  • reason"not_found"

    Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.

Você recebe. Campos nomeados e tipados, no mesmo formato, seja qual for a fonte que responder.

Dúvidas frequentes

Sobre o endpoint Buscar posts da API para Facebook

O endpoint Buscar posts da AnyAPI para Facebook retorna dados de Facebook em JSON normalizado com uma chamada POST para /v1/run/facebook.search_posts. Busque posts públicos do Facebook por palavra-chave, opcionalmente filtrados por localização, e receba registros estruturados de posts (texto, autor, engajamento). A AnyAPI distribui cada requisição entre 3 fontes, com failover automático quando uma falha. Custa a partir de US$ 30 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Nos últimos 30 dias, 99,2% das chamadas ao endpoint Buscar posts da API para Facebook feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 19,6 segundos, em 17.172 chamadas medidas.

Custa a partir de US$ 30 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Você recarrega uma carteira em dólares e cada chamada desconta dela. Algumas requisições pagas pela carteira que falham geram cobranças de processamento, que repassamos pelo custo, sem margem; a resposta de erro mostra o valor cobrado.

Busque posts públicos do Facebook por palavra-chave, opcionalmente filtrados por localização, e receba registros estruturados de posts (texto, autor, engajamento). A resposta é JSON normalizado, com o mesmo envelope que todo endpoint da AnyAPI retorna, então processar um segundo endpoint é só trocar a URL, e nada mais.

Nos últimos 30 dias, 99,2% das chamadas ao endpoint Buscar posts da API para Facebook feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 19,6 segundos, em 17.172 chamadas medidas. Estas são medições da própria AnyAPI sobre o tráfego que passa pelo gateway, recalculadas continuamente, e não uma meta de nível de serviço publicada.

Sim. Uma conta nova da AnyAPI começa com US$ 0,10 de saldo grátis, sem cartão, o que cobre 3 chamadas de Buscar posts do Facebook a US$ 0,03 cada.

A AnyAPI consulta a próxima das suas 3 fontes na mesma requisição, começando pela mais barata, então a queda de uma fonte não derruba sua chamada.

Envie uma requisição POST para https://api.getanyapi.com/v1/run/facebook.search_posts com sua chave da AnyAPI em um cabeçalho "Authorization: Bearer" e a entrada como corpo JSON. A mesma chave e a mesma carteira funcionam em todos os endpoints da AnyAPI.

Não. Você adiciona dólares a um único saldo pré-pago da AnyAPI e cada requisição desconta dele. Não há plano mensal nem mínimo, e o mesmo saldo paga todos os endpoints da AnyAPI.

Sim. Instale @getanyapi/sdk pelo npm para TypeScript ou getanyapi pelo pip para Python. Os dois chamam todos os endpoints da AnyAPI com a mesma chave, e qualquer cliente HTTP também funciona.

Sim. Um agente pode se conectar ao servidor MCP da AnyAPI em https://api.getanyapi.com/mcp, ou criar a própria chave de teste grátis com um único POST sem autenticação para https://api.getanyapi.com/agent/signup e chamar este endpoint por HTTP.