Skip to content

Commit 604451b

Browse files
VinciGit00claude
andcommitted
fix: remove locationGeoCode mapping, send country directly on wire
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5f2c48b commit 604451b

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/lib/utils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@ export function buildExtractBody(url: string | undefined, extractOptions: ApiExt
119119
}
120120

121121
export function buildSearchBody(query: string, searchOptions?: ApiSearchOptions) {
122-
const { country, ...rest } = searchOptions ?? {};
123-
const body: Record<string, unknown> = { query, ...rest };
124-
if (country) body.locationGeoCode = country;
122+
const body: Record<string, unknown> = { query, ...searchOptions };
125123
if (searchOptions?.schema) body.schema = toJsonSchema(searchOptions.schema);
126124
return body;
127125
}

tests/client.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ describe("scrapegraphai", () => {
160160
properties: { title: { type: "string" } },
161161
required: ["title"],
162162
},
163-
locationGeoCode: "it",
163+
country: "it",
164164
timeRange: "past_week",
165165
});
166166
expect((res.data as any).results.length).toBe(1);

0 commit comments

Comments
 (0)