Call it
curl https://api.peume.com/v1/call/search-facebook-events \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"searchQueries": [
"Sport New York"
],
"startUrls": [
"https://www.facebook.com/events/1023978871819924"
],
"maxEvents": 30
}
}'const res = await fetch("https://api.peume.com/v1/call/search-facebook-events", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"searchQueries": [
"Sport New York"
],
"startUrls": [
"https://www.facebook.com/events/1023978871819924"
],
"maxEvents": 30
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-facebook-events",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"searchQueries": [
"Sport New York"
],
"startUrls": [
"https://www.facebook.com/events/1023978871819924"
],
"maxEvents": 30
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: search-facebook-events.
Parameters
searchQueriesarraySearch you want to use to discover new events. You can provide search for topics, such as 'Sport', or for places, such as 'New York', or combine them 'Sport New York'.
Example: ["Sport New York"]
startUrlsarrayURLs to start with. You can provide URLs of event details here or search/explore URLs, e.g. 'https://www.facebook.com/events/1023978871819924' or 'https://www.facebook.com/events/search/?q=Party' or 'https://www.facebook.com/events/explore/fr-paris/110774245616525' or 'https://www.facebook.com/events/search?q=Comedy&sde=AbrQ9KopLfqYT7heXVVCxznkZYxRr9hU1JA4cdLbJhjgs56yyeHW3e833A9dGP1WlEHOyagjWyFL9Y79gw-Ko1iVuJCILVkpVsHkmSbBFb3SEA&filters=eyJmaWx0ZXJfZXZlbnRzX2NhdGVnb3J5OjAiOiJ7XCJuYW1lXCI6XCJmaWx0ZXJfZXZlbnRzX2NhdGVnb3J5XCIsXCJhcmdzXCI6XCIyMTA0MTIxMTM5ODUwMTAwXCJ9IiwicnBfZXZlbnRzX2xvY2F0aW9uOjA
Example: ["https://www.facebook.com/events/1023978871819924"]
maxEventsintegerMaximum number of events to extract for each search query or start URL. If you leave this field empty, the number of events won't be limited.
Example: 30
