חיפוש והחלפה
החליפו כל התאמה מדויקת בטקסט שבחרתם.
כתובת URL בסיסית: https://happytails.ai · ה־API הציבורי אינו מחובר
עיבוד
החלפה מילולית שתלויה באותיות גדולות וקטנות. לביטויים רגולריים השתמשו בכלי בדיקת הביטויים הרגולריים.
בעת שליחת בקשת API, נתוני הקלט שלכם מעובדים בשרת.
פרמטרים של הבקשה
שלחו אובייקט JSON. מאפיינים לא מוכרים יידחו. אפשרויות שלא צוינו יקבלו את ערכי ברירת המחדל המופיעים בהמשך. יש להזין מספרים וערכים בוליאניים כערכי JSON ללא מירכאות.
השדה input הוא מחרוזת ריקה כברירת מחדל, באורך של עד 1,000,000 תווים. שינוי הקלט או ההגדרות מעדכן את התוצאה. היא מתעדכנת גם תוך כדי הקלדה.
נקודת הקצה הזו אינה מקבלת מערך files.
אפשרויות
options.findstringחיפוש
options.replacestringהחלפה ב
תגובה לבקשה שהצליחה
תשובת HTTP 200 כוללת את tool ואת result. הטקסט נמצא בשדה result.text, ונתוני JSON לאחר פענוח עשויים להופיע גם בשדה result.data. הקבצים שנוצרו נמצאים בשדה result.files עם השדות name, mime, bytes ו־base64. יש לפענח את הבתים לפני השמירה. מערך קבצים ריק וערך טקסט null תקינים כאשר הפעולה מחזירה תוצאה מסוג אחר.
הסכמה המלאה של הפלט
{
"type": "object",
"required": [
"tool",
"result"
],
"properties": {
"tool": {
"type": "string"
},
"result": {
"type": "object",
"required": [
"text",
"files"
],
"properties": {
"text": {
"type": [
"string",
"null"
]
},
"data": {
"description": "Parsed JSON when the textual result is JSON."
},
"name": {
"type": "string"
},
"mime": {
"type": "string"
},
"files": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"mime",
"bytes",
"base64"
],
"properties": {
"name": {
"type": "string"
},
"mime": {
"type": "string"
},
"bytes": {
"type": "integer"
},
"base64": {
"type": "string",
"contentEncoding": "base64"
}
}
}
}
}
}
}
}מגבלות ושגיאות
נקודת הקצה הזו אוכפת את המגבלות המפורטות בהמשך. חלות גם המגבלות הנוספות על פורמט, מספר עמודים, משך ומודל המפורטות בהערות התפעול. המגבלות בממשק הדפדפן עשויות להיות שונות ממגבלות ה־API.
request_bytes- 8388608
input_characters- 1000000
files_bytes- 5242880
max_files- 0
timeout_seconds- 12
בקשה לא תקינה מחזירה אובייקט error עם השדות code ו־message. ראו קודי מצב HTTP, ניסיונות חוזרים, זמני קצוב ובקשות במקביל. העיבוד סינכרוני והתוצאות מוחזרות באותה תשובה.
הסכמה המלאה של הבקשה
הרחבת סכמת JSON
{
"type": "object",
"additionalProperties": false,
"properties": {
"input": {
"type": "string",
"maxLength": 1000000,
"default": "",
"description": "Plain text input. File tools use files instead unless otherwise documented."
},
"options": {
"type": "object",
"additionalProperties": false,
"properties": {
"find": {
"type": "string",
"description": "Find",
"default": ""
},
"replace": {
"type": "string",
"description": "Replace with",
"default": ""
}
}
}
}
}לאוטומציה בדפדפן, אפשר להיעזר במשאב המרכזי הנחיות WebMCP כדי לגלות אילו כלים הדפדפן מעמיד בפועל לרשותכם.
curl https://happytails.ai/api/v1/tools/find-and-replace/run \
-H "Content-Type: application/json" \
--data '{"input": "Hello world", "options": {"find": "world", "replace": "Ada"}}'const payload = {
"input": "Hello world",
"options": {
"find": "world",
"replace": "Ada"
}
};
const response = await fetch(
"https://happytails.ai/api/v1/tools/find-and-replace/run",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload)
}
);
const data = await response.json();
if (!response.ok) throw new Error(data.error.message);
console.log(data.result);import json
from urllib.request import Request, urlopen
payload = json.loads('{"input": "Hello world", "options": {"find": "world", "replace": "Ada"}}')
request = Request(
"https://happytails.ai/api/v1/tools/find-and-replace/run",
data=json.dumps(payload).encode(),
headers={"Content-Type": "application/json"},
)
with urlopen(request, timeout=200) as response:
result = json.load(response)
print(result){
"input": "Hello world",
"options": {
"find": "world",
"replace": "Ada"
}
}יש להחליף את כתובת המקור של ה־API ואת ערכי הקלט בערכים המתאימים ליישום שלך.
{
"tool": "find-and-replace",
"result": {
"text": "Hello Ada",
"files": [],
"name": "result.txt",
"mime": "text/plain;charset=utf-8"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Unknown request property. See the tool input schema."
}
}