Search posts by content
curl --request GET \
--url https://api.yalg.ai/v1/posts/search \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.yalg.ai/v1/posts/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.yalg.ai/v1/posts/search"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "018f9f40-7d7b-7712-9b0f-2e5d9fd5df3f",
"anecdoteId": "018f9f41-22a1-74bb-9450-7dd0d21ab8ab",
"content": "I used to think consistency came from discipline. It actually came from removing friction.",
"platform": "linkedin",
"status": "draft",
"likes": 12,
"comments": 3,
"shares": 1,
"createdAt": "2026-06-20T17:24:39.000Z",
"updatedAt": "2026-06-20T17:24:39.000Z"
}
]{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request",
"code": "validation_failed"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized",
"code": "unauthorized"
}{
"statusCode": 403,
"message": "Access denied",
"error": "Forbidden",
"code": "forbidden"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"error": "Too Many Requests",
"code": "rate_limit_exceeded",
"retryAfter": 60
}{
"statusCode": 500,
"message": "Internal server error",
"error": "Internal Server Error",
"code": "internal_server_error"
}posts
Search posts by content
Search for posts containing specific text in their content
GET
/
v1
/
posts
/
search
Search posts by content
curl --request GET \
--url https://api.yalg.ai/v1/posts/search \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.yalg.ai/v1/posts/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.yalg.ai/v1/posts/search"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "018f9f40-7d7b-7712-9b0f-2e5d9fd5df3f",
"anecdoteId": "018f9f41-22a1-74bb-9450-7dd0d21ab8ab",
"content": "I used to think consistency came from discipline. It actually came from removing friction.",
"platform": "linkedin",
"status": "draft",
"likes": 12,
"comments": 3,
"shares": 1,
"createdAt": "2026-06-20T17:24:39.000Z",
"updatedAt": "2026-06-20T17:24:39.000Z"
}
]{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request",
"code": "validation_failed"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized",
"code": "unauthorized"
}{
"statusCode": 403,
"message": "Access denied",
"error": "Forbidden",
"code": "forbidden"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"error": "Too Many Requests",
"code": "rate_limit_exceeded",
"retryAfter": 60
}{
"statusCode": 500,
"message": "Internal server error",
"error": "Internal Server Error",
"code": "internal_server_error"
}Authorizations
YALG Developer API key. Send it in the x-api-key header from a server-side environment only.
Query Parameters
Search term
Example:
"technology conference"
Page number (default: 1)
Example:
1
Number of posts per page (default: 10)
Example:
10
Response
Search results retrieved successfully
- object[]
- object
Social post managed by YALG.
Post identifier.
Example:
"018f9f40-7d7b-7712-9b0f-2e5d9fd5df3f"
Source anecdote identifier.
Example:
"018f9f40-7d7b-7712-9b0f-2e5d9fd5df3f"
Example:
"A publishable LinkedIn post generated from an anecdote."
Example:
"linkedin"
Example:
"draft"
Example:
"2026-06-20T17:24:39.000Z"
Example:
"2026-06-20T17:24:39.000Z"
Example:
12
Example:
3
Example:
1
Example:
"2026-06-20T17:24:39.000Z"
Example:
"2026-06-20T17:24:39.000Z"